Bug report: pjsua_acc_modify does not modify lock_codec

HB
Håkan Berg
Wed, Oct 17, 2018 8:58 AM

Hi,
I'm unable to make pjsua_acc_modify() change the lock_codec setting. Example:

      pjsua_acc_config account_cfg = { 0 };
      ...
      account_cfg.lock_codec = 0;

      printf("account_cfg.lock_codec: %d\n", account_cfg.lock_codec);
      pj_status_t status = pjsua_acc_modify(account_id, &account_cfg);
      printf("status: %s, account_cfg.lock_codec: %d\n", status == PJ_SUCCESS ? "success" : "error", account_cfg.lock_codec);
      
      status = pjsua_acc_get_config(account_id, tmp_pool, &account_cfg);
      printf("status: %s, account_cfg.lock_codec: %d\n", status == PJ_SUCCESS ? "success" : "error", account_cfg.lock_codec);

Console output:

account_cfg.lock_codec: 0
10:54:00.739            pjsua_acc.c !Modifying account 0
status: success, account_cfg.lock_codec: 0
status: success, account_cfg.lock_codec: 1

Is this a bug?

Br,
/Håkan

Hi, I'm unable to make pjsua_acc_modify() change the lock_codec setting. Example: pjsua_acc_config account_cfg = { 0 }; ... account_cfg.lock_codec = 0; printf("account_cfg.lock_codec: %d\n", account_cfg.lock_codec); pj_status_t status = pjsua_acc_modify(account_id, &account_cfg); printf("status: %s, account_cfg.lock_codec: %d\n", status == PJ_SUCCESS ? "success" : "error", account_cfg.lock_codec); status = pjsua_acc_get_config(account_id, tmp_pool, &account_cfg); printf("status: %s, account_cfg.lock_codec: %d\n", status == PJ_SUCCESS ? "success" : "error", account_cfg.lock_codec); Console output: account_cfg.lock_codec: 0 10:54:00.739 pjsua_acc.c !Modifying account 0 status: success, account_cfg.lock_codec: 0 status: success, account_cfg.lock_codec: 1 Is this a bug? Br, /Håkan
M
Ming
Thu, Oct 18, 2018 5:33 AM

Hi Hakan,

Yes, it's a bug. I just fixed this in r5900
(https://trac.pjsip.org/repos/changeset/5900).

Thanks for the report.

Best regards,
Ming

On Wed, Oct 17, 2018 at 4:58 PM, Håkan Berg hakan.berg@axis.com wrote:

Hi,
I'm unable to make pjsua_acc_modify() change the lock_codec setting. Example:

       pjsua_acc_config account_cfg = { 0 };
       ...
       account_cfg.lock_codec = 0;

       printf("account_cfg.lock_codec: %d\n", account_cfg.lock_codec);
       pj_status_t status = pjsua_acc_modify(account_id, &account_cfg);
       printf("status: %s, account_cfg.lock_codec: %d\n", status == PJ_SUCCESS ? "success" : "error", account_cfg.lock_codec);

       status = pjsua_acc_get_config(account_id, tmp_pool, &account_cfg);
       printf("status: %s, account_cfg.lock_codec: %d\n", status == PJ_SUCCESS ? "success" : "error", account_cfg.lock_codec);

Console output:

account_cfg.lock_codec: 0
10:54:00.739            pjsua_acc.c !Modifying account 0
status: success, account_cfg.lock_codec: 0
status: success, account_cfg.lock_codec: 1

Is this a bug?

Br,
/Håkan


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

Hi Hakan, Yes, it's a bug. I just fixed this in r5900 (https://trac.pjsip.org/repos/changeset/5900). Thanks for the report. Best regards, Ming On Wed, Oct 17, 2018 at 4:58 PM, Håkan Berg <hakan.berg@axis.com> wrote: > Hi, > I'm unable to make pjsua_acc_modify() change the lock_codec setting. Example: > > pjsua_acc_config account_cfg = { 0 }; > ... > account_cfg.lock_codec = 0; > > printf("account_cfg.lock_codec: %d\n", account_cfg.lock_codec); > pj_status_t status = pjsua_acc_modify(account_id, &account_cfg); > printf("status: %s, account_cfg.lock_codec: %d\n", status == PJ_SUCCESS ? "success" : "error", account_cfg.lock_codec); > > status = pjsua_acc_get_config(account_id, tmp_pool, &account_cfg); > printf("status: %s, account_cfg.lock_codec: %d\n", status == PJ_SUCCESS ? "success" : "error", account_cfg.lock_codec); > > > Console output: > > account_cfg.lock_codec: 0 > 10:54:00.739 pjsua_acc.c !Modifying account 0 > status: success, account_cfg.lock_codec: 0 > status: success, account_cfg.lock_codec: 1 > > > Is this a bug? > > Br, > /Håkan > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org