]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[FreeTDM] Fix a couple of ftdm_log() format string errors.
authorStefan Knoblich <stkn@openisdn.net>
Fri, 10 Feb 2012 12:24:57 +0000 (13:24 +0100)
committerStefan Knoblich <stkn@openisdn.net>
Fri, 10 Feb 2012 12:24:57 +0000 (13:24 +0100)
... that could cause segmentation faults.

Caught while working on __check_printf() support for ftdm_log().

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
libs/freetdm/src/ftdm_config.c
libs/freetdm/src/ftdm_threadmutex.c

index 1b023e93ebb7999f444ea3028d7ea73d7d96fa62..4dfc395e062aabba96cd22d067fd17e5d530ef0d 100644 (file)
@@ -255,7 +255,8 @@ FT_DECLARE (int) ftdm_config_get_cas_bits(char *strvalue, unsigned char *outbits
                if ('1' == cas_bits[x]) {
                        *outbits |= bit;
                } else if ('0' != cas_bits[x]) {
-                       ftdm_log(FTDM_LOG_ERROR, "Invalid CAS pattern specified: %s, just 0 or 1 allowed for each bit\n");
+                       ftdm_log(FTDM_LOG_ERROR, "Invalid CAS pattern specified: %s, just 0 or 1 allowed for each bit\n",
+                               strvalue);
                        return -1;
                }
                bit >>= 1;
index 56653811fa8909b33a3b94d43c1b2016469edb88..20b85ae91e0c14bbbdb08780f369e020b34578f0 100644 (file)
@@ -472,7 +472,7 @@ FT_DECLARE(ftdm_status_t) ftdm_interrupt_signal(ftdm_interrupt_t *interrupt)
                 * otherwise users that never call interrupt wait eventually will 
                 * eventually have the pipe buffer filled */
                if ((err = write(interrupt->writefd, "w", 1)) != 1) {
-                       ftdm_log(FTDM_LOG_ERROR, "Failed to signal interrupt: %s\n", errno, strerror(errno));
+                       ftdm_log(FTDM_LOG_ERROR, "Failed to signal interrupt: %s\n", strerror(errno));
                        return FTDM_FAIL;
                }
        }