Changing API: callback doesnt get mg_request_info pointer anymore, but it is possible to get it using mg_get_request_info()

This commit is contained in:
Sergey Lyubka committed 2012-08-03 11:18:31 +01:00
1 parent 0e0091e1c0
commit e26a993f2a
2 files changed
+5 -4

No files matched your search

+2 -2
View File
@@ -326,8 +326,8 @@ static void redirect_to_ssl(struct mg_connection *conn,
}
static void *event_handler(enum mg_event event,
struct mg_connection *conn,
const struct mg_request_info *request_info) {
struct mg_connection *conn) {
const struct mg_request_info *request_info = mg_get_request_info(conn);
void *processed = "yes";
if (event == MG_NEW_REQUEST) {
+3 -2
View File
@@ -3,8 +3,9 @@
#include "mongoose.h"
static void *callback(enum mg_event event,
struct mg_connection *conn,
const struct mg_request_info *request_info) {
struct mg_connection *conn) {
const struct mg_request_info *request_info = mg_get_request_info(conn);
if (event == MG_NEW_REQUEST) {
char content[1024];
int content_length = snprintf(content, sizeof(content),