lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] netconn_bind crashes when ip_addr is NULL


From: Sergio PérezAlcañiz
Subject: [lwip-users] netconn_bind crashes when ip_addr is NULL
Date: Tue, 15 Apr 2003 10:44:44 +0200 (CEST)
User-agent: IMP/PHP IMAP webmail program 2.2.3

Hello, I've just ported the latest CVS version of lwIP to RT-Linux, and one
example I wrote for the before porting (0.5.3) crashes now when trying to bind
to a localhost ip_addr (when using the sequential API). The line marked with
---> crashes then ipaddr is NULL. In the previous version (0.5.3) binding to
NULL meant that the udpserver got binded to the default local ip_addr. Maybe the
meaning of this has changed in the latest version???

  static struct netconn *conn;
  static struct netbuf *buf;
  char buffer[4096];
  struct ip_addr ipaddr;

  conn = netconn_new(NETCONN_UDP);

  IP4_ADDR(&ipaddr, 158,42,53,14);

----->   netconn_bind(conn, &ipaddr, 8);  //  netconn_bind(conn, NULL, 8);

  while(1) {
    buf = netconn_recv(conn);
    netbuf_copy(buf, buffer, sizeof(buffer));
    printf("----------- UDP echo server got: %s -------------\n", buffer);
    netbuf_delete(buf);
  }



Regards.
Sergio




reply via email to

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