[asterisk-dev] Re: [asterisk-commits] oej: trunk r61021 - /trunk/main/manager.c

Kevin P. Fleming kpfleming at digium.com
Mon Apr 9 12:12:42 MST 2007


asterisk-commits at lists.digium.com wrote:

> Modified: trunk/main/manager.c
> URL: http://svn.digium.com/view/asterisk/trunk/main/manager.c?view=diff&rev=61021&r1=61020&r2=61021
> ==============================================================================
> --- trunk/main/manager.c (original)
> +++ trunk/main/manager.c Mon Apr  9 14:05:40 2007
> @@ -2486,7 +2486,10 @@
>  static int manager_state_cb(char *context, char *exten, int state, void *data)
>  {
>  	/* Notify managers of change */
> -	manager_event(EVENT_FLAG_CALL, "ExtensionStatus", "Exten: %s\r\nContext: %s\r\nStatus: %d\r\n", exten, context, state);
> +	char hint[BUFSIZ];
> +	ast_get_hint(hint, sizeof(hint), NULL, 0, NULL, context, exten);
> +
> +	manager_event(EVENT_FLAG_CALL, "ExtensionStatus", "Exten: %s\r\nContext: %s\r\nHint: %s\r\nStatus: %d\r\n", exten, context, hint, state);
>  	return 0;
>  }

Wouldn't it make more sense to just pass the hint data to all the
callbacks that didn't subscribe to a specific hint? The function calling
the callbacks already has that data.


More information about the asterisk-dev mailing list