From: Anthony Minessale Date: Wed, 7 Dec 2011 15:28:36 +0000 (-0600) Subject: compiler err X-Git-Tag: v1.2-rc1~27^2~92 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc3be0ae27c12aec91101e01f0f578cd9bc79b0e;p=thirdparty%2Ffreeswitch.git compiler err --- diff --git a/src/mod/applications/mod_spandsp/mod_spandsp_modem.c b/src/mod/applications/mod_spandsp/mod_spandsp_modem.c index d03c186e2c..b6f00f68c4 100644 --- a/src/mod/applications/mod_spandsp/mod_spandsp_modem.c +++ b/src/mod/applications/mod_spandsp/mod_spandsp_modem.c @@ -77,8 +77,9 @@ static int t31_at_tx_handler(at_state_t *s, void *user_data, const uint8_t *buf, wrote = write(modem->master, buf, len); if (wrote != len) { - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to pass the full buffer onto the device file. %zd bytes of %ld written: %s\n", - wrote, len, strerror(errno)); + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to pass the full buffer onto the device file. " + "%"SWITCH_SSIZE_T_FMT " bytes of " "%"SWITCH_SIZE_T_FMT " written: %s\n", wrote, len, strerror(errno)); + if (wrote == -1) wrote = 0; if (tcflush(modem->master, TCOFLUSH)) {