[Asterisk-cvs] asterisk manager.c,1.78,1.79
markster at lists.digium.com
markster at lists.digium.com
Sun Nov 14 00:51:17 CST 2004
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv20259
Modified Files:
manager.c
Log Message:
Fix possible race...
Index: manager.c
===================================================================
RCS file: /usr/cvsroot/asterisk/manager.c,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -d -r1.78 -r1.79
--- manager.c 7 Nov 2004 16:21:00 -0000 1.78
+++ manager.c 14 Nov 2004 05:52:08 -0000 1.79
@@ -614,6 +614,7 @@
char *varname = astman_get_header(m, "Variable");
char *id = astman_get_header(m,"ActionID");
char *varval;
+ char *varval2=NULL;
if (!strlen(name)) {
astman_send_error(s, m, "No channel specified");
@@ -638,11 +639,14 @@
}
varval=pbx_builtin_getvar_helper(c,varname);
-
+ if (varval)
+ varval2 = ast_strdupa(varval);
+ if (!varval2)
+ varval2 = "";
ast_mutex_unlock(&c->lock);
ast_mutex_lock(&s->lock);
ast_cli(s->fd, "Response: Success\r\n"
- "%s: %s\r\n" ,varname,varval);
+ "%s: %s\r\n" ,varname,varval2);
if (id && !ast_strlen_zero(id))
ast_cli(s->fd, "ActionID: %s\r\n",id);
ast_cli(s->fd, "\r\n");
More information about the svn-commits
mailing list