]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
update
authorAnthony Minessale <anthony.minessale@gmail.com>
Sat, 5 Apr 2008 03:20:06 +0000 (03:20 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Sat, 5 Apr 2008 03:20:06 +0000 (03:20 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8038 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_fifo/mod_fifo.c

index ce6803d16bd304a8b5b5bfd1cede1036402b06ed..0f8531a56f8b644fbecf00c44e784344d456010a 100644 (file)
@@ -117,7 +117,7 @@ static int node_consumer_wait_count(fifo_node_t *node)
 
 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 @@ static void node_remove_uuid(fifo_node_t *node, const char *uuid)
                }
                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;
        }