diff options
author | Joshua Colp <jcolp@digium.com> | 2016-11-22 12:03:35 -0600 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2016-11-22 12:03:35 -0600 |
commit | 038158bf7b5d450c5d712248a334c596b723ff3f (patch) | |
tree | fc16440dbf891de2fc89f16f396f658450fbd02a /addons/chan_mobile.c | |
parent | b1f7cc422321a7813dba755cecda8924999266d9 (diff) | |
parent | 939dcf66b0fac0f0eda521a365f076d759accfbd (diff) |
Merge "addons/chan_mobile: do not use strerror_r"
Diffstat (limited to 'addons/chan_mobile.c')
-rw-r--r-- | addons/chan_mobile.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/addons/chan_mobile.c b/addons/chan_mobile.c index dc2efd4db..bd39bee64 100644 --- a/addons/chan_mobile.c +++ b/addons/chan_mobile.c @@ -3853,10 +3853,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; } @@ -3993,7 +3990,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; @@ -4071,11 +4068,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); |