- Timestamp:
- Jan 26, 2007 5:13:56 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip-ua/sip_reg.c
r891 r908 526 526 527 527 528 if (!regc->cb) 529 return; 530 528 531 cbparam.regc = regc; 529 532 cbparam.token = regc->token; … … 551 554 PJ_UNUSED_ARG(timer_heap); 552 555 556 /* Temporarily increase busy flag to prevent regc from being deleted 557 * in pjsip_regc_send() 558 */ 559 regc->busy++; 560 553 561 entry->id = 0; 554 562 status = pjsip_regc_register(regc, 1, &tdata); … … 557 565 } 558 566 559 if (status != PJ_SUCCESS ) {567 if (status != PJ_SUCCESS && regc->cb) { 560 568 char errmsg[PJ_ERR_MSG_SIZE]; 561 569 pj_str_t reason = pj_strerror(status, errmsg, sizeof(errmsg)); 562 570 call_callback(regc, status, 400, &reason, NULL, -1, 0, NULL); 571 } 572 573 regc->busy--; 574 575 /* Delete the record if user destroy regc during the callback. */ 576 if (regc->_delete_flag && regc->busy==0) { 577 pjsip_regc_destroy(regc); 563 578 } 564 579 }
Note: See TracChangeset
for help on using the changeset viewer.