]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-6535 mod_rayo: fix double lock on speech detection failure
authorChris Rienzo <chris@rienzo.com>
Fri, 13 Jun 2014 03:24:35 +0000 (23:24 -0400)
committerChris Rienzo <chris@rienzo.com>
Fri, 13 Jun 2014 03:24:35 +0000 (23:24 -0400)
src/mod/event_handlers/mod_rayo/rayo_input_component.c

index b4549b454f2d0353f9bc8d08e4d6f29426490b22..cd9c092dbb43cc3a54c0711c394b405da089d7bb 100644 (file)
@@ -598,8 +598,9 @@ static iks *start_call_voice_input(struct input_component *component, switch_cor
                switch_mutex_lock(handler->mutex);
                handler->voice_component = NULL;
                rayo_component_send_complete(RAYO_COMPONENT(component), COMPONENT_COMPLETE_ERROR);
+       } else {
+               switch_mutex_lock(handler->mutex);
        }
-       switch_mutex_lock(handler->mutex);
        switch_safe_free(grammar);
 
        return NULL;