]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-4728 --resolve got it, related to multpile bindings
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 17 Oct 2012 16:29:45 +0000 (12:29 -0400)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 17 Oct 2012 16:29:50 +0000 (12:29 -0400)
src/switch_xml.c

index 2e7478093f5fc27c1100872b43a99547e00bcf94..ec7eddec0a8e2225d5a08e6518d9586b701b70a5 100644 (file)
@@ -222,12 +222,15 @@ SWITCH_DECLARE(switch_status_t) switch_xml_unbind_search_function_ptr(switch_xml
        switch_thread_rwlock_wrlock(B_RWLOCK);
        for (ptr = BINDINGS; ptr; ptr = ptr->next) {
                if (ptr->function == function) {
+                       status = SWITCH_STATUS_SUCCESS;
+
                        if (last) {
                                last->next = ptr->next;
                        } else {
                                BINDINGS = ptr->next;
+                               last = NULL;
+                               continue;
                        }
-                       status = SWITCH_STATUS_SUCCESS;
                }
                last = ptr;
        }