[Freeswitch-svn] [commit] r8279 - in freeswitch/trunk/src: . mod/applications/mod_fifo
Freeswitch SVN
anthm at freeswitch.org
Tue May 6 17:43:42 EDT 2008
Author: anthm
Date: Tue May 6 17:43:42 2008
New Revision: 8279
Modified:
freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c
freeswitch/trunk/src/switch_channel.c
freeswitch/trunk/src/switch_event.c
Log:
fix fifo logic bug
Modified: freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c Tue May 6 17:43:42 2008
@@ -452,7 +452,7 @@
if (!consumer && node) {
switch_core_session_t *other_session;
switch_channel_t *other_channel;
- const char *uuid = strdup(switch_core_session_get_uuid(session));
+ const char *uuid = switch_core_session_get_uuid(session);
const char *pri;
char tmp[25] = "";
int p = 0;
@@ -510,7 +510,7 @@
node->start_waiting = switch_timestamp_now();
}
- switch_queue_push(node->fifo_list[p], (void *)uuid);
+ switch_queue_push(node->fifo_list[p], (void *)strdup(uuid));
if (!pri) {
switch_snprintf(tmp, sizeof(tmp), "%d", p);
Modified: freeswitch/trunk/src/switch_channel.c
==============================================================================
--- freeswitch/trunk/src/switch_channel.c (original)
+++ freeswitch/trunk/src/switch_channel.c Tue May 6 17:43:42 2008
@@ -424,7 +424,7 @@
switch_assert(channel != NULL);
switch_mutex_lock(channel->profile_mutex);
- if (!(v = switch_event_get_header(channel->variables, (char*)varname))) {
+ if (!channel->variables || !(v = switch_event_get_header(channel->variables, (char*)varname))) {
switch_caller_profile_t *cp = channel->caller_profile;
if (cp) {
Modified: freeswitch/trunk/src/switch_event.c
==============================================================================
--- freeswitch/trunk/src/switch_event.c (original)
+++ freeswitch/trunk/src/switch_event.c Tue May 6 17:43:42 2008
@@ -510,6 +510,7 @@
SWITCH_DECLARE(char *) switch_event_get_header(switch_event_t *event, char *header_name)
{
switch_event_header_t *hp;
+ switch_assert(event);
if (!header_name) return NULL;
for (hp = event->headers; hp; hp = hp->next) {
More information about the Freeswitch-svn
mailing list