mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-30 15:14:17 +00:00
add resistance on blocking writes to stdout
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7363 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
62bcc9e0fc
commit
a2d8262289
4 files changed
+127
-15
No files matched your search
+8
-3
@@ -647,8 +647,13 @@ SWITCH_DECLARE(switch_status_t) switch_event_dup(switch_event_t **event, switch_
|
||||
hp2 = (*event)->headers;
|
||||
|
||||
for (hp = todup->headers; hp; hp = hp->next) {
|
||||
if ((header = ALLOC(sizeof(*header))) == 0) {
|
||||
return SWITCH_STATUS_MEMERR;
|
||||
void *pop;
|
||||
|
||||
if (switch_queue_trypop(EVENT_HEADER_RECYCLE_QUEUE, &pop) == SWITCH_STATUS_SUCCESS) {
|
||||
header = (switch_event_header_t *) pop;
|
||||
} else {
|
||||
header = ALLOC(sizeof(*header));
|
||||
switch_assert(header);
|
||||
}
|
||||
|
||||
memset(header, 0, sizeof(*header));
|
||||
@@ -662,7 +667,7 @@ SWITCH_DECLARE(switch_status_t) switch_event_dup(switch_event_t **event, switch_
|
||||
(*event)->headers = header;
|
||||
}
|
||||
|
||||
last = header;
|
||||
(*event)->last_header = last = header;
|
||||
}
|
||||
|
||||
if (todup->body) {
|
||||
|
||||
Reference in new issue
Block a user