Skip to content
Snippets Groups Projects
Commit 0eee85fc authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Accommodate the link_list API change (long -> int)

parent a147f9ee
No related branches found
No related tags found
No related merge requests found
......@@ -694,7 +694,7 @@ int mqtt_server_state(struct mqtt* mqtt, enum server_state state)
snprintf(max_clients, sizeof(max_clients), "/%lu", mqtt->max_clients);
char clients[64] = "";
if (mqtt->client_list.count)
snprintf(clients, sizeof(clients), "%lu%s clients", mqtt->client_list.count, max_clients);
snprintf(clients, sizeof(clients), "%d%s clients", mqtt->client_list.count, max_clients);
snprintf(str, sizeof(str), "%s\t%s\t%s\t%s"
, server_state_desc(state)
, clients
......@@ -893,9 +893,9 @@ int mqtt_client_count(struct mqtt* mqtt)
if (mqtt->cfg->mqtt.verbose)
mqtt_server_state(mqtt, mqtt->server_state);
if (mqtt->max_clients)
snprintf(str, sizeof(str), "%ld total\t%ld max", mqtt->client_list.count, mqtt->max_clients);
snprintf(str, sizeof(str), "%d total\t%ld max", mqtt->client_list.count, mqtt->max_clients);
else
snprintf(str, sizeof(str), "%ld total", mqtt->client_list.count);
snprintf(str, sizeof(str), "%d total", mqtt->client_list.count);
return mqtt_pub_strval(mqtt, TOPIC_SERVER, "client", str);
}
......
......@@ -2156,7 +2156,7 @@ int main(int argc, char** argv)
for (node = client_list.first; node != NULL; node = node->next) {
client = node->data;
localtime32(&client->time, &tm);
printf("%04ld %s %s [%s] %s port %u since %u/%u %02u:%02u:%02u\n"
printf("%04d %s %s [%s] %s port %u since %u/%u %02u:%02u:%02u\n"
, node->tag
, client->protocol
, client->user
......
......@@ -5918,7 +5918,7 @@ void find_stray_packets(void)
listAddNode(&outpkt_list, pkt, 0, LAST_NODE);
}
if (g.gl_pathc)
lprintf(LOG_DEBUG, "%lu stray outbound packets (%lu total pkts) found in %s"
lprintf(LOG_DEBUG, "%u stray outbound packets (%lu total pkts) found in %s"
, listCountNodes(&outpkt_list), (ulong)g.gl_pathc, cfg.temp_dir);
globfree(&g);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment