fix a bunch of stuff

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7854 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2008-03-11 03:45:16 +00:00
parent dc5c28e1f9
commit 74a3d8ab95
17 changed files with 139 additions and 65 deletions

View File

@@ -1083,20 +1083,20 @@ SWITCH_DECLARE(void) switch_channel_event_set_data(switch_channel_t *channel, sw
}
x = 0;
/* Index Variables */
for (hi = channel->variables->headers; hi; hi = hi->next) {
char buf[1024];
char *vvar = NULL, *vval = NULL;
if (channel->variables) {
for (hi = channel->variables->headers; hi; hi = hi->next) {
char buf[1024];
char *vvar = NULL, *vval = NULL;
vvar = (char *) hi->name;
vval = (char *) hi->value;
x++;
switch_assert(vvar && vval);
switch_snprintf(buf, sizeof(buf), "variable_%s", vvar);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, buf, "%s", vval);
vvar = (char *) hi->name;
vval = (char *) hi->value;
x++;
switch_assert(vvar && vval);
switch_snprintf(buf, sizeof(buf), "variable_%s", vvar);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, buf, "%s", vval);
}
}
switch_mutex_unlock(channel->profile_mutex);
}