summaryrefslogtreecommitdiff
path: root/channels/chan_phone.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/chan_phone.c')
-rw-r--r--channels/chan_phone.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/channels/chan_phone.c b/channels/chan_phone.c
index 76891ac98..832f28b49 100644
--- a/channels/chan_phone.c
+++ b/channels/chan_phone.c
@@ -1191,7 +1191,6 @@ static struct phone_pvt *mkif(const char *iface, int mode, int txgain, int rxgai
{
/* Make a phone_pvt structure for this interface */
struct phone_pvt *tmp;
- int flags;
tmp = ast_calloc(1, sizeof(*tmp));
if (tmp) {
@@ -1224,8 +1223,7 @@ static struct phone_pvt *mkif(const char *iface, int mode, int txgain, int rxgai
ioctl(tmp->fd, PHONE_VAD, tmp->silencesupression);
#endif
tmp->mode = mode;
- flags = fcntl(tmp->fd, F_GETFL);
- fcntl(tmp->fd, F_SETFL, flags | O_NONBLOCK);
+ ast_fd_set_flags(tmp->fd, O_NONBLOCK);
tmp->owner = NULL;
ao2_cleanup(tmp->lastformat);
tmp->lastformat = NULL;