Fixed bug #32906: lwip_connect+lwip_send did not work for udp and raw pcbs with LWIP_TCPIP_CORE_LOCKING==1.

This commit is contained in:
goldsimon 2011-03-27 13:36:32 +00:00
parent 783404d8d4
commit b54c7bedfd
2 changed files with 10 additions and 2 deletions

View File

@ -237,6 +237,10 @@ HISTORY
++ Bugfixes: ++ Bugfixes:
2011-03-27: Simon Goldschmidt
* sockets.c: Fixed bug #32906: lwip_connect+lwip_send did not work for udp and
raw pcbs with LWIP_TCPIP_CORE_LOCKING==1.
2011-03-27: Simon Goldschmidt 2011-03-27: Simon Goldschmidt
* tcp_out.c: Fixed bug #32820 (Outgoing TCP connections created before route * tcp_out.c: Fixed bug #32820 (Outgoing TCP connections created before route
is present never times out) by starting retransmission timer before checking is present never times out) by starting retransmission timer before checking

View File

@ -847,8 +847,12 @@ lwip_sendto(int s, const void *data, size_t size, int flags,
inet_addr_to_ipaddr_p(remote_addr, &to_in->sin_addr); inet_addr_to_ipaddr_p(remote_addr, &to_in->sin_addr);
remote_port = ntohs(to_in->sin_port); remote_port = ntohs(to_in->sin_port);
} else { } else {
remote_addr = IP_ADDR_ANY; remote_addr = &sock->conn->pcb.raw->remote_ip;
remote_port = 0; if (sock->conn->type == NETCONN_RAW) {
remote_port = 0;
} else {
remote_port = sock->conn->pcb.udp->remote_port;
}
} }
LOCK_TCPIP_CORE(); LOCK_TCPIP_CORE();