bug #27352: removed packing from ip_addr_t, the packed version is now only used in protocol headers. Added global storage for current src/dest IP address while in input functions.

This commit is contained in:
goldsimon
2010-05-22 21:11:02 +00:00
parent 9bfeb4e5af
commit f7479781c1
18 changed files with 178 additions and 135 deletions

View File

@@ -473,7 +473,7 @@ netconn_recv(struct netconn *conn, struct netbuf **new_buf)
buf->p = p;
buf->ptr = p;
buf->port = 0;
buf->addr = NULL;
ip_addr_set_any(&buf->addr);
*new_buf = buf;
/* don't set conn->last_err: it's only ERR_OK, anyway */
return ERR_OK;
@@ -527,7 +527,7 @@ err_t
netconn_sendto(struct netconn *conn, struct netbuf *buf, ip_addr_t *addr, u16_t port)
{
if (buf != NULL) {
buf->addr = addr;
ip_addr_set(&buf->addr, addr);
buf->port = port;
return netconn_send(conn, buf);
}