ssl_init() moved among the other ssl calls
authorDaniel Kouřil <kouril@ics.muni.cz>
Tue, 17 Jan 2012 20:10:00 +0000 (20:10 +0000)
committerDaniel Kouřil <kouril@ics.muni.cz>
Tue, 17 Jan 2012 20:10:00 +0000 (20:10 +0000)
emi.canl.canl-c/src/canl.c
emi.canl.canl-c/src/canl_locl.h
emi.canl.canl-c/src/canl_ssl.c

index e831b32..8fbad61 100644 (file)
@@ -4,7 +4,6 @@ static void io_destroy(glb_ctx *cc, io_handler *io);
 static int init_io_content(glb_ctx *cc, io_handler *io);
 static int try_connect(glb_ctx *glb_cc, io_handler *io_cc, char *addr,
         int addrtype, int port, struct timeval *timeout);
-static void ssl_init();
 
 canl_ctx canl_create_ctx()
 {
@@ -20,12 +19,6 @@ canl_ctx canl_create_ctx()
     return ctx;
 }
 
-static void ssl_init()
-{
-    SSL_library_init();
-    SSL_load_error_strings();
-}
-
 void canl_free_ctx(canl_ctx cc)
 {
     glb_ctx *ctx = (glb_ctx*) cc;
index c540a6b..d96a463 100644 (file)
@@ -107,5 +107,6 @@ int ssl_read(glb_ctx *cc, io_handler *io, void *buffer, size_t size,
 int ssl_write(glb_ctx *cc, io_handler *io, void *buffer, size_t size, 
         struct timeval *tout);
 int ssl_close(glb_ctx *cc, io_handler *io);
+int ssl_init();
 
 #endif
index 16d30f3..7253306 100644 (file)
@@ -10,6 +10,14 @@ static int check_hostname_cert(glb_ctx *cc, io_handler *io, const char *host);
 #ifdef DEBUG
 static void dbg_print_ssl_error(int errorcode);
 #endif
+
+int ssl_init()
+{
+    SSL_library_init();
+    SSL_load_error_strings();
+    return 0;
+}
+
 int ssl_server_init(glb_ctx *cc)
 {
     int err = 0;