/[lwip]/lwip/src/api/api_lib.c
ViewVC logotype

Diff of /lwip/src/api/api_lib.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by jani, Wed Jan 22 16:18:05 2003 UTC revision 1.5 by jani, Fri Jan 24 09:24:44 2003 UTC
# Line 279  netconn_type(struct netconn *conn) Line 279  netconn_type(struct netconn *conn)
279  }  }
280  /*-----------------------------------------------------------------------------------*/  /*-----------------------------------------------------------------------------------*/
281  err_t  err_t
282  netconn_peer(struct netconn *conn, struct ip_addr **addr,  netconn_peer(struct netconn *conn, struct ip_addr *addr,
283               u16_t *port)               u16_t *port)
284  {  {
285    switch(conn->type) {    switch(conn->type) {
# Line 288  netconn_peer(struct netconn *conn, struc Line 288  netconn_peer(struct netconn *conn, struc
288    case NETCONN_UDP:    case NETCONN_UDP:
289      if ((conn->pcb.udp->flags & UDP_FLAGS_CONNECTED) == 0)      if ((conn->pcb.udp->flags & UDP_FLAGS_CONNECTED) == 0)
290       return -1;       return -1;
291      *addr = &(conn->pcb.udp->remote_ip);      *addr = (conn->pcb.udp->remote_ip);
292      *port = conn->pcb.udp->remote_port;      *port = conn->pcb.udp->remote_port;
293      break;      break;
294    case NETCONN_TCP:    case NETCONN_TCP:
295      *addr = &(conn->pcb.tcp->remote_ip);      *addr = (conn->pcb.tcp->remote_ip);
296      *port = conn->pcb.tcp->remote_port;      *port = conn->pcb.tcp->remote_port;
297      break;      break;
298    }    }
# Line 394  netconn_disconnect(struct netconn *conn) Line 394  netconn_disconnect(struct netconn *conn)
394    msg->type = API_MSG_DISCONNECT;    msg->type = API_MSG_DISCONNECT;
395    msg->msg.conn = conn;      msg->msg.conn = conn;  
396    api_msg_post(msg);    api_msg_post(msg);
397      sys_mbox_fetch(conn->mbox, NULL);
398    memp_freep(MEMP_API_MSG, msg);    memp_freep(MEMP_API_MSG, msg);
399    return conn->err;    return conn->err;
400    

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26