aboutsummaryrefslogtreecommitdiffstats
path: root/main/event.c
AgeCommit message (Collapse)AuthorFilesLines
2008-11-29Merged revisions 159818 via svnmerge from kpfleming1-2/+2
https://origsvn.digium.com/svn/asterisk/trunk ........ r159818 | kpfleming | 2008-11-29 11:57:39 -0600 (Sat, 29 Nov 2008) | 18 lines incorporates r159808 from branches/1.4: ------------------------------------------------------------------------ r159808 | kpfleming | 2008-11-29 10:58:29 -0600 (Sat, 29 Nov 2008) | 7 lines update dev-mode compiler flags to match the ones used by default on Ubuntu Intrepid, so all developers will see the same warnings and errors since this branch already had some printf format attributes, enable checking for them and tag functions that didn't have them format attributes in a consistent way ------------------------------------------------------------------------ in addition: move some format attributes from main/utils.c to the header files they belong in, and fix up references to the relevant functions based on new compiler warnings ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@159855 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-13Fix a small logic error in ast_event_iterator_next. The previous logic ↵mmichelson1-1/+1
allowed for the iterator to indicate there was more data than there really was, causing the iterator read beyond the end of the event structure. This led to invalid memory reads and potential crashes. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@103559 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-11Fix a problem regarding network vs. host byte ordermmichelson1-3/+1
in the event API. ast_event_iterator_get_ie_type should return the ie type in host byte order. Furthermore, ast_event_get_ie_raw should already have its ie type argument in host byte order since it could be called externally (and it in fact is called in this way by ast_event_get_cached). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@103282 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-11Goodbye again drumkilla.file1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@98435 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-11drumkilla ftw.file1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@98434 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-11* In unaligned.h, remove some unnecessary casts and mark the arg of the russell1-2/+3
get_unaligned functions as const * In event.c, use get_unaligned_uint32() in a couple of places to fix issues on architectures that don't allow unaligned access git-svn-id: http://svn.digium.com/svn/asterisk/trunk@92305 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-20move internal function declarations to include/asterisk/_private.hrizzo1-0/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89465 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16Start untangling header inclusion in a way that does not affectrizzo1-3/+0
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-08improve linked-list macros in two ways:kpfleming1-2/+2
- the *_CURRENT macros no longer need the list head pointer argument - add AST_LIST_MOVE_CURRENT to encapsulate the remove/add operation when moving entries between lists git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89106 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-29Try to clarify the rules on changing ast_event and ast_event_ierussell1-2/+14
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@81356 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-29Fix parenthesis from my last commitrussell1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@81355 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-29Change pointer aritmetic on void * to char *russell1-5/+5
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@81354 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-29there is not actually code that sends these over the network in trunk yetrussell1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@81353 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-29Return ast_event_get_ie_raw to using an iterator and fix logic in ↵file1-13/+9
ast_event_iterator_next. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@81348 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-29This concludes bringing trunk back to a working state.file1-0/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@81345 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-29To keep others happy... revert part of my additions so trunk works.file1-7/+13
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@81344 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-29Add API calls for iterating through an event. This should allow events to ↵file1-11/+44
have multiple information elements (while there was nothing preventing it before you could not actually access any except the first one). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@81334 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-10Merge a set of device state improvements from team/russell/events.russell1-1/+2
The way a device state change propagates is kind of silly, in my opinion. A device state provider calls a function that indicates that the state of a device has changed. Then, another thread goes back and calls a callback for the device state provider to find out what the new state is before it can go send it off to whoever cares. I have changed it so that you can include the state that the device has changed to in the first function call from the device state provider. This removes the need to have to call the callback, which locks up critical containers to go find out what the state changed to. This change set changes the "simple" device state providers to use the new method. This includes parking, meetme, and SLA. I have also mostly converted chan_agent in my branch, but still have some more things to think through before presenting the plan for converting channel drivers to ensure all of the right events get generated ... git-svn-id: http://svn.digium.com/svn/asterisk/trunk@79027 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-06Issue 9869 - replace malloc and memset with ast_calloc, and other coding ↵tilghman1-6/+6
guidelines changes git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67864 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-16This file really needs more documentation...oej1-1/+1
When we implement new API's - please include a small general overview in Doxygen git-svn-id: http://svn.digium.com/svn/asterisk/trunk@64496 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-28Merge changes from team/russell/eventsrussell1-0/+774
This set of changes introduces a new generic event API for use within Asterisk. I am still working on a way for events to be shared between servers, but this part is ready and can already be used inside of Asterisk. This set of changes introduces the first use of the API, as well. I have restructured the way that MWI (message waiting indication) is handled. It is now event based instead of polling based. For example, if there are a bunch of SIP phones subscribed to mailboxes, then chan_sip will not have to constantly poll the mailboxes for changes. app_voicemail will generate events when changes occur. See UPGRADE.txt and CHANGES for some more information on the effects of these changes from the user perspective. For developer information, see the text in include/asterisk/event.h. As always, additional feedback is welcome on the asterisk-dev mailing list. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@62292 f38db490-d61c-443f-a65b-d21fe96a405b