mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-23 11:44:53 +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
@@ -11,8 +11,8 @@ static time_t s_boot_timestamp = 0;
|
||||
static struct mg_connection *s_sntp_conn = NULL;
|
||||
|
||||
// Event handler for the listening HTTP/HTTPS connection.
|
||||
static void wcb(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
|
||||
if (ev == MG_EV_ACCEPT && fn_data != NULL) {
|
||||
static void wcb(struct mg_connection *c, int ev, void *ev_data) {
|
||||
if (ev == MG_EV_ACCEPT && c->fn_data != NULL) {
|
||||
struct mg_tls_opts opts = {.cert = s_ssl_cert, .key = s_ssl_key};
|
||||
mg_tls_init(c, &opts);
|
||||
} else if (ev == MG_EV_HTTP_MSG) {
|
||||
@@ -49,7 +49,7 @@ time_t ourtime(time_t *tp) {
|
||||
}
|
||||
|
||||
// SNTP callback. Modifies s_boot_timestamp, to make ourtime() correct
|
||||
static void sfn(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
|
||||
static void sfn(struct mg_connection *c, int ev, void *ev_data) {
|
||||
if (ev == MG_EV_SNTP_TIME) {
|
||||
int64_t t = *(int64_t *) ev_data;
|
||||
MG_INFO(("Got SNTP time: %lld ms from epoch", t));
|
||||
|
||||
Reference in new issue
Block a user