<h1>Project "FreeSWITCH Source" received a push.</h1>
<h2>branch: master updated</h2>
<pre>
via: dc436b82a52da05686ac178ad7854556e9688ed8 (commit)
from: bdf678e401a8077aab06b9c04004c92ef6631e26 (commit)
</pre>= COMMIT LOG ===========================================================
<div class="highlight"><pre>committer: Anthony Minessale
comments:
block control-z from fs cli and print a warning how to exit properly
<span style="color: #000080; font-weight: bold">diff --git a/libs/esl/fs_cli.c b/libs/esl/fs_cli.c</span>
<span style="color: #000080; font-weight: bold">index 1e3bf04..19e8d7f 100644</span>
<span style="color: #A00000">--- a/libs/esl/fs_cli.c</span>
<span style="color: #00A000">+++ b/libs/esl/fs_cli.c</span>
<span style="color: #800080; font-weight: bold">@@ -8,6 +8,7 @@</span>
#include <signal.h>
#define CMD_BUFLEN 1024
<span style="color: #00A000">+static int WARN_STOP = 0;</span>
#ifdef WIN32
#define strdup(src) _strdup(src)
<span style="color: #800080; font-weight: bold">@@ -535,6 +536,13 @@ static BOOL console_readConsole(HANDLE conIn, char* buf, int len, int* pRed, int</span>
static void handle_SIGINT(int sig)
{
        if (sig);
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        WARN_STOP = 1;</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        signal(SIGINT, handle_SIGINT);</span>
<span style="color: #00A000">+#ifdef SIGTSTP</span>
<span style="color: #00A000">+        signal(SIGTSTP, handle_SIGINT);</span>
<span style="color: #00A000">+#endif</span>
        return;
}
<span style="color: #800080; font-weight: bold">@@ -581,6 +589,12 @@ static void *msg_thread_run(esl_thread_t *me, void *obj)</span>
        while(thread_running && handle->connected) {
                esl_status_t status = esl_recv_event_timed(handle, 10, 1, NULL);
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                if (WARN_STOP) {</span>
<span style="color: #00A000">+                        printf("Type control-D or /exit or /quit or /bye to exit.\n\n");</span>
<span style="color: #00A000">+                        WARN_STOP = 0;</span>
<span style="color: #00A000">+                }</span>
<span style="color: #00A000">+</span>
                if (status == ESL_FAIL) {
                        esl_log(ESL_LOG_WARNING, "Disconnected.\n");
                        running = -1; thread_running = 0;
<span style="color: #800080; font-weight: bold">@@ -1023,6 +1037,9 @@ int main(int argc, char *argv[])</span>
        }
        
        signal(SIGINT, handle_SIGINT);
<span style="color: #00A000">+#ifdef SIGTSTP</span>
<span style="color: #00A000">+        signal(SIGTSTP, handle_SIGINT);</span>
<span style="color: #00A000">+#endif</span>
#ifdef SIGQUIT
        signal(SIGQUIT, handle_SIGQUIT);
#endif
</pre></div>
========================================================================<pre>
Summary of changes:
libs/esl/fs_cli.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
</pre>
<p>this email was generated because of /git/your-repo.git/hooks/post-receive by the file /git-core/contrib/hooks/post-receive-email<br />
For more info, see <a href="http://blog.chomperstomp.com/?p=630">http://blog.chomperstomp.com/?p=630</a>
-- <br />
FreeSWITCH Source</p>