[Freeswitch-svn] [commit] r11773 - in freeswitch/trunk/libs/sofia-sip: . libsofia-sip-ua/tport

FreeSWITCH SVN mikej at freeswitch.org
Wed Feb 11 08:14:35 PST 2009


Author: mikej
Date: Wed Feb 11 10:14:35 2009
New Revision: 11773

Log:
Mon Jan  5 06:43:04 CST 2009  Pekka Pessi <first.last at nokia.com>
  * tport_tls.c: silences warnings on signedness



Modified:
   freeswitch/trunk/libs/sofia-sip/.update
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_tls.c

Modified: freeswitch/trunk/libs/sofia-sip/.update
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/.update	(original)
+++ freeswitch/trunk/libs/sofia-sip/.update	Wed Feb 11 10:14:35 2009
@@ -1 +1 @@
-Wed Feb 11 10:13:45 CST 2009
+Wed Feb 11 10:14:24 CST 2009

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_tls.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_tls.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_tls.c	Wed Feb 11 10:14:35 2009
@@ -461,16 +461,18 @@
     char name[256];
 
     subject = X509_get_subject_name(cert);
+
     if (subject) {
       if (X509_NAME_get_text_by_NID(subject, NID_commonName,
 				    name, sizeof name) > 0) {
+	usize_t k, N = su_strlst_len(tls->subject);
 	name[(sizeof name) - 1] = '\0';
 
-	for (i = 0; i < su_strlst_len(tls->subject); i++)
-	  if (strcasecmp(su_strlst_item(tls->subject, i), name) == 0)
+	for (k = 0; k < N; k++)
+	  if (strcasecmp(su_strlst_item(tls->subject, k), name) == 0)
 	    break;
 
-	if (i == su_strlst_len(tls->subject))
+	if (k == N)
 	  su_strlst_dup_append(tls->subject, name);
       }
     }



More information about the Freeswitch-svn mailing list