mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-02 13:20:51 +00:00
Exporting only dashboard func
This commit is contained in:
1 parent
cf7d1d8041
commit
95e22e8d4f
2 files changed
+6
-10
No files matched your search
@@ -75,7 +75,8 @@ static void send_notification(struct mg_mgr *mgr, const char *name,
|
||||
}
|
||||
|
||||
// HTTP request handler function
|
||||
static void fn(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
|
||||
void device_dashboard_fn(struct mg_connection *c, int ev, void *ev_data,
|
||||
void *fn_data) {
|
||||
if (ev == MG_EV_HTTP_MSG) {
|
||||
struct mg_http_message *hm = (struct mg_http_message *) ev_data;
|
||||
struct user *u = getuser(hm);
|
||||
@@ -124,10 +125,3 @@ static void fn(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void run_web_server(struct mg_mgr *mgr) {
|
||||
s_config.value2 = strdup("hello");
|
||||
mg_http_listen(mgr, "http://0.0.0.0:8000", fn, mgr);
|
||||
for (;;) mg_mgr_poll(mgr, 1000);
|
||||
mg_mgr_free(mgr);
|
||||
}
|
||||
Reference in new issue
Block a user