Addressed some warnings
authorDaniel Kouřil <kouril@ics.muni.cz>
Wed, 18 Jan 2012 19:07:28 +0000 (19:07 +0000)
committerDaniel Kouřil <kouril@ics.muni.cz>
Wed, 18 Jan 2012 19:07:28 +0000 (19:07 +0000)
emi.canl.canl-c/examples/canl_sample_server.c
emi.canl.canl-c/src/canl_err.c
emi.canl.canl-c/src/canl_ssl.c
emi.canl.canl-c/src/proxy/sslutils.h

index 800e0ab..6048add 100644 (file)
@@ -6,6 +6,7 @@
 #include <errno.h>
 
 #include <canl.h>
+#include <canl_ssl.h>
 
 #define BUF_LEN 1000
 #define BACKLOG 10
index 97c0f50..8353da0 100644 (file)
@@ -163,7 +163,7 @@ static void get_error_string(glb_ctx *cc, char *code_str)
                 code_str[ERR_CODE_LEN - 1] = '\0';
             }
         case netdb_error:
-            new_str = hstrerror(cc->err_code);
+            new_str = (char *) hstrerror(cc->err_code);
             if (new_str) {
                 strncpy(code_str, new_str,
                         ERR_CODE_LEN);
index fb93e4d..a13feb0 100644 (file)
@@ -261,10 +261,8 @@ static int check_hostname_cert(glb_ctx *cc, io_handler *io,
     X509_EXTENSION *ext = NULL;
     int i = 0;
     GENERAL_NAMES *ialt = NULL;
-    unsigned char *pBuffer = NULL;
+    char *pBuffer = NULL;
     int correspond = 0;
-    struct sockaddr *addr = NULL;
-    socklen_t addrlen = 0;
     X509_NAME *sn = NULL;
 
     /*if extensions are present, hostname has to correspond
@@ -732,11 +730,12 @@ ssl_close(glb_ctx *cc, io_handler *io, void *auth_ctx)
     
     /* check the shutdown state*/
     ret = SSL_get_shutdown(ssl);
-    if (ret & SSL_SENT_SHUTDOWN)
+    if (ret & SSL_SENT_SHUTDOWN) {
         if (ret & SSL_RECEIVED_SHUTDOWN)
             return 1;
         else
             return 0;
+    }
     /* TODO check the proper states, maybe also call SSL_shutdown
     if (ret & SSL_RECEIVED_SHUTDOWN) {
         return 0;
index 0e79a86..3a5725c 100644 (file)
@@ -530,6 +530,10 @@ STACK_OF(X509) *load_chain(BIO *in, char*);
 
 int my_txt2nid(char *name);
 
+int
+hex2num(char c);
+
+
 EXTERN_C_END
 
 #endif /* _SSLUTILS_H */