Browse Source

Undo 'Test mg_set_user_connection_data with const param (see #452)'

bel2125 8 years ago
parent
commit
753d0ea00b
2 changed files with 2 additions and 4 deletions
  1. 1 2
      include/civetweb.h
  2. 1 2
      src/civetweb.c

+ 1 - 2
include/civetweb.h

@@ -72,7 +72,6 @@ CIVETWEB_API unsigned mg_exit_library(void);
 
 
 struct mg_context;    /* Handle for the HTTP service itself */
-
 struct mg_connection; /* Handle for the individual connection */
 
 
@@ -498,7 +497,7 @@ CIVETWEB_API void *mg_get_user_data(const struct mg_context *ctx);
 
 
 /* Set user data for the current connection. */
-CIVETWEB_API void mg_set_user_connection_data(const struct mg_connection *conn,
+CIVETWEB_API void mg_set_user_connection_data(struct mg_connection *conn,
                                               void *data);
 
 

+ 1 - 2
src/civetweb.c

@@ -2936,9 +2936,8 @@ mg_get_user_data(const struct mg_context *ctx)
 
 
 void
-mg_set_user_connection_data(const struct mg_connection *cconn, void *data)
+mg_set_user_connection_data(struct mg_connection *conn, void *data)
 {
-    struct mg_connection *conn = (struct mg_connection *)cconn;
 	if (conn != NULL) {
 		conn->request_info.conn_data = data;
 	}