Kaynağa Gözat

Merge branch 'master' of https://github.com/civetweb/civetweb

bel2125 3 yıl önce
ebeveyn
işleme
b09d963057
2 değiştirilmiş dosya ile 6 ekleme ve 2 silme
  1. 0 1
      examples/embedded_c/embedded_c.c
  2. 6 1
      src/civetweb.c

+ 0 - 1
examples/embedded_c/embedded_c.c

@@ -622,7 +622,6 @@ PostResponser(struct mg_connection *conn, void *cbdata)
 
 
 	if (0 != strcmp(ri->request_method, "POST")) {
 	if (0 != strcmp(ri->request_method, "POST")) {
 		/* Not a POST request */
 		/* Not a POST request */
-		char buf[1024];
 		int ret = mg_get_request_link(conn, buf, sizeof(buf));
 		int ret = mg_get_request_link(conn, buf, sizeof(buf));
 
 
 		mg_printf(conn,
 		mg_printf(conn,

+ 6 - 1
src/civetweb.c

@@ -17406,6 +17406,9 @@ mg_connect_client2(const char *host,
                    struct mg_init_data *init,
                    struct mg_init_data *init,
                    struct mg_error_data *error)
                    struct mg_error_data *error)
 {
 {
+    (void)path;
+    (void)init;
+
 	int is_ssl, is_ws;
 	int is_ssl, is_ws;
 	/* void *user_data = (init != NULL) ? init->user_data : NULL; -- TODO */
 	/* void *user_data = (init != NULL) ? init->user_data : NULL; -- TODO */
 
 
@@ -17473,6 +17476,8 @@ mg_connect_client2(const char *host,
 		    experimental_websocket_client_close_wrapper,
 		    experimental_websocket_client_close_wrapper,
 		    (void *)init->callbacks);
 		    (void *)init->callbacks);
 	}
 	}
+#else
+    (void)is_ws;
 #endif
 #endif
 
 
 	/* TODO: all additional options */
 	/* TODO: all additional options */
@@ -20377,7 +20382,7 @@ mg_start_domain2(struct mg_context *ctx,
 	new_dom->next = NULL;
 	new_dom->next = NULL;
 	new_dom->nonce_count = 0;
 	new_dom->nonce_count = 0;
 	new_dom->auth_nonce_mask =
 	new_dom->auth_nonce_mask =
-	    (uint64_t)get_random() ^ ((uint64_t)get_random() << 31);
+	    get_random() ^ (get_random() << 31);
 
 
 #if defined(USE_LUA) && defined(USE_WEBSOCKET)
 #if defined(USE_LUA) && defined(USE_WEBSOCKET)
 	new_dom->shared_lua_websockets = NULL;
 	new_dom->shared_lua_websockets = NULL;