mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-25 12:04:47 +00:00
remove fn_data from event handler signature
This commit is contained in:
1 parent
b8bfa5565b
commit
deca1aaf46
77 files changed
+2839
-2259
No files matched your search
+3
-3
@@ -19,8 +19,8 @@ void mg_call(struct mg_connection *c, int ev, void *ev_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);
|
||||
if (c->fn != NULL) c->fn(c, ev, ev_data);
|
||||
if (c->pfn != NULL) c->pfn(c, ev, ev_data);
|
||||
}
|
||||
|
||||
void mg_error(struct mg_connection *c, const char *fmt, ...) {
|
||||
@@ -31,5 +31,5 @@ void mg_error(struct mg_connection *c, const char *fmt, ...) {
|
||||
va_end(ap);
|
||||
MG_ERROR(("%lu %ld %s", c->id, c->fd, buf));
|
||||
c->is_closing = 1; // Set is_closing before sending MG_EV_CALL
|
||||
mg_call(c, MG_EV_ERROR, buf); // Let user handler to override it
|
||||
mg_call(c, MG_EV_ERROR, buf); // Let user handler override it
|
||||
}
|
||||
Reference in new issue
Block a user