[asterisk-commits] seanbright: trunk r158754 - /trunk/channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sat Nov 22 21:30:48 CST 2008
Author: seanbright
Date: Sat Nov 22 21:30:46 2008
New Revision: 158754
URL: http://svn.digium.com/view/asterisk?view=rev&rev=158754
Log:
No need to use a separate structure for this since we can just pass
our sip_pvt pointer in directly.
Modified:
trunk/channels/chan_sip.c
Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=158754&r1=158753&r2=158754
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Sat Nov 22 21:30:46 2008
@@ -9915,17 +9915,12 @@
return 0;
}
-struct caller_criteria {
- const char *exten;
- const char *context;
-};
-
static int find_calling_channel(struct ast_channel *c, void *data) {
- struct caller_criteria *info = data;
+ struct sip_pvt *p = data;
return (c->pbx &&
- (!strcasecmp(c->macroexten, info->exten) || !strcasecmp(c->exten, info->exten)) &&
- !strcasecmp(c->context, info->context));
+ (!strcasecmp(c->macroexten, p->exten) || !strcasecmp(c->exten, p->exten)) &&
+ !strcasecmp(c->context, p->context));
}
/*! \brief Used in the SUBSCRIBE notification subsystem (RFC3265) */
@@ -10093,13 +10088,7 @@
callee must be dialing the same extension that is being monitored. Simply dialing
the hint'd device is not sufficient. */
if (global_notifycid) {
- struct ast_channel *caller = NULL;
- struct caller_criteria data = {
- .exten = p->exten,
- .context = p->context,
- };
-
- caller = ast_channel_search_locked(find_calling_channel, &data);
+ struct ast_channel *caller = ast_channel_search_locked(find_calling_channel, p);
if (caller) {
local_display = ast_strdupa(caller->cid.cid_name);
More information about the asterisk-commits
mailing list