mighty putty for a big leak
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12291 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
d162e05b89
commit
8f7bb61e1f
|
@ -389,7 +389,7 @@ ESL_DECLARE(void) esl_event_destroy(esl_event_t **event)
|
|||
|
||||
ESL_DECLARE(esl_status_t) esl_event_dup(esl_event_t **event, esl_event_t *todup)
|
||||
{
|
||||
esl_event_header_t *header, *hp, *hp2, *last = NULL;
|
||||
esl_event_header_t *hp, *hp2;
|
||||
|
||||
if (esl_event_create_subclass(event, todup->event_id, todup->subclass_name) != ESL_SUCCESS) {
|
||||
return ESL_FAIL;
|
||||
|
@ -404,21 +404,7 @@ ESL_DECLARE(esl_status_t) esl_event_dup(esl_event_t **event, esl_event_t *todup)
|
|||
hp2 = (*event)->headers;
|
||||
|
||||
for (hp = todup->headers; hp; hp = hp->next) {
|
||||
header = ALLOC(sizeof(*header));
|
||||
esl_assert(header);
|
||||
|
||||
memset(header, 0, sizeof(*header));
|
||||
|
||||
header->name = DUP(hp->name);
|
||||
header->value = DUP(hp->value);
|
||||
|
||||
if (last) {
|
||||
last->next = header;
|
||||
} else {
|
||||
(*event)->headers = header;
|
||||
}
|
||||
|
||||
(*event)->last_header = last = header;
|
||||
esl_event_add_header_string(*event, ESL_STACK_BOTTOM, hp->name, hp->value);
|
||||
}
|
||||
|
||||
if (todup->body) {
|
||||
|
|
|
@ -5,7 +5,7 @@ FLITE_A=$(FLITE_LIBDIR)/libflite_cmu_us_awb.a \
|
|||
$(FLITE_LIBDIR)/libflite_cmu_us_kal.a \
|
||||
$(FLITE_LIBDIR)/libflite_cmu_us_rms.a \
|
||||
$(FLITE_LIBDIR)/libflite_cmu_us_slt.a \
|
||||
$(FLITE_LIBDIR)/libflite_cmulex.a $(FLITE_LIBDIR)/libflite_usenglish.a $(FLITE_LIBDIR)/libflite.a -lm
|
||||
$(FLITE_LIBDIR)/libflite_cmulex.a $(FLITE_LIBDIR)/libflite_usenglish.a $(FLITE_LIBDIR)/libflite.a -lm -lasound
|
||||
|
||||
LOCAL_CFLAGS=-I$(switch_srcdir)/libs/$(FLITE)/include
|
||||
LOCAL_LIBADD=$(FLITE_A)
|
||||
|
|
|
@ -446,6 +446,8 @@ switch_status_t FSManager::ReadConfig(int reload)
|
|||
}
|
||||
}
|
||||
|
||||
switch_event_destroy(¶ms);
|
||||
|
||||
if (xml)
|
||||
switch_xml_free(xml);
|
||||
|
||||
|
|
|
@ -810,7 +810,7 @@ SWITCH_DECLARE(void) switch_event_destroy(switch_event_t **event)
|
|||
|
||||
SWITCH_DECLARE(switch_status_t) switch_event_dup(switch_event_t **event, switch_event_t *todup)
|
||||
{
|
||||
switch_event_header_t *header, *hp, *hp2, *last = NULL;
|
||||
switch_event_header_t *hp, *hp2;
|
||||
|
||||
if (switch_event_create_subclass(event, todup->event_id, todup->subclass_name) != SWITCH_STATUS_SUCCESS) {
|
||||
return SWITCH_STATUS_GENERR;
|
||||
|
@ -825,27 +825,7 @@ SWITCH_DECLARE(switch_status_t) switch_event_dup(switch_event_t **event, switch_
|
|||
hp2 = (*event)->headers;
|
||||
|
||||
for (hp = todup->headers; hp; hp = hp->next) {
|
||||
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));
|
||||
|
||||
header->name = DUP(hp->name);
|
||||
header->value = DUP(hp->value);
|
||||
|
||||
if (last) {
|
||||
last->next = header;
|
||||
} else {
|
||||
(*event)->headers = header;
|
||||
}
|
||||
|
||||
(*event)->last_header = last = header;
|
||||
switch_event_add_header_string(*event, SWITCH_STACK_BOTTOM, hp->name, hp->value);
|
||||
}
|
||||
|
||||
if (todup->body) {
|
||||
|
|
Loading…
Reference in New Issue