diff --git a/libs/esl/src/esl_event.c b/libs/esl/src/esl_event.c index 20701fa717..45112786bc 100644 --- a/libs/esl/src/esl_event.c +++ b/libs/esl/src/esl_event.c @@ -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) { diff --git a/src/mod/asr_tts/mod_flite/Makefile b/src/mod/asr_tts/mod_flite/Makefile index c6bc434941..6fd2ec5984 100644 --- a/src/mod/asr_tts/mod_flite/Makefile +++ b/src/mod/asr_tts/mod_flite/Makefile @@ -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) diff --git a/src/mod/endpoints/mod_opal/mod_opal.cpp b/src/mod/endpoints/mod_opal/mod_opal.cpp index 6ac9d2e7ac..22959a9e7c 100644 --- a/src/mod/endpoints/mod_opal/mod_opal.cpp +++ b/src/mod/endpoints/mod_opal/mod_opal.cpp @@ -446,6 +446,8 @@ switch_status_t FSManager::ReadConfig(int reload) } } + switch_event_destroy(¶ms); + if (xml) switch_xml_free(xml); diff --git a/src/switch_event.c b/src/switch_event.c index 9cc442c81f..85d0533f5e 100644 --- a/src/switch_event.c +++ b/src/switch_event.c @@ -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) {