mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-31 13:00:49 +00:00
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:
1 parent
e8f3132aa8
commit
0e0091e1c0
6 files changed
+24
-17
No files matched your search
+2
-2
@@ -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
@@ -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"
|
||||
|
||||
Reference in new issue
Block a user