Project "FreeSWITCH Source" received a push.

branch: master updated

       via: 986f258db05f7b841fcb68231ae07d5174fbcb38 (commit)
      from: e96acac3c803d00d5fe0802dfa1e17865290e50e (commit)


= COMMIT LOG ===========================================================
committer: Anthony Minessale
comments: 
let ctl-c work until you are connected

diff --git a/libs/esl/fs_cli.c b/libs/esl/fs_cli.c
index a70d63f..19c5795 100644
--- a/libs/esl/fs_cli.c
+++ b/libs/esl/fs_cli.c
@@ -53,6 +53,7 @@ static unsigned char esl_console_complete(const char *buffer, const char *cursor
 #endif
 
 static char prompt_str[512] = "";
+static int CONNECTED = 0;
 
 typedef struct {
 	char name[128];
@@ -537,6 +538,11 @@ static void handle_SIGINT(int sig)
 {
 	if (sig);
 
+	if (!CONNECTED) {
+		fprintf(stdout, "Interrupted.\n");
+		exit(1);
+	}
+
 	WARN_STOP = 1;
 
 	signal(SIGINT, handle_SIGINT);
@@ -1235,6 +1241,8 @@ int main(int argc, char *argv[])
 
  connect:
 
+	CONNECTED = 0;
+
 	while (--loops > 0) {
 		memset(&handle, 0, sizeof(handle));
 		if (esl_connect(&handle, profile->host, profile->port, profile->user, profile->pass)) {
@@ -1252,6 +1260,8 @@ int main(int argc, char *argv[])
 				esl_log(ESL_LOG_INFO, "Retrying\n");
 			}
 		} else {
+			CONNECTED = 1;
+
 			if (temp_log < 0 ) {
 				esl_global_set_default_logger(profile->debug);
 			} else {
========================================================================

Summary of changes:
 libs/esl/fs_cli.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

this email was generated because of /git/your-repo.git/hooks/post-receive by the file /git-core/contrib/hooks/post-receive-email
For more info, see http://blog.chomperstomp.com/?p=630 --
FreeSWITCH Source