]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
don't print null in show commands return values.
authorMichael Jerris <mike@jerris.com>
Thu, 8 Feb 2007 18:10:21 +0000 (18:10 +0000)
committerMichael Jerris <mike@jerris.com>
Thu, 8 Feb 2007 18:10:21 +0000 (18:10 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4166 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_commands/mod_commands.c

index 6d5c58c130e3722bd9777fca20c6643020bd84bf..cc9c26da1e6305c302eba7dee0ef3513867e4019 100644 (file)
@@ -590,9 +590,9 @@ static int show_callback(void *pArg, int argc, char **argv, char **columnNames){
        for(x = 0; x < argc; x++) {
                if (holder->http) {
                        holder->stream->write_function(holder->stream, "<td>");
-                       holder->stream->write_function(holder->stream, "%s%s", argv[x], x == (argc - 1) ? "</td></tr>\n" : "</td><td>");
+                       holder->stream->write_function(holder->stream, "%s%s", argv[x] ? argv[x] : "", x == (argc - 1) ? "</td></tr>\n" : "</td><td>");
                } else {
-                       holder->stream->write_function(holder->stream, "%s%s", argv[x], x == (argc - 1) ? "\n" : ",");
+                       holder->stream->write_function(holder->stream, "%s%s", argv[x] ? argv[x] : "", x == (argc - 1) ? "\n" : ",");
                }
        }