[Freeswitch-svn] [commit] r8038 - freeswitch/trunk/src/mod/applications/mod_fifo
Freeswitch SVN
anthm at freeswitch.org
Fri Apr 4 23:20:07 EDT 2008
Author: anthm
Date: Fri Apr 4 23:20:06 2008
New Revision: 8038
Modified:
freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c
Log:
update
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 Fri Apr 4 23:20:06 2008
@@ -117,7 +117,7 @@
static void node_remove_uuid(fifo_node_t *node, const char *uuid)
{
- int i, len = 0;
+ int i, len = 0, done = 0;
void *pop = NULL;
for (i = 0; i < MAX_PRI; i++) {
@@ -126,18 +126,17 @@
}
while(len) {
if (switch_queue_trypop(node->fifo_list[i], &pop) == SWITCH_STATUS_SUCCESS && pop) {
- if (!strcmp((char *)pop, uuid)) {
+ if (!done && !strcmp((char *)pop, uuid)) {
free(pop);
- goto end;
+ done++;
+ } else {
+ switch_queue_push(node->fifo_list[i], pop);
}
- switch_queue_push(node->fifo_list[i], pop);
}
len--;
}
}
- end:
-
if (!node_consumer_wait_count(node)) {
node->start_waiting = 0;
}
More information about the Freeswitch-svn
mailing list