More BSD enhancements
[asterisk/asterisk.git] / channels / chan_phone.c
index b0a5444..80232c3 100755 (executable)
@@ -586,7 +586,7 @@ static int phone_write(struct ast_channel *ast, struct ast_frame *frame)
                        res = phone_write_buf(p, pos, expected, maxfr);
                }
                if (res != expected) {
-                       if (errno != EAGAIN) {
+                       if ((errno != EAGAIN) && (errno != EINTR)) {
                                if (res < 0) 
                                        ast_log(LOG_WARNING, "Write returned error (%s)\n", strerror(errno));
        /*
@@ -848,9 +848,9 @@ static void *do_monitor(void *data)
                                tv.tv_usec = 30000;
                                tv.tv_sec = 0;
                        }
-                       res = select(n + 1, &rfds, NULL, &efds, &tv);
+                       res = ast_select(n + 1, &rfds, NULL, &efds, &tv);
                } else {
-                       res = select(n + 1, &rfds, NULL, &efds, NULL);
+                       res = ast_select(n + 1, &rfds, NULL, &efds, NULL);
                        tv.tv_usec = 0;
                        tv.tv_sec = 0;
                        tonepos = 0;