Ignore:
Timestamp:
Oct 27, 2014 7:36:08 AM (10 years ago)
Author:
nanang
Message:

Fix #1801:

  • put error check in re-registration attempt in pjsua_acc_modify(),
  • updated pjsua_acc_modify() docs about its behavior regarding unregistration and re-registration.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c

    r4947 r4955  
    13341334    /* Unregister first */ 
    13351335    if (unreg_first) { 
    1336         pjsua_acc_set_registration(acc->index, PJ_FALSE); 
     1336        status = pjsua_acc_set_registration(acc->index, PJ_FALSE); 
     1337        if (status != PJ_SUCCESS) { 
     1338            pjsua_perror(THIS_FILE, "Ignored failure in unregistering the " 
     1339                         "old account setting in modifying account", status); 
     1340            /* Not really sure if we should return error */ 
     1341            status = PJ_SUCCESS; 
     1342        } 
    13371343        if (acc->regc != NULL) { 
    13381344            pjsip_regc_destroy(acc->regc); 
     
    13511357    if (update_reg) { 
    13521358        /* If accounts has registration enabled, start registration */ 
    1353         if (acc->cfg.reg_uri.slen) 
    1354             pjsua_acc_set_registration(acc->index, PJ_TRUE); 
     1359        if (acc->cfg.reg_uri.slen) { 
     1360            status = pjsua_acc_set_registration(acc->index, PJ_TRUE); 
     1361            if (status != PJ_SUCCESS) { 
     1362                pjsua_perror(THIS_FILE, "Failed to register with new account " 
     1363                             "setting in modifying account", status); 
     1364                goto on_return; 
     1365            } 
     1366        } 
    13551367    } 
    13561368 
    13571369    /* Update MWI subscription */ 
    13581370    if (update_mwi) { 
    1359         pjsua_start_mwi(acc_id, PJ_TRUE); 
     1371        status = pjsua_start_mwi(acc_id, PJ_TRUE); 
     1372        if (status != PJ_SUCCESS) { 
     1373            pjsua_perror(THIS_FILE, "Failed in starting MWI subscription for " 
     1374                         "new account setting in modifying account", status); 
     1375        } 
    13601376    } 
    13611377 
Note: See TracChangeset for help on using the changeset viewer.