diff options
author | Sean Bright <sean@malleable.com> | 2008-11-23 03:30:46 +0000 |
---|---|---|
committer | Sean Bright <sean@malleable.com> | 2008-11-23 03:30:46 +0000 |
commit | 74c112a501ba01de835a5842b4fc87225ca0d5bd (patch) | |
tree | 4b0d4ba4d9058bd56039ed0b66328cd1ac6db24b /channels/chan_sip.c | |
parent | 2fb4ecc87c18853f906d9a9502a5dd9296c40706 (diff) |
No need to use a separate structure for this since we can just pass
our sip_pvt pointer in directly.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@158754 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index f295addd4..53a6c9e64 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -9915,17 +9915,12 @@ static int __sip_subscribe_mwi_do(struct sip_subscription_mwi *mwi) 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 @@ static int transmit_state_notify(struct sip_pvt *p, int state, int full, int tim 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); |