小盒子的小盒

LwIP文件修改之api\api_msg.c

0
阅读(4131)
static void do_connect(struct api_msg_msg *msg) 添加以下代码
#if LWIP_TCP     
  case NETCONN_TCP:
    /*    tcp_arg(msg->conn->pcb.tcp, msg->conn);*/
    setup_tcp(msg->conn);
    //Delete By heyunhuan At 07.03.12
    /*tcp_connect(msg->conn->pcb.tcp, msg->msg.bc.ipaddr, msg->msg.bc.port,
    do_connected);*/
    /*tcp_output(msg->conn->pcb.tcp);*/
   
    //Modify By SmallBox at 07.03.12
    {
     err_t info;
     info =  tcp_connect(msg->conn->pcb.tcp, msg->msg.bc.ipaddr, msg->msg.bc.port,
       do_connected);
     if(info == ERR_OK) {
      sys_mbox_post(msg->conn->mbox, NULL);//Add By SmallBox at 07.03.12
     } else {
      //连接失败的处理,目前我在这里还没有做处理,故无代码
     }
    }
#endif
小盒子提示:该代码的添加是根据你所使用的编译器,在做添加,否则将会出现程序不能正常运行。
我使用的编译软件为ADS1.2;