[asterisk-commits] file: branch group/pimp_my_sip r379700 - /team/group/pimp_my_sip/res/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jan 21 10:32:42 CST 2013


Author: file
Date: Mon Jan 21 10:32:39 2013
New Revision: 379700

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=379700
Log:
Fix SDP handler hashing and comparison logic to be correct.

Modified:
    team/group/pimp_my_sip/res/res_sip_session.c

Modified: team/group/pimp_my_sip/res/res_sip_session.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pimp_my_sip/res/res_sip_session.c?view=diff&rev=379700&r1=379699&r2=379700
==============================================================================
--- team/group/pimp_my_sip/res/res_sip_session.c (original)
+++ team/group/pimp_my_sip/res/res_sip_session.c Mon Jan 21 10:32:39 2013
@@ -60,7 +60,7 @@
 static int sdp_handler_list_hash(const void *obj, int flags)
 {
 	const struct sdp_handler_list *handler_list = obj;
-	const char *stream_type = flags & OBJ_KEY ? handler_list->stream_type : obj;
+	const char *stream_type = flags & OBJ_KEY ? obj : handler_list->stream_type;
 
 	return ast_str_hash(stream_type);
 }
@@ -68,8 +68,8 @@
 static int sdp_handler_list_cmp(void *obj, void *arg, int flags)
 {
 	struct sdp_handler_list *handler_list1 = obj;
-	struct sdp_handler_list *handler_list2 = obj;
-	const char *stream_type2 = flags & OBJ_KEY ? handler_list2->stream_type : arg;
+	struct sdp_handler_list *handler_list2 = arg;
+	const char *stream_type2 = flags & OBJ_KEY ? arg : handler_list2->stream_type;
 
 	return strcmp(handler_list1->stream_type, stream_type2) ? 0 : CMP_MATCH | CMP_STOP;
 }




More information about the asterisk-commits mailing list