Parent Directory | Revision Log | Patch
revision 1.46 by chopp, Fri Aug 5 09:38:09 2005 UTC | revision 1.47 by martinp, Sun Aug 14 08:44:48 2005 UTC | |
---|---|---|
# | Line 89 static int handle_action(Event_T, Actio | Line 89 static int handle_action(Event_T, Actio |
89 | void Event_post(Service_T service, long id, short state, EventAction_T action, | void Event_post(Service_T service, long id, short state, EventAction_T action, |
90 | char *s, ...) { | char *s, ...) { |
91 | ||
92 | Event_T e = service->eventlist; | Event_T e = service->eventlist; |
93 | ||
94 | ASSERT(service); | ASSERT(service); |
95 | ASSERT(action); | ASSERT(action); |
# | Line 111 void Event_post(Service_T service, long | Line 111 void Event_post(Service_T service, long |
111 | e->source = service; | e->source = service; |
112 | e->state = state; | e->state = state; |
113 | e->state_changed = TRUE; | e->state_changed = TRUE; |
114 | e->count = 1; | |
115 | e->action = action; | e->action = action; |
116 | if(s) | if(s) |
117 | { | { |
# | Line 152 void Event_post(Service_T service, long | Line 153 void Event_post(Service_T service, long |
153 | { | { |
154 | e->state = state; | e->state = state; |
155 | e->state_changed = TRUE; | e->state_changed = TRUE; |
156 | e->count = 1; | |
157 | } | |
158 | else | |
159 | { | |
160 | e->count++; | |
161 | } | } |
162 | END_LOCK; | END_LOCK; |
163 | break; | break; |
# | Line 174 void Event_post(Service_T service, long | Line 180 void Event_post(Service_T service, long |
180 | e->source = service; | e->source = service; |
181 | e->state = state; | e->state = state; |
182 | e->state_changed = TRUE; | e->state_changed = TRUE; |
183 | e->count = 1; | |
184 | e->action = action; | e->action = action; |
185 | if(s) | if(s) |
186 | { | { |
# | Line 400 static int handle_action(Event_T E, Acti | Line 407 static int handle_action(Event_T E, Acti |
407 | return TRUE; | return TRUE; |
408 | } | } |
409 | ||
410 | /* Alert and collector event notification is common action. It is send on | /* Alert and collector event notification are common actions */ |
411 | * state change only (i.e. once) */ | handle_alert(E); |
412 | if(E->state_changed || (E->id == EVENT_CHANGED)) | handle_collector(E); |
{ | ||
handle_alert(E); | ||
handle_collector(E); | ||
} | ||
413 | ||
414 | switch(A->id) | switch(A->id) |
415 | { | { |
|
savannah-hackers-public@gnu.org | ViewVC Help |
Powered by ViewVC 1.1.26 |