[svn-commits] rmudgett: branch 1.8 r323669 - /branches/1.8/main/event.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed Jun 15 11:43:24 CDT 2011
Author: rmudgett
Date: Wed Jun 15 11:43:18 2011
New Revision: 323669
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=323669
Log:
[regression] Voicemail MWI is no longer sent.
When leaving a voicemail, the MWI message is never sent. The same thing
happens when checking a voicemail and marking it as read.
If you restart Asterisk, everything comes up at that state correctly, but
changes to the messages in voicemail causes the light to not be set
appropriately. Very easy to reproduce.
* Made ast_event_check_subscriber() return TRUE if there are ANY
subscribers to an event type when there are no restricting ie values
passed. This allows an event being queued to be queued.
(closes issue ASTERISK-18002)
Reported by: lmadsen
Tested by: lmadsen, irroot
Patches:
jira_asterisk_18002_v1.8.patch uploaded by rmudgett (License #5621)
(closes issue ASTERISK-18019)
Modified:
branches/1.8/main/event.c
Modified: branches/1.8/main/event.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/main/event.c?view=diff&rev=323669&r1=323668&r2=323669
==============================================================================
--- branches/1.8/main/event.c (original)
+++ branches/1.8/main/event.c Wed Jun 15 11:43:18 2011
@@ -444,12 +444,14 @@
};
const enum ast_event_type event_types[] = { type, AST_EVENT_ALL };
int i;
+ int want_specific_event;/* TRUE if looking for subscribers wanting specific parameters. */
if (type >= AST_EVENT_TOTAL) {
ast_log(LOG_ERROR, "%u is an invalid type!\n", type);
return res;
}
+ want_specific_event = 0;
va_start(ap, type);
for (ie_type = va_arg(ap, enum ast_event_ie_type);
ie_type != AST_EVENT_IE_END;
@@ -492,6 +494,7 @@
}
if (insert) {
+ want_specific_event = 1;
AST_LIST_INSERT_TAIL(&check_ie_vals.ie_vals, ie_value, entry);
} else {
ast_log(LOG_WARNING, "Unsupported PLTYPE(%d)\n", ie_value->ie_pltype);
@@ -501,17 +504,22 @@
for (i = 0; i < ARRAY_LEN(event_types); i++) {
AST_RWDLLIST_RDLOCK(&ast_event_subs[event_types[i]]);
- AST_RWDLLIST_TRAVERSE(&ast_event_subs[event_types[i]], sub, entry) {
- AST_LIST_TRAVERSE(&sub->ie_vals, ie_val, entry) {
- if (!match_sub_ie_val_to_event(ie_val, &check_ie_vals)) {
- /* The current subscription ie did not match an event ie. */
+ if (want_specific_event) {
+ AST_RWDLLIST_TRAVERSE(&ast_event_subs[event_types[i]], sub, entry) {
+ AST_LIST_TRAVERSE(&sub->ie_vals, ie_val, entry) {
+ if (!match_sub_ie_val_to_event(ie_val, &check_ie_vals)) {
+ /* The current subscription ie did not match an event ie. */
+ break;
+ }
+ }
+ if (!ie_val) {
+ /* Everything matched. A subscriber is looking for this event. */
break;
}
}
- if (!ie_val) {
- /* Everything matched. A subscriber is looking for this event. */
- break;
- }
+ } else {
+ /* Just looking to see if there are ANY subscribers to the event type. */
+ sub = AST_RWLIST_FIRST(&ast_event_subs[event_types[i]]);
}
AST_RWDLLIST_UNLOCK(&ast_event_subs[event_types[i]]);
if (sub) {
More information about the svn-commits
mailing list