]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
tweak
authorAnthony Minessale <anthony.minessale@gmail.com>
Fri, 19 Sep 2008 19:03:50 +0000 (19:03 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Fri, 19 Sep 2008 19:03:50 +0000 (19:03 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9602 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_commands/mod_commands.c

index 04ad0e8d7bcfaf61d5b93ad5000c286f8210e096..c6882cb98172da8285dd7e75fe94134d3628df95 100644 (file)
@@ -2417,6 +2417,10 @@ SWITCH_STANDARD_API(uuid_dump_function)
                        char *uuid = argv[0];
                        char *format = argv[1];
 
+                       if (!format) {
+                               format = "txt";
+                       }
+
                        if ((psession = switch_core_session_locate(uuid))) {
                                switch_channel_t *channel;
                                switch_event_t *event;
@@ -2427,7 +2431,7 @@ SWITCH_STANDARD_API(uuid_dump_function)
                                if (switch_event_create(&event, SWITCH_EVENT_MESSAGE) == SWITCH_STATUS_SUCCESS) {
                                        switch_xml_t xml;
                                        switch_channel_event_set_data(channel, event);
-                                       if (format && !strcasecmp(format, "xml")) {
+                                       if (!strcasecmp(format, "xml")) {
                                                if ((xml = switch_event_xmlize(event, "%s", ""))) {
                                                        buf = switch_xml_toxml(xml, SWITCH_FALSE);
                                                        switch_xml_free(xml);
@@ -2438,7 +2442,7 @@ SWITCH_STANDARD_API(uuid_dump_function)
                                                        goto done;
                                                }
                                        } else {
-                                               switch_event_serialize(event, &buf, SWITCH_TRUE);
+                                               switch_event_serialize(event, &buf, strcasecmp(format, "plain"));
                                        }
 
                                        switch_assert(buf);