lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] TCP listen fucntion always return <=0


From: Oscar F
Subject: Re: [lwip-users] TCP listen fucntion always return <=0
Date: Fri, 18 Sep 2009 10:48:12 +0200

The function with error is lwip_listen(lSocket[i],10) != 0, the first time return 0 but then return -1 for the next socket.

The cause of this mistake is in this function:
netconn_listen_with_backlog(
struct netconn *conn, u8_t backlog)
{
  struct api_msg msg;

  /* This does no harm. If TCP_LISTEN_BACKLOG is off, backlog is unused. */
  LWIP_UNUSED_ARG(backlog);

  LWIP_ERROR("netconn_listen: invalid conn", (conn != NULL), return ERR_ARG;);

  msg.function = do_listen;
  msg.msg.conn = conn;
#if TCP_LISTEN_BACKLOG
  msg.msg.msg.lb.backlog = backlog;
#endif /* TCP_LISTEN_BACKLOG */
  TCPIP_APIMSG(&msg);
  return conn->err;
}

but i don´t know the cause exactly
Thanks
Oscar







On Fri, Sep 18, 2009 at 10:44 AM, Kieran Mansley <address@hidden> wrote:
On Fri, 2009-09-18 at 10:39 +0200, Oscar F wrote:
> Is here where the error apperad, error en el conn, maybe always is the
> same

I'm afraid I don't understand what your asking.

What is MEMP_NUM_NETCONN set to?

Is errno set after you call lwip_listen()?

Kieran




_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users


reply via email to

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