[asterisk-commits] mmichelson: branch 1.4 r81426 - in /branches/1.4: include/asterisk/ main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Sep 1 01:02:11 CDT 2007


Author: mmichelson
Date: Sat Sep  1 01:02:06 2007
New Revision: 81426

URL: http://svn.digium.com/view/asterisk?view=rev&rev=81426
Log:
Making match_by_addr into ao2_match_by_addr and making it available
everywhere since it could be a handy callback to have


Modified:
    branches/1.4/include/asterisk/astobj2.h
    branches/1.4/main/astobj2.c

Modified: branches/1.4/include/asterisk/astobj2.h
URL: http://svn.digium.com/view/asterisk/branches/1.4/include/asterisk/astobj2.h?view=diff&rev=81426&r1=81425&r2=81426
==============================================================================
--- branches/1.4/include/asterisk/astobj2.h (original)
+++ branches/1.4/include/asterisk/astobj2.h Sat Sep  1 01:02:06 2007
@@ -437,6 +437,7 @@
 	enum search_flags flags,
 	ao2_callback_fn cb_fn, void *arg);
 
+int ao2_match_by_addr(void *user_data, void *arg, int flags);
 /*!
  *
  *

Modified: branches/1.4/main/astobj2.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/astobj2.c?view=diff&rev=81426&r1=81425&r2=81426
==============================================================================
--- branches/1.4/main/astobj2.c (original)
+++ branches/1.4/main/astobj2.c Sat Sep  1 01:02:06 2007
@@ -352,7 +352,7 @@
 /*!
  * \brief another convenience function is a callback that matches on address
  */
-static int match_by_addr(void *user_data, void *arg, int flags)
+int ao2_match_by_addr(void *user_data, void *arg, int flags)
 {
 	return (user_data == arg) ? (CMP_MATCH | CMP_STOP) : 0;
 }
@@ -366,7 +366,7 @@
 	if (INTERNAL_OBJ(user_data) == NULL)	/* safety check on the argument */
 		return NULL;
 
-	ao2_callback(c, OBJ_UNLINK | OBJ_POINTER | OBJ_NODATA, match_by_addr, user_data);
+	ao2_callback(c, OBJ_UNLINK | OBJ_POINTER | OBJ_NODATA, ao2_match_by_addr, user_data);
 
 	return NULL;
 }




More information about the asterisk-commits mailing list