}
esl_mutex_lock(handle->mutex);
-
+ esl_event_safe_destroy(&handle->last_event);
+ esl_event_safe_destroy(&handle->last_ievent);
+
if (check_q && handle->race_event) {
qevent = handle->race_event;
handle->race_event = handle->race_event->next;
return ESL_SUCCESS;
}
- esl_event_safe_destroy(&handle->last_event);
memset(handle->header_buf, 0, sizeof(handle->header_buf));
c = handle->header_buf;
if (!esl_safe_strcasecmp(hval, "text/disconnect-notice") && revent->body) {
goto fail;
}
-
+
if (!esl_safe_strcasecmp(hval, "text/event-plain") && revent->body) {
esl_event_types_t et = ESL_EVENT_COMMAND;
char *body = strdup(revent->body);
- esl_event_safe_destroy(&handle->last_ievent);
-
esl_event_create(&handle->last_ievent, et);
beg = body;