From d432e837c5b9812b11bc8142256d4e9624d8839c Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 30 Dec 2013 23:36:24 +0500 Subject: [PATCH] FS-6035 try this --- .../applications/mod_spandsp/mod_spandsp_modem.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/mod/applications/mod_spandsp/mod_spandsp_modem.c b/src/mod/applications/mod_spandsp/mod_spandsp_modem.c index 7c43577427..64218c1b31 100644 --- a/src/mod/applications/mod_spandsp/mod_spandsp_modem.c +++ b/src/mod/applications/mod_spandsp/mod_spandsp_modem.c @@ -1238,7 +1238,7 @@ static void *SWITCH_THREAD_FUNC modem_thread(switch_thread_t *thread, void *obj) DWORD readBytes; OVERLAPPED o; #endif - char buf[T31_TX_BUF_LEN], tmp[80]; + char buf[T31_TX_BUF_LEN]; switch_mutex_lock(globals.mutex); modem_init(modem, control_handler); @@ -1298,18 +1298,8 @@ static void *SWITCH_THREAD_FUNC modem_thread(switch_thread_t *thread, void *obj) #endif t31_at_rx(modem->t31_state, buf, r); - memset(tmp, 0, sizeof(tmp)); if (!strncasecmp(buf, "AT", 2)) { - int x; - - strncpy(tmp, buf, r); - for (x = 0; x < r; x++) { - if (tmp[x] == '\r' || tmp[x] == '\n') { - tmp[x] = '\0'; - } - } - - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "Command on %s [%s]\n", modem->devlink, tmp); + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "Command on %s [%s]\n", modem->devlink, buf); } }