From 1affd782042d0b1c30156e604147e9c8b8078cf5 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Sat, 26 Apr 2014 15:41:34 -0400 Subject: [PATCH] we only call this with values, and it would crash if you passed it null anyways, just assert to make it 100% clear --- src/mod/endpoints/mod_sofia/mod_sofia.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index 26ad9f4063..495d952cb7 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -5341,10 +5341,10 @@ static void general_event_handler(switch_event_t *event) void write_csta_xml_chunk(switch_event_t *event, switch_stream_handle_t stream, const char *csta_event, char *fwdtype) { const char *device = switch_event_get_header(event, "device"); + + switch_assert(csta_event); - if (csta_event) { - stream.write_function(&stream, "\n<%s xmlns=\"http://www.ecma-international.org/standards/ecma-323/csta/ed3\">\n", csta_event); - } + stream.write_function(&stream, "\n<%s xmlns=\"http://www.ecma-international.org/standards/ecma-323/csta/ed3\">\n", csta_event); if (device) { stream.write_function(&stream, " %s\n", device); @@ -5389,9 +5389,7 @@ void write_csta_xml_chunk(switch_event_t *event, switch_stream_handle_t stream, } } - if (csta_event) { - stream.write_function(&stream, "\n", csta_event); - } + stream.write_function(&stream, "\n", csta_event); } switch_status_t list_profiles_full(const char *line, const char *cursor, switch_console_callback_match_t **matches, switch_bool_t show_aliases)