[svn-commits] blanchet: branch blanchet/v6 r60168 - /team/blanchet/v6/include/asterisk/

svn-commits at lists.digium.com svn-commits at lists.digium.com
Wed Apr 4 11:35:38 MST 2007


Author: blanchet
Date: Wed Apr  4 13:35:37 2007
New Revision: 60168

URL: http://svn.digium.com/view/asterisk?view=rev&rev=60168
Log:
new version of ASTOBJ_CONTAINER_FIND_FULL named ASTOBJ_CONTAINER_FIND_FULL2 to support passing sockaddr and length.

Modified:
    team/blanchet/v6/include/asterisk/astobj.h

Modified: team/blanchet/v6/include/asterisk/astobj.h
URL: http://svn.digium.com/view/asterisk/team/blanchet/v6/include/asterisk/astobj.h?view=diff&rev=60168&r1=60167&r2=60168
==============================================================================
--- team/blanchet/v6/include/asterisk/astobj.h (original)
+++ team/blanchet/v6/include/asterisk/astobj.h Wed Apr  4 13:35:37 2007
@@ -438,6 +438,19 @@
 		} while (0)); \
 		found; \
 	})
+#define ASTOBJ_CONTAINER_FIND_FULL2(container,data,data2,field,hashfunc,hashoffset,comparefunc) \
+	({ \
+		typeof((container)->head) found = NULL; \
+		ASTOBJ_CONTAINER_TRAVERSE(container, !found, do { \
+			ASTOBJ_RDLOCK(iterator); \
+			if (!(comparefunc(iterator->field, (data), (data2)))) { \
+				found = ASTOBJ_REF(iterator); \
+			} \
+			ASTOBJ_UNLOCK(iterator); \
+		} while (0)); \
+		found; \
+	})
+
 
 /*! \brief Empty a container.
  *



More information about the svn-commits mailing list