summaryrefslogtreecommitdiff
path: root/asterisk.c
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2006-05-19 19:04:24 +0000
committerRussell Bryant <russell@russellbryant.com>2006-05-19 19:04:24 +0000
commit6b73b82e5d6b64d0f5dea4c90b60fcf564e1e343 (patch)
tree81e5786a802978a21762852eef6d5be590c13341 /asterisk.c
parent9993d14f8689b272542c435848e7e7d2aa398d5f (diff)
Merged revisions 28754 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r28754 | russell | 2006-05-19 15:01:17 -0400 (Fri, 19 May 2006) | 6 lines This explicit poll is only needed on mac. In fact, it breaks some systems such as some versions of Fedora, causing 'asterisk -rx' to never exit. This has been tested on systems showing the asterisk -rx problem, as well as other unaffected versions of linux, mac osx 10.4, and FreeBSD 6. (issue #7071) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28771 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'asterisk.c')
-rw-r--r--asterisk.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/asterisk.c b/asterisk.c
index 93eab8a43..5c1807f86 100644
--- a/asterisk.c
+++ b/asterisk.c
@@ -2027,13 +2027,17 @@ static void ast_remotecontrol(char * data)
if (ast_opt_exec && data) { /* hack to print output then exit if asterisk -rx is used */
char tempchar;
+#ifdef __Darwin__
struct pollfd fds[0];
fds[0].fd = ast_consock;
fds[0].events = POLLIN;
fds[0].revents = 0;
- while(poll(fds, 1, 100) > 0) {
+ while (poll(fds, 1, 100) > 0) {
ast_el_read_char(el, &tempchar);
}
+#else
+ while (!ast_el_read_char(el, &tempchar));
+#endif
return;
}
for (;;) {