mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-12 18:17:59 +00:00
fix fifo logic bug
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8279 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
269fdac157
commit
e0e04b9f9c
@ -452,7 +452,7 @@ SWITCH_STANDARD_APP(fifo_function)
|
|||||||
if (!consumer && node) {
|
if (!consumer && node) {
|
||||||
switch_core_session_t *other_session;
|
switch_core_session_t *other_session;
|
||||||
switch_channel_t *other_channel;
|
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;
|
const char *pri;
|
||||||
char tmp[25] = "";
|
char tmp[25] = "";
|
||||||
int p = 0;
|
int p = 0;
|
||||||
@ -510,7 +510,7 @@ SWITCH_STANDARD_APP(fifo_function)
|
|||||||
node->start_waiting = switch_timestamp_now();
|
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) {
|
if (!pri) {
|
||||||
switch_snprintf(tmp, sizeof(tmp), "%d", p);
|
switch_snprintf(tmp, sizeof(tmp), "%d", p);
|
||||||
|
@ -424,7 +424,7 @@ SWITCH_DECLARE(const char *) switch_channel_get_variable(switch_channel_t *chann
|
|||||||
switch_assert(channel != NULL);
|
switch_assert(channel != NULL);
|
||||||
|
|
||||||
switch_mutex_lock(channel->profile_mutex);
|
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;
|
switch_caller_profile_t *cp = channel->caller_profile;
|
||||||
|
|
||||||
if (cp) {
|
if (cp) {
|
||||||
|
@ -510,6 +510,7 @@ SWITCH_DECLARE(switch_status_t) switch_event_set_priority(switch_event_t *event,
|
|||||||
SWITCH_DECLARE(char *) switch_event_get_header(switch_event_t *event, char *header_name)
|
SWITCH_DECLARE(char *) switch_event_get_header(switch_event_t *event, char *header_name)
|
||||||
{
|
{
|
||||||
switch_event_header_t *hp;
|
switch_event_header_t *hp;
|
||||||
|
switch_assert(event);
|
||||||
if (!header_name) return NULL;
|
if (!header_name) return NULL;
|
||||||
|
|
||||||
for (hp = event->headers; hp; hp = hp->next) {
|
for (hp = event->headers; hp; hp = hp->next) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user