mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-02 13:20:51 +00:00
Fix #1375 - change event processing order
This commit is contained in:
1 parent
3329047579
commit
03d187b147
2 files changed
+8
-2
No files matched your search
+4
-1
@@ -385,8 +385,11 @@ void mg_resolve(struct mg_connection *c, struct mg_str *name, int ms) {
|
||||
|
||||
|
||||
void mg_call(struct mg_connection *c, int ev, void *ev_data) {
|
||||
if (c->pfn != NULL) c->pfn(c, ev, ev_data, c->pfn_data);
|
||||
// Run user-defined handler first, in order to give it an ability
|
||||
// to intercept processing (e.g. clean input buffer) before the
|
||||
// protocol handler kicks in
|
||||
if (c->fn != NULL) c->fn(c, ev, ev_data, c->fn_data);
|
||||
if (c->pfn != NULL) c->pfn(c, ev, ev_data, c->pfn_data);
|
||||
}
|
||||
|
||||
void mg_error(struct mg_connection *c, const char *fmt, ...) {
|
||||
|
||||
+4
-1
@@ -4,8 +4,11 @@
|
||||
#include "util.h"
|
||||
|
||||
void mg_call(struct mg_connection *c, int ev, void *ev_data) {
|
||||
if (c->pfn != NULL) c->pfn(c, ev, ev_data, c->pfn_data);
|
||||
// Run user-defined handler first, in order to give it an ability
|
||||
// to intercept processing (e.g. clean input buffer) before the
|
||||
// protocol handler kicks in
|
||||
if (c->fn != NULL) c->fn(c, ev, ev_data, c->fn_data);
|
||||
if (c->pfn != NULL) c->pfn(c, ev, ev_data, c->pfn_data);
|
||||
}
|
||||
|
||||
void mg_error(struct mg_connection *c, const char *fmt, ...) {
|
||||
|
||||
Reference in new issue
Block a user