Hi,
I'm using pjsua2 API. When looking for an account with the static "lookup" function, an assertion is raised in debug mode if the account doesn't exist. I find this behviour not correct:Suppose you save the account id and want to retrieve the account object later on. If the account has been destroyed meanwhile, you get this assertion.
Moreover, the lookup behaviour for Call object is different (and is correct IMHO): looking for an inexistant call returns NULL pointer, no assertion.
My proposal is to modify the lookup function in account.cpp:
Account *Account::lookup(int acc_id)
{
{
Account *acc = NULL;
if (pjsua_acc_is_valid(acc_id) != 0)
acc = (Account*)pjsua_acc_get_user_data(acc_id);
return acc;
}
Regards,
Thibault
_______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@xxxxxxxxxxxxxxx http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org