[asterisk-dev] [Code Review] ast_event API - subscription unit test and some API bug fixes

Russell Bryant russell at digium.com
Mon Apr 12 07:04:11 CDT 2010


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/617/
-----------------------------------------------------------

Review request for Asterisk Developers.


Summary
-------

This patch introduces another test in test_event.c that exercises most of the subscription related ast_event API calls.  I made some minor additions to the existing event allocation test to increase API coverage by the test code.  Finally, I made a list in a comment of API calls not yet touched by the test module as a to-do list for future test development.

During the development of this test code, I discovered a number of bugs in the event API.

1) subscriptions to AST_EVENT_ALL were not handled appropriately in a couple of different places.  The API allows a subscription to all event types, but with IE parameters, just as if it was a subscription to a specific event type.  However, the parameters were being ignored.  This affected ast_event_check_subscriber() and event distribution to subscribers.

2) Some of the logic in ast_event_check_subscriber() for checking subscriptions against query parameters was wrong.


Diffs
-----

  /trunk/main/event.c 256783 
  /trunk/tests/test_event.c 256783 

Diff: https://reviewboard.asterisk.org/r/617/diff


Testing
-------

Both tests in test_event.c pass


Thanks,

Russell




More information about the asterisk-dev mailing list