[asterisk-commits] res pjsip/location.c: Use the builtin ao2 callback() match f... (asterisk[13])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Sep 10 14:54:38 CDT 2015


Mark Michelson has submitted this change and it was merged.

Change subject: res_pjsip/location.c: Use the builtin ao2_callback() match function instead.
......................................................................


res_pjsip/location.c: Use the builtin ao2_callback() match function instead.

Change-Id: I364906d6d2bad3472929986704a0286b9a2cbe3f
---
M res/res_pjsip/location.c
1 file changed, 2 insertions(+), 7 deletions(-)

Approvals:
  Mark Michelson: Looks good to me, approved
  Anonymous Coward #1000019: Verified



diff --git a/res/res_pjsip/location.c b/res/res_pjsip/location.c
index 587e38a..9625f04 100644
--- a/res/res_pjsip/location.c
+++ b/res/res_pjsip/location.c
@@ -137,12 +137,6 @@
 	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 @@
 		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;
 }
 

-- 
To view, visit https://gerrit.asterisk.org/1238
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I364906d6d2bad3472929986704a0286b9a2cbe3f
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>



More information about the asterisk-commits mailing list