[Asterisk-cvs] asterisk asterisk.c,1.156,1.157
kpfleming at lists.digium.com
kpfleming at lists.digium.com
Thu Jun 2 22:38:57 CDT 2005
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv5035
Modified Files:
asterisk.c
Log Message:
don't call poll() with an unitialized structure (bug #4387)
Index: asterisk.c
===================================================================
RCS file: /usr/cvsroot/asterisk/asterisk.c,v
retrieving revision 1.156
retrieving revision 1.157
diff -u -d -r1.156 -r1.157
--- asterisk.c 3 Jun 2005 01:42:31 -0000 1.156
+++ asterisk.c 3 Jun 2005 02:41:59 -0000 1.157
@@ -467,7 +467,7 @@
if (perms!=NULL) {
mode_t p;
- sscanf(perms,"%o",&p);
+ sscanf(perms, "%o", (int *) &p);
if ((chmod(ast_config_AST_SOCKET,p))<0)
ast_log(LOG_WARNING, "Unable to change file permissions of %s: %s\n", ast_config_AST_SOCKET,strerror(errno));
}
@@ -1690,7 +1690,6 @@
int num;
char *buf;
char *runuser=NULL, *rungroup=NULL;
- struct pollfd silly_macos[1];
/* Remember original args for restart */
if (argc > sizeof(_argv) / sizeof(_argv[0]) - 1) {
@@ -2060,7 +2059,9 @@
}
/* Do nothing */
- for(;;)
- poll(silly_macos,0, -1);
+ for(;;) { /* apparently needed for the MACos */
+ struct pollfd p = { -1 /* no descriptor */, 0, 0 };
+ poll(&p, 0, -1);
+ }
return 0;
}
More information about the svn-commits
mailing list