Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Erik Strand
lufa
Commits
b9cf4815
Commit
b9cf4815
authored
Feb 03, 2010
by
Dean Camera
Browse files
Disable uIP connection polling for now - this seems to corrupt the buffers.
parent
16ea5aa7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Projects/Webserver/Lib/HTTPServerApp.c
View file @
b9cf4815
...
...
@@ -199,7 +199,6 @@ static void HTTPServerApp_SendResponseHeader(void)
char
*
const
AppData
=
(
char
*
)
uip_appdata
;
char
*
HeaderToSend
;
uint16_t
HeaderLength
;
/* Determine which HTTP header should be sent to the client */
if
(
AppState
->
HTTPServer
.
FileOpen
)
...
...
@@ -214,9 +213,8 @@ static void HTTPServerApp_SendResponseHeader(void)
}
/* Copy over the HTTP response header and send it to the receiving client */
HeaderLength
=
strlen_P
(
HeaderToSend
);
strncpy_P
(
AppData
,
HeaderToSend
,
HeaderLength
);
uip_send
(
AppData
,
HeaderLength
);
strcpy_P
(
AppData
,
HeaderToSend
);
uip_send
(
AppData
,
strlen
(
AppData
));
}
/** HTTP Server State handler for the MIME Header Send state. This state manages the transmission of the file
...
...
Projects/Webserver/Lib/TELNETServerApp.c
View file @
b9cf4815
...
...
@@ -79,15 +79,15 @@ void TELNETServerApp_Callback(void)
{
case
TELNET_STATE_SendHeader
:
/* Copy over and send the TELNET welcome message upon first connection */
str
n
cpy_P
(
AppData
,
WelcomeHeader
,
strlen_P
(
WelcomeHeader
)
);
uip_send
(
AppData
,
strlen
_P
(
WelcomeHeader
));
strcpy_P
(
AppData
,
WelcomeHeader
);
uip_send
(
AppData
,
strlen
(
AppData
));
AppState
->
TELNETServer
.
NextState
=
TELNET_STATE_SendMenu
;
break
;
case
TELNET_STATE_SendMenu
:
/* Copy over and send the TELNET menu to the client */
str
n
cpy_P
(
AppData
,
TELNETMenu
,
strlen_P
(
TELNETMenu
)
);
uip_send
(
AppData
,
strlen
_P
(
TELNETMenu
));
strcpy_P
(
AppData
,
TELNETMenu
);
uip_send
(
AppData
,
strlen
(
AppData
));
AppState
->
TELNETServer
.
NextState
=
TELNET_STATE_GetCommand
;
break
;
...
...
Projects/Webserver/Lib/uIPManagement.c
View file @
b9cf4815
...
...
@@ -175,6 +175,7 @@ static void uIPManagement_ProcessIncommingPacket(void)
/** Manages the currently open network connections, including TCP and (if enabled) UDP. */
static
void
uIPManagement_ManageConnections
(
void
)
{
#if 0
/* Poll TCP connections for more data to send back to the host */
for (uint8_t i = 0; i < UIP_CONNS; i++)
{
...
...
@@ -189,7 +190,7 @@ static void uIPManagement_ManageConnections(void)
RNDIS_Host_SendPacket(&Ethernet_RNDIS_Interface, uip_buf, uip_len);
}
}
#endif
/* Manage open connections for timeouts */
if
(
timer_expired
(
&
ConnectionTimer
))
{
...
...
Projects/Webserver/makefile
View file @
b9cf4815
...
...
@@ -200,11 +200,10 @@ CSTANDARD = -std=gnu99
CDEFS
=
-DF_CPU
=
$(F_CPU)
UL
-DF_CLOCK
=
$(F_CLOCK)
UL
-DBOARD
=
BOARD_
$(BOARD)
$(LUFA_OPTS)
CDEFS
+=
-DENABLE_DHCP
=
1
CDEFS
+=
-DUIP_CONF_UDP_CONNS
=
1
-DUIP_CONF_TCP
=
1
-DUIP_CONF_MAX_CONNECTIONS
=
5
CDEFS
+=
-DUIP_CONF_MAX_LISTENPORTS
=
5
-DUIP_CONF_BUFFER_SIZE
=
1514
CDEFS
+=
-DUIP_CONF_LL_802154
=
0
-DUIP_CONF_LL_80211
=
0
-DUIP_CONF_ROUTER
=
0
-DUIP_CONF_ICMP6
=
0
-DUIP_CONF_LL_802154
=
0
CDEFS
+=
-DUIP_ARCH_ADD32
=
0
-DUIP_ARCH_CHKSUM
=
0
-DUIP_CONF_ICMP_DEST_UNREACH
=
1
-DUIP_NEIGHBOR_CONF_ADDRTYPE
=
0
CDEFS
+=
-DUIP_URGDATA
=
0
-DUIP_CONF_UDP
=
ENABLE_DHCP
CDEFS
+=
-DUIP_CONF_UDP
=
ENABLE_DHCP
-DUIP_CONF_TCP
=
1
-DUIP_CONF_UDP_CONNS
=
1
-DUIP_CONF_MAX_CONNECTIONS
=
5
CDEFS
+=
-DUIP_CONF_MAX_LISTENPORTS
=
5
-DUIP_URGDATA
=
0
-DUIP_CONF_BUFFER_SIZE
=
1514
-DUIP_ARCH_CHKSUM
=
0
CDEFS
+=
-DUIP_CONF_LL_802154
=
0
-DUIP_CONF_LL_80211
=
0
-DUIP_CONF_ROUTER
=
0
-DUIP_CONF_ICMP6
=
0
CDEFS
+=
-DUIP_ARCH_ADD32
=
0
-DUIP_CONF_ICMP_DEST_UNREACH
=
1
-DUIP_NEIGHBOR_CONF_ADDRTYPE
=
0
# Place -D or -U options here for ASM sources
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment