[commit] r1885 - freeswitch/trunk/src/mod/applications/mod_conference
Author: anthm Date: Fri Jul 14 17:15:26 2006 New Revision: 1885 Modified: freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c Log: fix command parser Modified: freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c ============================================================================== --- freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c (original) +++ freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c Fri Jul 14 17:15:26 2006 @@ -1423,14 +1423,29 @@ } } else if (!strcasecmp(argv[1], "saymember")) { char *tbuf = NULL, *text, *name; - uint32_t id = atoi(argv[3]); + uint32_t id; conference_member_t *member; + if (argc > 3) { + id = atoi(argv[3]); + } else { + stream->write_function(stream, "(saymember) Syntax Error!"); + goto done; + } + if ((tbuf = strdup(buf))) { if ((name = strstr(tbuf, "saymember "))) { name += 10; - text = strchr(name, ' '); - id = atoi(name); + + if (*name) { + text = strchr(name, ' '); + id = atoi(name); + } else { + stream->write_function(stream, "(saymember) Syntax Error!"); + goto done; + } + + if ((member = conference_member_get(conference, id))) { if (text && conference_member_say(conference, member, text, 0) == SWITCH_STATUS_SUCCESS) {
participants (1)
-
Freeswitch SVN