瀏覽代碼

Initialize SSL in mg_init_library, so https client functions can be used without initializing a server first (fix)

bel2125 8 年之前
父節點
當前提交
ffdc5d862d
共有 1 個文件被更改,包括 7 次插入1 次删除
  1. 7 1
      src/civetweb.c

+ 7 - 1
src/civetweb.c

@@ -12527,7 +12527,13 @@ load_dll(char *ebuf, size_t ebuf_len, const char *dll_name, struct ssl_func *sw)
 	struct ssl_func *fp;
 
 	if ((dll_handle = dlopen(dll_name, RTLD_LAZY)) == NULL) {
-		mg_cry(fc(ctx), "%s: cannot load %s", __func__, dll_name);
+		mg_snprintf(NULL,
+		            NULL, /* No truncation check for ebuf */
+		            ebuf,
+		            ebuf_len,
+		            "%s: cannot load %s",
+		            __func__,
+		            dll_name);
 		return NULL;
 	}