lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #19157] lwip_close problems


From: Frédéric Bernon
Subject: [lwip-devel] [bug #19157] lwip_close problems
Date: Mon, 26 Mar 2007 07:31:42 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3

Follow-up Comment #5, bug #19157 (project lwip):

Can I get some comments about that (I have to test, but it's about the
polling feature) :

err_t
netconn_close(struct netconn *conn)
{
  struct api_msg msg;

  if (conn == NULL) {
    return ERR_VAL;
  }

  conn->state = NETCONN_CLOSE;
 again:
  msg.type = API_MSG_CLOSE;
  msg.msg.conn = conn;
  api_msg_post(&msg);
  if (conn->err == ERR_MEM && conn->sem != SYS_SEM_NULL) {
    sys_sem_wait(conn->sem);
    goto again;
  }
  if (conn->type==NETCONN_TCP) {
    if (((conn->pcb.tcp->unacked!=NULL) || (conn->pcb.tcp->unsent!=NULL)) &&
(conn->err==ERR_OK)) {
      sys_msleep(1);//I don't like that, but...
      goto again;
    }
  }
  conn->state = NETCONN_NONE;
  return conn->err;
}


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?19157>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.nongnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]