minor bug in pjsua presence code (patch included)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've found a small bug in 1.10.
If you pjsua_acc_add an account with an invalid id (bad url), the app will 
assert-out 300 seconds later when the presence resubscribe timer occurs.

This patches the presence callback to check for a valid account.



Index: pjsip/src/pjsua-lib/pjsua_pres.c
===================================================================
--- pjsip/src/pjsua-lib/pjsua_pres.c    (revision 34428)
+++ pjsip/src/pjsua-lib/pjsua_pres.c    (revision 36179)
@@ -2175,6 +2175,9 @@
     for (i=0; i<PJ_ARRAY_SIZE(pjsua_var.acc); ++i) {
     pjsua_acc *acc = &pjsua_var.acc[i];
 
+        if (!pjsua_acc_is_valid(i))
+            continue ;
+
     /* Retry PUBLISH */
     if (acc->cfg.publish_enabled && acc->publish_sess==NULL)
         pjsua_pres_init_publish_acc(acc->index);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20110706/2fe66e24/attachment.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux