Changeset 4955
- Timestamp:
- Oct 27, 2014 7:36:08 AM (10 years ago)
- Location:
- pjproject/trunk/pjsip
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h
r4929 r4955 3645 3645 3646 3646 /** 3647 * Modify account information. 3648 * 3647 * Modify account configuration setting. This function may trigger 3648 * unregistration (of old account setting) and re-registration (of the new 3649 * account setting), e.g: changing account ID, credential, registar, or 3650 * proxy setting. 3651 * 3652 * Note: 3653 * - when the new config triggers unregistration, the pjsua callback 3654 * on_reg_state()/on_reg_state2() for the unregistration will not be called 3655 * and any failure in the unregistration will be ignored, so if application 3656 * needs to be sure about the unregistration status, it should unregister 3657 * manually and wait for the callback before calling this function 3658 * - when the new config triggers re-registration and the re-registration 3659 * fails, the account setting will not be reverted back to the old setting 3660 * and the account will be in unregistered state. 3661 * 3649 3662 * @param acc_id Id of the account to be modified. 3650 3663 * @param acc_cfg New account configuration. -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c
r4947 r4955 1334 1334 /* Unregister first */ 1335 1335 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 } 1337 1343 if (acc->regc != NULL) { 1338 1344 pjsip_regc_destroy(acc->regc); … … 1351 1357 if (update_reg) { 1352 1358 /* 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 } 1355 1367 } 1356 1368 1357 1369 /* Update MWI subscription */ 1358 1370 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 } 1360 1376 } 1361 1377
Note: See TracChangeset
for help on using the changeset viewer.