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

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

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

revision 1.9 by jani, Fri Mar 21 10:48:21 2003 UTC revision 1.9.2.1 by likewise, Wed May 14 14:38:27 2003 UTC
# Line 57  tcpip_tcp_timer(void *arg) Line 57  tcpip_tcp_timer(void *arg)
57    (void)arg;    (void)arg;
58    
59    tcp_tmr();    tcp_tmr();
60    if(tcp_active_pcbs || tcp_tw_pcbs) {    if (tcp_active_pcbs || tcp_tw_pcbs) {
61          sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL);          sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL);
62    } else {    } else {
63          tcpip_tcp_timer_active = 0;          tcpip_tcp_timer_active = 0;
# Line 67  tcpip_tcp_timer(void *arg) Line 67  tcpip_tcp_timer(void *arg)
67  void  void
68  tcp_timer_needed(void)  tcp_timer_needed(void)
69  {  {
70    if(!tcpip_tcp_timer_active && (tcp_active_pcbs || tcp_tw_pcbs)) {    if (!tcpip_tcp_timer_active && (tcp_active_pcbs || tcp_tw_pcbs)) {
71          tcpip_tcp_timer_active = 1;          tcpip_tcp_timer_active = 1;
72          sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL);          sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL);
73    }    }
# Line 88  tcpip_thread(void *arg) Line 88  tcpip_thread(void *arg)
88  #if LWIP_TCP  #if LWIP_TCP
89    tcp_init();    tcp_init();
90  #endif  #endif
91    if(tcpip_init_done != NULL) {    if (tcpip_init_done != NULL) {
92      tcpip_init_done(tcpip_init_done_arg);      tcpip_init_done(tcpip_init_done_arg);
93    }    }
94    
95    while(1) {                          /* MAIN Loop */    while (1) {                          /* MAIN Loop */
96      sys_mbox_fetch(mbox, (void *)&msg);      sys_mbox_fetch(mbox, (void *)&msg);
97      switch(msg->type) {      switch (msg->type) {
98      case TCPIP_MSG_API:      case TCPIP_MSG_API:
99        DEBUGF(TCPIP_DEBUG, ("tcpip_thread: API message %p\n", (void *)msg));        DEBUGF(TCPIP_DEBUG, ("tcpip_thread: API message %p\n", (void *)msg));
100        api_msg_input(msg->msg.apimsg);        api_msg_input(msg->msg.apimsg);
# Line 120  tcpip_input(struct pbuf *p, struct netif Line 120  tcpip_input(struct pbuf *p, struct netif
120    struct tcpip_msg *msg;    struct tcpip_msg *msg;
121        
122    msg = memp_mallocp(MEMP_TCPIP_MSG);    msg = memp_mallocp(MEMP_TCPIP_MSG);
123    if(msg == NULL) {    if (msg == NULL) {
124      pbuf_free(p);          pbuf_free(p);    
125      return ERR_MEM;        return ERR_MEM;  
126    }    }
# Line 138  tcpip_callback(void (*f)(void *ctx), voi Line 138  tcpip_callback(void (*f)(void *ctx), voi
138    struct tcpip_msg *msg;    struct tcpip_msg *msg;
139        
140    msg = memp_mallocp(MEMP_TCPIP_MSG);    msg = memp_mallocp(MEMP_TCPIP_MSG);
141    if(msg == NULL) {    if (msg == NULL) {
142      return ERR_MEM;        return ERR_MEM;  
143    }    }
144        
# Line 154  tcpip_apimsg(struct api_msg *apimsg) Line 154  tcpip_apimsg(struct api_msg *apimsg)
154  {  {
155    struct tcpip_msg *msg;    struct tcpip_msg *msg;
156    msg = memp_mallocp(MEMP_TCPIP_MSG);    msg = memp_mallocp(MEMP_TCPIP_MSG);
157    if(msg == NULL) {    if (msg == NULL) {
158      memp_free(MEMP_API_MSG, apimsg);      memp_free(MEMP_API_MSG, apimsg);
159      return;      return;
160    }    }

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.9.2.1

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