From db35f58a10a95fbe94d28896818b57ad61892dfe Mon Sep 17 00:00:00 2001 From: Leon de Rooij Date: Tue, 28 Apr 2009 11:08:54 +0200 Subject: [PATCH] freeswitch plugin: Added error checking on connecting to esl on _init --- src/freeswitch.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/freeswitch.c b/src/freeswitch.c index b483ad3c..b59f7aa1 100644 --- a/src/freeswitch.c +++ b/src/freeswitch.c @@ -509,7 +509,11 @@ static int fs_init (void) /* Connect to FreeSWITCH over ESL */ DEBUG ("freeswitch plugin: making ESL connection to %s %s %s\n", fs_host, fs_port, fs_pass); - esl_connect(&esl_handle, fs_host, atoi(fs_port), fs_pass); + if (esl_connect(&esl_handle, fs_host, atoi(fs_port), fs_pass)) + { + ERROR ("freeswitch plugin: connection failed [%s]", esl_handle.err); + return (-1); + } /* Start a seperate thread for incoming events here */ //esl_thread_create_detached(msg_thread_run, &esl_handle); -- 2.11.0