mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-05-31 10:46:27 +00:00
ESL-36
This commit is contained in:
parent
2ffef4c358
commit
5fb3a88f71
@ -831,7 +831,7 @@ ESL_DECLARE(esl_status_t) esl_recv_event(esl_handle_t *handle, int check_q, esl_
|
|||||||
char *c;
|
char *c;
|
||||||
esl_ssize_t rrval;
|
esl_ssize_t rrval;
|
||||||
int crc = 0;
|
int crc = 0;
|
||||||
esl_event_t *revent = NULL, *qevent = NULL;
|
esl_event_t *revent = NULL;
|
||||||
char *beg;
|
char *beg;
|
||||||
char *hname, *hval;
|
char *hname, *hval;
|
||||||
char *col;
|
char *col;
|
||||||
@ -856,19 +856,11 @@ ESL_DECLARE(esl_status_t) esl_recv_event(esl_handle_t *handle, int check_q, esl_
|
|||||||
esl_event_safe_destroy(&handle->last_ievent);
|
esl_event_safe_destroy(&handle->last_ievent);
|
||||||
|
|
||||||
if (check_q && handle->race_event) {
|
if (check_q && handle->race_event) {
|
||||||
qevent = handle->race_event;
|
revent = handle->race_event;
|
||||||
handle->race_event = handle->race_event->next;
|
handle->race_event = handle->race_event->next;
|
||||||
qevent->next = NULL;
|
revent->next = NULL;
|
||||||
|
|
||||||
if (save_event) {
|
goto parse_event;
|
||||||
*save_event = qevent;
|
|
||||||
qevent = NULL;
|
|
||||||
} else {
|
|
||||||
handle->last_event = qevent;
|
|
||||||
}
|
|
||||||
|
|
||||||
esl_mutex_unlock(handle->mutex);
|
|
||||||
return ESL_SUCCESS;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(handle->header_buf, 0, sizeof(handle->header_buf));
|
memset(handle->header_buf, 0, sizeof(handle->header_buf));
|
||||||
@ -929,7 +921,7 @@ ESL_DECLARE(esl_status_t) esl_recv_event(esl_handle_t *handle, int check_q, esl_
|
|||||||
c++;
|
c++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!revent) {
|
if (!revent) {
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
@ -955,6 +947,8 @@ ESL_DECLARE(esl_status_t) esl_recv_event(esl_handle_t *handle, int check_q, esl_
|
|||||||
revent->body = body;
|
revent->body = body;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
parse_event:
|
||||||
|
|
||||||
if (save_event) {
|
if (save_event) {
|
||||||
*save_event = revent;
|
*save_event = revent;
|
||||||
revent = NULL;
|
revent = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user