summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--addons/chan_mobile.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/addons/chan_mobile.c b/addons/chan_mobile.c
index f748f791f..7077704b0 100644
--- a/addons/chan_mobile.c
+++ b/addons/chan_mobile.c
@@ -3855,10 +3855,7 @@ static void *do_monitor_phone(void *data)
}
if ((at_msg = at_read_full(hfp->rsock, buf, sizeof(buf))) < 0) {
- /* XXX gnu specific strerror_r is assummed here, this
- * is not really safe. See the strerror(3) man page
- * for more info. */
- ast_debug(1, "[%s] error reading from device: %s (%d)\n", pvt->id, strerror_r(errno, buf, sizeof(buf)), errno);
+ ast_debug(1, "[%s] error reading from device: %s (%d)\n", pvt->id, strerror(errno), errno);
break;
}
@@ -3995,7 +3992,7 @@ static void *do_monitor_phone(void *data)
ast_debug(1, "[%s] error parsing message\n", pvt->id);
goto e_cleanup;
case AT_READ_ERROR:
- ast_debug(1, "[%s] error reading from device: %s (%d)\n", pvt->id, strerror_r(errno, buf, sizeof(buf)), errno);
+ ast_debug(1, "[%s] error reading from device: %s (%d)\n", pvt->id, strerror(errno), errno);
goto e_cleanup;
default:
break;
@@ -4073,11 +4070,7 @@ static void *do_monitor_headset(void *data)
continue;
if ((at_msg = at_read_full(pvt->rfcomm_socket, buf, sizeof(buf))) < 0) {
- if (strerror_r(errno, buf, sizeof(buf)))
- ast_debug(1, "[%s] error reading from device\n", pvt->id);
- else
- ast_debug(1, "[%s] error reading from device: %s (%d)\n", pvt->id, buf, errno);
-
+ ast_debug(1, "[%s] error reading from device: %s (%d)\n", pvt->id, strerror(errno), errno);
goto e_cleanup;
}
ast_debug(1, "[%s] %s\n", pvt->id, buf);