From: Michael Jerris Date: Mon, 28 Jul 2008 15:55:24 +0000 (+0000) Subject: handle invalid events X-Git-Tag: v1.0.2~1544 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=423275120c6028a656c13e4dc781d22d3aa32e51;p=thirdparty%2Ffreeswitch.git handle invalid events git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9183 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/applications/mod_conference/mod_conference.c b/src/mod/applications/mod_conference/mod_conference.c index c3194d41dc..7cadba3cee 100644 --- a/src/mod/applications/mod_conference/mod_conference.c +++ b/src/mod/applications/mod_conference/mod_conference.c @@ -1828,13 +1828,14 @@ static void conference_loop_output(conference_member_t *member) char *body = switch_event_get_body(event); char *p, *freeme = NULL; - if ((p = strchr(to, '+')) && strncmp(to, CONF_CHAT_PROTO, strlen(CONF_CHAT_PROTO))) { - freeme = switch_mprintf("%s+%s@%s", CONF_CHAT_PROTO, member->conference->name, member->conference->domain); - to = freeme; + if (to && from && body) { + if ((p = strchr(to, '+')) && strncmp(to, CONF_CHAT_PROTO, strlen(CONF_CHAT_PROTO))) { + freeme = switch_mprintf("%s+%s@%s", CONF_CHAT_PROTO, member->conference->name, member->conference->domain); + to = freeme; + } + chat_send(proto, from, to, subject, body, hint); + switch_safe_free(freeme); } - - chat_send(proto, from, to, subject, body, hint); - switch_safe_free(freeme); switch_event_destroy(&event); }