]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
If variable gotten is not set, will segfault on Solaris.
authorTilghman Lesher <tilghman@meg.abyt.es>
Fri, 16 Jul 2010 18:04:11 +0000 (18:04 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Fri, 16 Jul 2010 18:04:11 +0000 (18:04 +0000)
(closes issue #17636)
 Reported by: bklang

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@277261 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/manager.c

index fec3dc0706fef5ee957c85585cbb727ca0e72c36..80841789c3d2b36ccb617d9002b6e38b79b98e35 100644 (file)
@@ -1592,7 +1592,7 @@ static int action_getvar(struct mansession *s, const struct message *m)
        if (c)
                ast_channel_unlock(c);
        astman_append(s, "Response: Success\r\n"
-               "Variable: %s\r\nValue: %s\r\n", varname, varval);
+               "Variable: %s\r\nValue: %s\r\n", varname, S_OR(varval, ""));
        if (!ast_strlen_zero(id))
                astman_append(s, "ActionID: %s\r\n",id);
        astman_append(s, "\r\n");