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

Olle E Johansson olle at voop.com
Mon Apr 9 12:32:59 MST 2007


9 apr 2007 kl. 21.12 skrev Kevin P. Fleming:

> 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.

Absolutely, I did not dig that deep.

/O


More information about the asterisk-dev mailing list