소스 검색

Add function to get context from connection

bel 11 년 전
부모
커밋
265d2309a1
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/civetweb.c

+ 1 - 1
src/civetweb.c

@@ -1062,7 +1062,7 @@ const char *mg_get_option(const struct mg_context *ctx, const char *name)
 
 struct mg_context *mg_get_context(struct mg_connection * conn)
 {
-    return (conn == NULL) ? (struct mg_context *)NULL : &(conn->ctx);
+    return (conn == NULL) ? (struct mg_context *)NULL : (conn->ctx);
 }
 
 void *mg_get_user_data(struct mg_context *ctx)