Changeset 48092 in vbox for trunk/src/VBox/Devices/Network/lwip-new/src/api/tcpip.c
- Timestamp:
- Aug 27, 2013 4:35:28 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/lwip-new/src/api/tcpip.c
r47886 r48092 53 53 static tcpip_init_done_fn tcpip_init_done; 54 54 static void *tcpip_init_done_arg; 55 56 static tcpip_fini_done_fn tcpip_fini_done;57 static void *tcpip_fini_done_arg;58 59 55 static sys_mbox_t mbox; 60 56 … … 150 146 msg->msg.cb.function(msg->msg.cb.ctx); 151 147 break; 152 # ifdef VBOX 153 case TCPIP_MSG_TERM: 154 UNLOCK_TCPIP_CORE(); 148 149 #ifdef VBOX 150 case TCPIP_MSG_CALLBACK_TERMINATE: 151 LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: CALLBACK_TERMINATE %p\n", (void *)msg)); 152 if (msg->msg.cb.function != NULL) { 153 msg->msg.cb.function(msg->msg.cb.ctx); 154 } 155 155 goto terminate; 156 # 156 #endif 157 157 158 158 default: … … 162 162 } 163 163 } 164 # 164 #ifdef VBOX 165 165 terminate: 166 if (tcpip_fini_done != NULL)167 tcpip_fini_done(tcpip_fini_done_arg);166 /* XXX: TODO: lwip cleanup? */ 167 UNLOCK_TCPIP_CORE(); 168 168 #endif 169 169 } … … 471 471 */ 472 472 void 473 #ifdef VBOX 474 tcpip_init(tcpip_init_done_fn initfunc, 475 void *init_arg, 476 tcpip_fini_done_fn finifunc, 477 void *fini_arg) 478 #else 479 tcpip_init(tcpip_init_done_fn initfunc, 480 void *init_arg) 481 #endif 473 tcpip_init(tcpip_init_done_fn initfunc, void *arg) 482 474 { 483 475 lwip_init(); 484 476 485 477 tcpip_init_done = initfunc; 486 tcpip_init_done_arg = init_arg; 487 #ifdef VBOX 488 tcpip_fini_done = finifunc; 489 tcpip_fini_done_arg = fini_arg; 490 #endif 478 tcpip_init_done_arg = arg; 491 479 if(sys_mbox_new(&mbox, TCPIP_MBOX_SIZE) != ERR_OK) { 492 480 LWIP_ASSERT("failed to create tcpip_thread mbox", 0); … … 539 527 } 540 528 541 # ifdef VBOX542 void543 tcpip_terminate(void)544 {545 static struct tcpip_msg msg;546 msg.type = TCPIP_MSG_TERM;547 sys_mbox_post(&mbox, &msg);548 }549 # endif550 529 #endif /* !NO_SYS */
Note:
See TracChangeset
for help on using the changeset viewer.