Skip to content

Commit 6769223

Browse files
committed
Nitpick: rename fn -> mqtt_ev_handler
1 parent 294e483 commit 6769223

File tree

1 file changed

+2
-2
lines changed
  • tutorials/mqtt/mqtt-client

1 file changed

+2
-2
lines changed

tutorials/mqtt/mqtt-client/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ static void publish(struct mg_connection *c, const char *topic,
3838
MG_INFO(("%lu PUBLISHED %s -> %s", c->id, topic, message));
3939
}
4040

41-
static void fn(struct mg_connection *c, int ev, void *ev_data) {
41+
static void mqtt_ev_handler(struct mg_connection *c, int ev, void *ev_data) {
4242
if (ev == MG_EV_OPEN) {
4343
MG_INFO(("%lu CREATED", c->id));
4444
// c->is_hexdumping = 1;
@@ -81,7 +81,7 @@ static void timer_fn(void *arg) {
8181
.version = 4,
8282
.message = mg_str("bye")};
8383
if (s_mqtt_conn == NULL) {
84-
s_mqtt_conn = mg_mqtt_connect(mgr, s_url, &opts, fn, NULL);
84+
s_mqtt_conn = mg_mqtt_connect(mgr, s_url, &opts, mqtt_ev_handler, NULL);
8585
} else {
8686
mg_mqtt_ping(s_mqtt_conn);
8787
}

0 commit comments

Comments
 (0)