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:15:38 +01:00
1 parent e8f3132aa8
commit 0e0091e1c0
6 files changed
+24 -17

No files matched your search

+2 -2
View File
@@ -155,8 +155,8 @@ static const struct test_config {
};
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);
int i;
for (i = 0; test_config[i].uri != NULL; i++) {
+2 -2
View File
@@ -129,8 +129,8 @@ static void test_remove_double_dots() {
static const char *fetch_data = "hello world!\n";
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);
if (event == MG_NEW_REQUEST && !strcmp(request_info->uri, "/data")) {
mg_printf(conn, "HTTP/1.1 200 OK\r\n"
"Content-Length: %d\r\n"