]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Mon Jan 5 06:43:04 CST 2009 Pekka Pessi <first.last@nokia.com>
authorMichael Jerris <mike@jerris.com>
Wed, 11 Feb 2009 16:14:35 +0000 (16:14 +0000)
committerMichael Jerris <mike@jerris.com>
Wed, 11 Feb 2009 16:14:35 +0000 (16:14 +0000)
  * tport_tls.c: silences warnings on signedness

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11773 d0543943-73ff-0310-b7d9-9358b9ac24b2

libs/sofia-sip/.update
libs/sofia-sip/libsofia-sip-ua/tport/tport_tls.c

index fdff6d14a60fb3d1ebbac79af7d3a9ff8df22923..8f23e54c10cb155cfa02998c786b746db756b53e 100644 (file)
@@ -1 +1 @@
-Wed Feb 11 10:13:45 CST 2009
+Wed Feb 11 10:14:24 CST 2009
index 6a6e6658812b4ac6dbeb4ee549f8450e74754656..2cb847b4fef3542c744ffea8012c989deeef7bea 100644 (file)
@@ -461,16 +461,18 @@ int tls_post_connection_check(tls_t *tls)
     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);
       }
     }