[asterisk-commits] file: branch 1.4 r165537 - /branches/1.4/apps/app_followme.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Dec 18 10:07:37 CST 2008
Author: file
Date: Thu Dec 18 10:07:37 2008
New Revision: 165537
URL: http://svn.digium.com/view/asterisk?view=rev&rev=165537
Log:
Do not crash if we are not passed in a followme id.
(closes issue #14106)
Reported by: ys
Patches:
app_followme.c.2.diff uploaded by ys (license 281)
Modified:
branches/1.4/apps/app_followme.c
Modified: branches/1.4/apps/app_followme.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_followme.c?view=diff&rev=165537&r1=165536&r2=165537
==============================================================================
--- branches/1.4/apps/app_followme.c (original)
+++ branches/1.4/apps/app_followme.c Thu Dec 18 10:07:37 2008
@@ -960,22 +960,26 @@
AST_APP_ARG(options);
);
+ if (ast_strlen_zero(data)) {
+ ast_log(LOG_WARNING, "%s requires an argument (followmeid)\n",app);
+ return -1;
+ }
+
if (!(argstr = ast_strdupa((char *)data))) {
ast_log(LOG_ERROR, "Out of memory!\n");
return -1;
}
- if (!data) {
- ast_log(LOG_WARNING, "%s requires an argument (followmeid)\n",app);
+
+ AST_STANDARD_APP_ARGS(args, argstr);
+ if (ast_strlen_zero(args.followmeid)) {
+ ast_log(LOG_WARNING, "%s requires an argument (followmeid)\n", app);
return -1;
}
u = ast_module_user_add(chan);
- AST_STANDARD_APP_ARGS(args, argstr);
-
- if (!ast_strlen_zero(args.followmeid))
- AST_LIST_LOCK(&followmes);
+ AST_LIST_LOCK(&followmes);
AST_LIST_TRAVERSE(&followmes, f, entry) {
if (!strcasecmp(f->name, args.followmeid) && (f->active))
break;
More information about the asterisk-commits
mailing list