]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
don't all double unpark of same channel
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 28 Oct 2011 20:58:17 +0000 (15:58 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 28 Oct 2011 20:58:17 +0000 (15:58 -0500)
src/mod/applications/mod_valet_parking/mod_valet_parking.c

index 8b5db58962dacc1a1405573c50b4eb2989ff6f66..7c26878dec28364ef6955f2cbbad5005ba8b8f9b 100644 (file)
@@ -450,6 +450,9 @@ SWITCH_STANDARD_APP(valet_parking_function)
                        if (!token) {
                                switch_mutex_lock(lot->mutex);
                                token = (valet_token_t *) switch_core_hash_find(lot->hash, ext);
+                               if (token->bridged) {
+                                       token = NULL;
+                               }
                                switch_mutex_unlock(lot->mutex);
                        }
 
@@ -483,8 +486,9 @@ SWITCH_STANDARD_APP(valet_parking_function)
                                                switch_core_session_rwunlock(b_session);
                                                token->timeout = 0;
                                                token->bridged = 1;
-
+                                               
                                                switch_ivr_uuid_bridge(switch_core_session_get_uuid(session), token->uuid);
+
                                                return;
                                        }
                                }