[asterisk-commits] branch 1.2 r33753 - /branches/1.2/asterisk.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Mon Jun 12 20:55:12 MST 2006
Author: russell
Date: Mon Jun 12 22:55:11 2006
New Revision: 33753
URL: http://svn.digium.com/view/asterisk?rev=33753&view=rev
Log:
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)
Modified:
branches/1.2/asterisk.c
Modified: branches/1.2/asterisk.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/asterisk.c?rev=33753&r1=33752&r2=33753&view=diff
==============================================================================
--- branches/1.2/asterisk.c (original)
+++ branches/1.2/asterisk.c Mon Jun 12 22:55:11 2006
@@ -1803,17 +1803,12 @@
if (option_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(;;) {
More information about the asterisk-commits
mailing list