[asterisk-dev] [svn-commits] qwell: branch 1.4 r160764 - /branches/1.4/channels/chan_agent.c
Julian Lyndon-Smith
asterisk at dotr.com
Wed Dec 3 15:44:46 CST 2008
Not being a C programmer, but a lazy one, why doesn't the ast_verbose
function call check the current level and only output the message if the
current level is eq to or greater than the _prefix ?
This would remove the need to have
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 ...
and only have
ast_verbose(VERBOSE_PREFIX_3 ...
I know speed must be a consideration, but isn't the difference in order
of microseconds ?
/me dons the heavy-duty flamesuit and awaits the derision of the -dev
list ...
Julian
SVN commits to the Digium repositories wrote:
> Author: qwell
> Date: Wed Dec 3 15:38:07 2008
> New Revision: 160764
>
> URL: http://svn.digium.com/view/asterisk?view=rev&rev=160764
> Log:
> Only show this warning when we want to show it.
>
> (closes issue #13982)
> Reported by: coolmig
> Patches:
> chan_agent.c.patch uploaded by coolmig (license 621)
>
> Modified:
> branches/1.4/channels/chan_agent.c
>
> Modified: branches/1.4/channels/chan_agent.c
> URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_agent.c?view=diff&rev=160764&r1=160763&r2=160764
> ==============================================================================
> --- branches/1.4/channels/chan_agent.c (original)
> +++ branches/1.4/channels/chan_agent.c Wed Dec 3 15:38:07 2008
> @@ -735,7 +735,8 @@
> ast_mutex_unlock(&p->lock);
> return res;
> }
> - ast_verbose( VERBOSE_PREFIX_3 "agent_call, call to agent '%s' call on '%s'\n", p->agent, p->chan->name);
> + if (option_verbose > 2)
> + ast_verbose(VERBOSE_PREFIX_3 "agent_call, call to agent '%s' call on '%s'\n", p->agent, p->chan->name);
> if (option_debug > 2)
> ast_log(LOG_DEBUG, "Playing beep, lang '%s'\n", p->chan->language);
> res = ast_streamfile(p->chan, beep, p->chan->language);
>
>
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> svn-commits mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/svn-commits
>
>
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
More information about the asterisk-dev
mailing list