Ignore:
Timestamp:
Aug 8, 2006 2:04:21 PM (18 years ago)
Author:
bennylp
Message:

Fixed bugs in client registration (sip_regc.c): when re-registration failed to send the request, application callback is not called.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip-ua/sip_reg.c

    r662 r663  
    470470    status = pjsip_regc_register(regc, 1, &tdata); 
    471471    if (status == PJ_SUCCESS) { 
    472         pjsip_regc_send(regc, tdata); 
    473     } else { 
     472        status = pjsip_regc_send(regc, tdata); 
     473    }  
     474     
     475    if (status != PJ_SUCCESS) { 
    474476        char errmsg[PJ_ERR_MSG_SIZE]; 
    475477        pj_str_t reason = pj_strerror(status, errmsg, sizeof(errmsg)); 
     
    508510 
    509511        if (status == PJ_SUCCESS) { 
    510             pjsip_regc_send(regc, tdata); 
    511             return; 
    512         } else { 
     512            status = pjsip_regc_send(regc, tdata); 
     513        }  
     514         
     515        if (status != PJ_SUCCESS) { 
    513516            call_callback(regc, status, tsx->status_code,  
    514517                          &rdata->msg_info.msg->line.status.reason, 
    515518                          rdata, -1, 0, NULL); 
    516519        } 
     520 
     521        return; 
     522 
    517523    } else { 
    518524        int contact_cnt = 0; 
Note: See TracChangeset for help on using the changeset viewer.