X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/5a4def747897c1c6ffbe465506d846c7c686d3e9..77a9df36a77d2523dd2bc24fa17f9f04c6c175c5:/Demos/Device/LowLevel/RNDISEthernet/Lib/Webserver.c diff --git a/Demos/Device/LowLevel/RNDISEthernet/Lib/Webserver.c b/Demos/Device/LowLevel/RNDISEthernet/Lib/Webserver.c index bca8673ca..7bd083d85 100644 --- a/Demos/Device/LowLevel/RNDISEthernet/Lib/Webserver.c +++ b/Demos/Device/LowLevel/RNDISEthernet/Lib/Webserver.c @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2010. + Copyright (C) Dean Camera, 2011. dean [at] fourwalledcubicle [dot] com - www.fourwalledcubicle.com + www.lufa-lib.org */ /* - Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted @@ -66,7 +66,7 @@ char PROGMEM HTTPPage[] = "

" " Hello! Welcome to the LUFA RNDIS Demo Webserver test page, running on your USB AVR via the LUFA library. This demonstrates the HTTP webserver, TCP/IP stack and RNDIS demo all running atop the LUFA USB stack." "

" - " Project Information: http://www.fourwalledcubicle.com/LUFA.php." + " Project Information: http://www.lufa-lib.org." "


" " LUFA Version: " LUFA_VERSION_STRING "

" @@ -74,7 +74,7 @@ char PROGMEM HTTPPage[] = ""; -/** Initialises the Webserver application, opening the appropriate HTTP port in the TCP handler and registering the application +/** Initializes the Webserver application, opening the appropriate HTTP port in the TCP handler and registering the application * callback routine for packets sent to the HTTP protocol port. */ void Webserver_Init(void) @@ -181,7 +181,7 @@ void Webserver_ApplicationCallback(TCP_ConnectionState_t* const ConnectionState, uint16_t Length; /* Determine the length of the loaded block */ - Length = ((RemLength > HTTP_REPLY_BLOCK_SIZE) ? HTTP_REPLY_BLOCK_SIZE : RemLength); + Length = MIN(RemLength, HTTP_REPLY_BLOCK_SIZE); /* Copy the next buffer sized block of the page to the packet buffer */ strncpy_P(BufferDataStr, &HTTPPage[PageBlock * HTTP_REPLY_BLOCK_SIZE], Length);