dect
/
asterisk
Archived
13
0
Fork 0
Commit Graph

13 Commits

Author SHA1 Message Date
russell b48669aa8f Merged revisions 182810 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r182810 | russell | 2009-03-17 21:09:13 -0500 (Tue, 17 Mar 2009) | 44 lines

Fix cases where the internal poll() was not being used when it needed to be.

We have seen a number of problems caused by poll() not working properly on 
Mac OSX.  If you search around, you'll find a number of references to using 
select() instead of poll() to work around these issues.  In Asterisk, we've 
had poll.c which implements poll() using select() internally.  However, we 
were still getting reports of problems.

vadim investigated a bit and realized that at least on his system, even 
though we were compiling in poll.o, the system poll() was still being used.  
So, the primary purpose of this patch is to ensure that we're using the 
internal poll() when we want it to be used.

The changes are:

1) Remove logic for when internal poll should be used from the Makefile.  
   Instead, put it in the configure script.  The logic in the configure 
   script is the same as it was in the Makefile.  Ideally, we would have 
   a functionality test for the problem, but that's not actually possible, 
   since we would have to be able to run an application on the _target_ 
   system to test poll() behavior.

2) Always include poll.o in the build, but it will be empty if AST_POLL_COMPAT
   is not defined.

3) Change uses of poll() throughout the source tree to ast_poll().  I feel 
   that it is good practice to give the API call a new name when we are 
   changing its behavior and not using the system version directly in all cases.
   So, normally, ast_poll() is just redefined to poll().  On systems where 
   AST_POLL_COMPAT is defined, ast_poll() is redefined to ast_internal_poll().

4) Change poll() in main/poll.c to be ast_internal_poll().

It's worth noting that any code that still uses poll() directly will work fine 
(if they worked fine before).  So, for example, out of tree modules that are 
using poll() will not stop working or anything.  However, for modules to work 
properly on Mac OSX, ast_poll() needs to be used.

(closes issue #13404)
Reported by: agalbraith
Tested by: russell, vadim

http://reviewboard.digium.com/r/198/

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@182847 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-18 02:28:55 +00:00
mmichelson d35e2bf77c Merged revisions 94977 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r94977 | mmichelson | 2007-12-27 14:09:06 -0600 (Thu, 27 Dec 2007) | 3 lines

Fixing a typo in a comment.


........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@94978 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-27 20:11:20 +00:00
rizzo de2db05332 remove a bunch of useless #include "options.h"
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89511 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21 23:09:02 +00:00
rizzo 0cc47e4221 another bunch of include removals (errno.h and asterisk/logger.h)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89425 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19 19:09:03 +00:00
rizzo 883346d64a Start untangling header inclusion in a way that does not affect
build times - tested, there is no measureable difference before and
after this commit.

In this change:

use asterisk/compat.h to include a small set of system headers:
inttypes.h, unistd.h, stddef.h, stddint.h, sys/types.h, stdarg.h,
stdlib.h, alloca.h, stdio.h

Where available, the inclusion is conditional on HAVE_FOO_H as determined
by autoconf.

Normally, source files should not include any of the above system headers,
and instead use either "asterisk.h" or "asterisk/compat.h" which does it
better. 

For the time being I have left alone second-level directories
(main/db1-ast, etc.).



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89333 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16 20:04:58 +00:00
russell 438cb82e0f Conversions to ast_debug()
(issue #9984, patches from eliel and dimas)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@71338 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-24 18:51:41 +00:00
tilghman eb5d461ed4 Issue 9869 - replace malloc and memset with ast_calloc, and other coding guidelines changes
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67864 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-06 21:20:11 +00:00
oej 1e4eca5913 Make file's new comment doxygenified
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@54654 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-15 17:13:29 +00:00
file 89b2a62b82 Clean up the I/O context handler.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@54552 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-15 02:11:34 +00:00
oej a5359ef161 Doxygen formatting changes
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@53200 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-05 21:55:01 +00:00
file cd15e6156e Cosmetic changes. Make main source files better conform to coding guidelines and standards. (issue #8679 reported by johann8384)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@51486 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-23 00:11:32 +00:00
file c6f8f943b8 Merged revisions 44169 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r44169 | file | 2006-10-02 13:25:13 -0400 (Mon, 02 Oct 2006) | 10 lines

Merged revisions 44168 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r44168 | file | 2006-10-02 13:22:27 -0400 (Mon, 02 Oct 2006) | 2 lines

Shrink when current_ioc is unused. It is set to -1 when unused, not 0. (issue #7941 reported by eclubb)

........

................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@44171 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-02 17:26:34 +00:00
kpfleming 8b0c007ad9 merge new_loader_completion branch, including (at least):
- restructured build tree and makefiles to eliminate recursion problems
  - support for embedded modules
  - support for static builds
  - simpler cross-compilation support
  - simpler module/loader interface (no exported symbols)



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@40722 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-21 02:11:39 +00:00