Review Board 1.7.16


Add a _remove method for routes on a message_router.

Review Request #2591 - Created June 4, 2013 and submitted

Jason Parker
/trunk/
Reviewers
asterisk-dev
dlee
Asterisk
Requested on review 2586.

Convert router routes to ao2_containers and add a way of removing them.
Stuff didn't crash when I unloaded my module that removes routes.  Messages still got routed through AMI.
/team/qwell/queue_events/include/asterisk/stasis_message_router.h
Diff Revision 1 Diff Revision 2 - File Reverted
[20] 97 lines
[+20] [+] int stasis_message_router_is_done(struct stasis_message_router *router);
98
			      struct stasis_message_type *message_type,
98
			      struct stasis_message_type *message_type,
99
			      stasis_subscription_cb callback,
99
			      stasis_subscription_cb callback,
100
			      void *data);
100
			      void *data);
101

    
   
101

   
102
/*!
102
/*!
103
 * \brief Remove a route from a message router.

   
104
 * \param router Router to remove the route from.

   
105
 * \param message_type Type of message to route.

   
106
 * \since 12

   
107
 */

   
108
int stasis_message_router_remove(struct stasis_message_router *router,

   
109
			      struct stasis_message_type *message_type);

   
110

    
   

   
111
/*!

   
112
 * \brief Sets the default route of a router.
103
 * \brief Sets the default route of a router.
113
 * \param router Router to set the default route of.
104
 * \param router Router to set the default route of.
114
 * \param callback Callback to forard messages which otherwise have no home.
105
 * \param callback Callback to forard messages which otherwise have no home.
115
 * \param data Data pointer to pass to \a callback.
106
 * \param data Data pointer to pass to \a callback.
116
 * \since 12
107
 * \since 12
117
 */
108
 */
118
int stasis_message_router_set_default(struct stasis_message_router *router,
109
int stasis_message_router_set_default(struct stasis_message_router *router,
119
				      stasis_subscription_cb callback,
110
				      stasis_subscription_cb callback,
120
				      void *data);
111
				      void *data);
121

    
   
112

   
122
#endif /* _ASTERISK_STASIS_MESSAGE_ROUTER_H */
113
#endif /* _ASTERISK_STASIS_MESSAGE_ROUTER_H */
/team/qwell/queue_events/main/stasis_message_router.c
Diff Revision 1 Diff Revision 2 - File Reverted
 
/trunk/include/asterisk/stasis_message_router.h
Diff Revision 1 Diff Revision 2
 
/trunk/main/stasis_message_router.c
Diff Revision 1 Diff Revision 2
 
  1. /team/qwell/queue_events/include/asterisk/stasis_message_router.h: Loading...
  2. /team/qwell/queue_events/main/stasis_message_router.c: Loading...
  3. /trunk/include/asterisk/stasis_message_router.h: Loading...
  4. /trunk/main/stasis_message_router.c: Loading...

https://reviewboard.asterisk.org/ runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to asteriskteam@digium.com.