[Freeswitch-svn] [commit] r7006 - freeswitch/trunk/src/mod/applications/mod_commands
Freeswitch SVN
mikej at freeswitch.org
Fri Dec 28 16:14:44 EST 2007
Author: mikej
Date: Fri Dec 28 16:14:44 2007
New Revision: 7006
Modified:
freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c
Log:
handle error case in uuid_dump.
Modified: freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c Fri Dec 28 16:14:44 2007
@@ -2012,12 +2012,16 @@
switch_assert(channel != NULL);
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")) {
- switch_xml_t xml;
if ((xml = switch_event_xmlize(event, "%s", ""))) {
buf = switch_xml_toxml(xml, SWITCH_FALSE);
switch_xml_free(xml);
+ } else {
+ stream->write_function(stream, "-ERR Unable to create xml!\n");
+ switch_core_session_rwunlock(psession);
+ goto done;
}
} else {
switch_event_serialize(event, &buf, SWITCH_TRUE);
More information about the Freeswitch-svn
mailing list