freeswitch plugin: Only disconnect when connected
authorLeon de Rooij <leon@scarlet-internet.nl>
Tue, 28 Apr 2009 09:20:15 +0000 (11:20 +0200)
committerFlorian Forster <sifnfors@informatik.stud.uni-erlangen.de>
Thu, 16 Jul 2009 08:55:25 +0000 (10:55 +0200)
src/freeswitch.c

index b59f7aa..dbf9d21 100644 (file)
@@ -524,7 +524,7 @@ static int fs_init (void)
 static int fs_shutdown (void)
 {
        DEBUG ("freeswitch plugin: disconnecting");
-       esl_disconnect(&esl_handle);
+       if (esl_handle.connected) esl_disconnect(&esl_handle);
        fs_command_free (fs_commands_g);
        fs_commands_g = NULL;
        return (0);