diff options
author | Richard Mudgett <rmudgett@digium.com> | 2015-08-21 11:03:02 -0500 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2015-09-10 13:16:12 -0500 |
commit | b8f07527b25f3f9260809abb353266f5ba22e37b (patch) | |
tree | 32b0bb299252abc63a79e0e8abb3921293e9d722 /res/res_pjsip/location.c | |
parent | f1a2e82d49813b83ca9577938305ee6ccbb0c9c5 (diff) |
res_pjsip/location.c: Use the builtin ao2_callback() match function instead.
Change-Id: I364906d6d2bad3472929986704a0286b9a2cbe3f
Diffstat (limited to 'res/res_pjsip/location.c')
-rw-r--r-- | res/res_pjsip/location.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/res/res_pjsip/location.c b/res/res_pjsip/location.c index 587e38adf..9625f04ef 100644 --- a/res/res_pjsip/location.c +++ b/res/res_pjsip/location.c @@ -137,12 +137,6 @@ static int contact_link_static(void *obj, void *arg, int flags) return 0; } -/*! \brief Simple callback function which returns immediately, used to grab the first contact of an AOR */ -static int contact_find_first(void *obj, void *arg, int flags) -{ - return CMP_MATCH | CMP_STOP; -} - struct ast_sip_contact *ast_sip_location_retrieve_first_aor_contact(const struct ast_sip_aor *aor) { RAII_VAR(struct ao2_container *, contacts, NULL, ao2_cleanup); @@ -153,7 +147,8 @@ struct ast_sip_contact *ast_sip_location_retrieve_first_aor_contact(const struct return NULL; } - contact = ao2_callback(contacts, 0, contact_find_first, NULL); + /* Get the first AOR contact in the container. */ + contact = ao2_callback(contacts, 0, NULL, NULL); return contact; } |