提交 3b09338c authored 作者: Anthony Minessale's avatar Anthony Minessale

more socket stuff

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2263 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 44095d48
......@@ -254,6 +254,7 @@ static switch_status_t read_packet(listener_t *listener, switch_event_t **event,
if (*mbuf == '\r' || *mbuf == '\n') { /* bah */
ptr = mbuf;
mbuf[0] = '\0';
continue;
}
......@@ -460,6 +461,9 @@ static switch_status_t parse_command(listener_t *listener, switch_event_t *event
snprintf(reply, reply_len, "-ERR invalid log level");
}
} else if (!strncasecmp(cmd, "nolog", 5)) {
void *pop;
while (switch_queue_trypop(listener->log_queue, &pop) == SWITCH_STATUS_SUCCESS);
if (switch_test_flag(listener, LFLAG_LOG)) {
switch_clear_flag_locked(listener, LFLAG_LOG);
snprintf(reply, reply_len, "+OK no longer logging");
......@@ -519,6 +523,9 @@ static switch_status_t parse_command(listener_t *listener, switch_event_t *event
snprintf(reply, reply_len, "+OK event listener enabled %s", listener->format == EVENT_FORMAT_XML ? "xml" : "plain");
} else if (!strncasecmp(cmd, "noevents", 8)) {
void *pop;
while (switch_queue_trypop(listener->event_queue, &pop) == SWITCH_STATUS_SUCCESS);
if (switch_test_flag(listener, LFLAG_EVENTS)) {
uint8_t x = 0;
switch_clear_flag_locked(listener, LFLAG_EVENTS);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论