diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-06-13 03:56:09 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-06-13 03:56:09 +0000 |
commit | 1548ac4ec448b6ee52247528bc5958346cf69302 (patch) | |
tree | b44b72988353865b10e3df92c574e028bcecb25b /asterisk.c | |
parent | 0b6398c91883f311a5ff859543a274c200573cc7 (diff) |
Merged revisions 33753 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r33753 | russell | 2006-06-12 23:55:11 -0400 (Mon, 12 Jun 2006) | 5 lines
revert a change that caused more problems than it fixed and fix the real
problem in this code. fds was declared as an array of zero size which caused
some weird problems, some of which would only be seen when compiling without
optimizations. (fixes issues #7071, #7326, and #7305)
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@33754 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'asterisk.c')
-rw-r--r-- | asterisk.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/asterisk.c b/asterisk.c index 819d998e6..1b899eac4 100644 --- a/asterisk.c +++ b/asterisk.c @@ -2088,17 +2088,12 @@ 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) { + struct pollfd fds; + fds.fd = ast_consock; + fds.events = POLLIN; + fds.revents = 0; + while (poll(&fds, 1, 100) > 0) ast_el_read_char(el, &tempchar); - } -#else - while (!ast_el_read_char(el, &tempchar)); -#endif return; } for (;;) { |