[asterisk-addons-commits] mnicholson: branch mnicholson/chan-mobile-refactor r769 - /team/mnicholson/ch...
SVN commits to the Asterisk addons project
asterisk-addons-commits at lists.digium.com
Fri Jan 30 11:44:49 CST 2009
Author: mnicholson
Date: Fri Jan 30 11:44:49 2009
New Revision: 769
URL: http://svn.digium.com/svn-view/asterisk-addons?view=rev&rev=769
Log:
use sscanf instead of atoi to parse the discover_interval
Modified:
team/mnicholson/chan-mobile-refactor/channels/chan_mobile.c
Modified: team/mnicholson/chan-mobile-refactor/channels/chan_mobile.c
URL: http://svn.digium.com/svn-view/asterisk-addons/team/mnicholson/chan-mobile-refactor/channels/chan_mobile.c?view=diff&rev=769&r1=768&r2=769
==============================================================================
--- team/mnicholson/chan-mobile-refactor/channels/chan_mobile.c (original)
+++ team/mnicholson/chan-mobile-refactor/channels/chan_mobile.c Fri Jan 30 11:44:49 2009
@@ -2786,7 +2786,9 @@
/* parse [general] section */
for (v = ast_variable_browse(cfg, "general"); v; v = v->next) {
if (!strcasecmp(v->name, "interval")) {
- discovery_interval = atoi(v->value);
+ if (!sscanf(v->value, "%d", &discovery_interval)) {
+ ast_log(LOG_NOTICE, "error parsing 'interval' in general section, using default value\n");
+ }
}
}
More information about the asterisk-addons-commits
mailing list