Changeset 6141


Ignore:
Timestamp:
Jan 29, 2020 3:48:51 AM (4 years ago)
Author:
nanang
Message:

Misc (#2210): Added early check whether account is registered before sending unregistration in pjsua_acc_modify() (thanks to Peter Koletzki for the suggestion).

File:
1 edited

Legend:

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

    r6137 r6141  
    14111411    /* Unregister first */ 
    14121412    if (unreg_first) { 
    1413         status = pjsua_acc_set_registration(acc->index, PJ_FALSE); 
    1414         if (status != PJ_SUCCESS) { 
    1415             pjsua_perror(THIS_FILE, "Ignored failure in unregistering the " 
    1416                          "old account setting in modifying account", status); 
    1417             /* Not really sure if we should return error */ 
    1418             status = PJ_SUCCESS; 
     1413        if (acc->regc) { 
     1414            status = pjsua_acc_set_registration(acc->index, PJ_FALSE); 
     1415            if (status != PJ_SUCCESS) { 
     1416                pjsua_perror(THIS_FILE, "Ignored failure in unregistering the " 
     1417                             "old account setting in modifying account", 
     1418                             status); 
     1419                /* Not really sure if we should return error */ 
     1420                status = PJ_SUCCESS; 
     1421            } 
    14191422        } 
    14201423        if (acc->regc != NULL) { 
Note: See TracChangeset for help on using the changeset viewer.