浏览代码

added const in mg_get_request_info()

Sergey Lyubka 13 年之前
父节点
当前提交
8b491d75b5
共有 2 个文件被更改,包括 3 次插入2 次删除
  1. 2 1
      mongoose.c
  2. 1 1
      mongoose.h

+ 2 - 1
mongoose.c

@@ -592,7 +592,8 @@ const char *mg_version(void) {
   return MONGOOSE_VERSION;
 }
 
-const struct mg_request_info *mg_get_request_info(struct mg_connection *conn) {
+const struct mg_request_info *
+mg_get_request_info(const struct mg_connection *conn) {
   return &conn->request_info;
 }
 

+ 1 - 1
mongoose.h

@@ -153,7 +153,7 @@ int mg_modify_passwords_file(const char *passwords_file_name,
 
 // Return mg_request_info structure associated with the request.
 // Always succeeds.
-const struct mg_request_info *mg_get_request_info(struct mg_connection *);
+const struct mg_request_info *mg_get_request_info(const struct mg_connection *);
 
 
 // Send data to the client.