From: Anthony Minessale Date: Thu, 18 Oct 2012 17:23:05 +0000 (-0400) Subject: add originated_legs and originate_causes to A leg when present in an originate to... X-Git-Tag: v1.3.0~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=50cd5c28f5656b19780aa4daa973f1efd5b5f058;p=thirdparty%2Ffreeswitch.git add originated_legs and originate_causes to A leg when present in an originate to detail the B leg data --- diff --git a/libs/esl/src/esl_event.c b/libs/esl/src/esl_event.c index 60547b1be2..a953964c3e 100644 --- a/libs/esl/src/esl_event.c +++ b/libs/esl/src/esl_event.c @@ -552,7 +552,12 @@ static esl_status_t esl_event_base_add_header(esl_event_t *event, esl_stack_t st esl_assert(hv); header->value = hv; - esl_snprintf(header->value, len, "ARRAY::"); + if (header->idx > 1) { + esl_snprintf(header->value, len, "ARRAY::"); + } else { + *header->value = '\0'; + } + for(j = 0; j < header->idx; j++) { esl_snprintf(header->value + strlen(header->value), len - strlen(header->value), "%s%s", j == 0 ? "" : "|:", header->array[j]); }