mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-24 07:16:43 +00:00
Fix printf formats for 64bit compilation
This commit is contained in:
parent
c9f9025581
commit
60e3f5a3fc
@ -1059,7 +1059,7 @@ int app_mdp_ping(const struct cli_parsed *parsed, struct cli_context *context)
|
|||||||
cli_printf(context, "--- %s ping statistics ---\n", alloca_tohex_sid_t(ping_sid));
|
cli_printf(context, "--- %s ping statistics ---\n", alloca_tohex_sid_t(ping_sid));
|
||||||
cli_printf(context, "%d packets transmitted, %d packets received, %3.1f%% packet loss\n",
|
cli_printf(context, "%d packets transmitted, %d packets received, %3.1f%% packet loss\n",
|
||||||
tx_count,rx_count,tx_count?(tx_count-rx_count)*100.0/tx_count:0);
|
tx_count,rx_count,tx_count?(tx_count-rx_count)*100.0/tx_count:0);
|
||||||
cli_printf(context, "round-trip min/avg/max/stddev%s = %lld/%.3f/%lld/%.3f ms\n",
|
cli_printf(context, "round-trip min/avg/max/stddev%s = %"PRId64"/%.3f/%"PRId64"/%.3f ms\n",
|
||||||
(samples<rx_count)?" (stddev calculated from last 1024 samples)":"",
|
(samples<rx_count)?" (stddev calculated from last 1024 samples)":"",
|
||||||
rx_mintime,rx_mean,rx_maxtime,rx_stddev);
|
rx_mintime,rx_mean,rx_maxtime,rx_stddev);
|
||||||
cli_delim(context, NULL);
|
cli_delim(context, NULL);
|
||||||
|
@ -41,10 +41,10 @@ void list_alarms()
|
|||||||
struct sched_ent *alarm;
|
struct sched_ent *alarm;
|
||||||
|
|
||||||
for (alarm = next_deadline; alarm; alarm = alarm->_next)
|
for (alarm = next_deadline; alarm; alarm = alarm->_next)
|
||||||
DEBUGF("%p %s deadline in %lldms", alarm->function, alloca_alarm_name(alarm), alarm->deadline - now);
|
DEBUGF("%p %s deadline in %"PRId64"ms", alarm->function, alloca_alarm_name(alarm), alarm->deadline - now);
|
||||||
|
|
||||||
for (alarm = next_alarm; alarm; alarm = alarm->_next)
|
for (alarm = next_alarm; alarm; alarm = alarm->_next)
|
||||||
DEBUGF("%p %s in %lldms, deadline in %lldms", alarm->function, alloca_alarm_name(alarm), alarm->alarm - now, alarm->deadline - now);
|
DEBUGF("%p %s in %"PRId64"ms, deadline in %"PRId64"ms", alarm->function, alloca_alarm_name(alarm), alarm->alarm - now, alarm->deadline - now);
|
||||||
|
|
||||||
DEBUG("File handles;");
|
DEBUG("File handles;");
|
||||||
int i;
|
int i;
|
||||||
@ -109,7 +109,7 @@ int _schedule(struct __sourceloc __whence, struct sched_ent *alarm)
|
|||||||
|
|
||||||
if (now - alarm->deadline > 1000){
|
if (now - alarm->deadline > 1000){
|
||||||
// 1000ms ago? thats silly, if you keep doing it noone else will get a turn.
|
// 1000ms ago? thats silly, if you keep doing it noone else will get a turn.
|
||||||
WHYF("Alarm %s tried to schedule a deadline %lldms ago, from %s() %s:%d",
|
WHYF("Alarm %s tried to schedule a deadline %"PRId64"ms ago, from %s() %s:%d",
|
||||||
alloca_alarm_name(alarm),
|
alloca_alarm_name(alarm),
|
||||||
(now - alarm->deadline),
|
(now - alarm->deadline),
|
||||||
__whence.function,__whence.file,__whence.line);
|
__whence.function,__whence.file,__whence.line);
|
||||||
|
@ -557,7 +557,7 @@ overlay_interface_init(const char *name, struct in_addr src_addr, struct in_addr
|
|||||||
|
|
||||||
directory_registration();
|
directory_registration();
|
||||||
|
|
||||||
INFOF("Allowing a maximum of %d packets every %lldms",
|
INFOF("Allowing a maximum of %d packets every %"PRId64"ms",
|
||||||
interface->destination->transfer_limit.burst_size,
|
interface->destination->transfer_limit.burst_size,
|
||||||
interface->destination->transfer_limit.burst_length);
|
interface->destination->transfer_limit.burst_length);
|
||||||
|
|
||||||
|
@ -1423,7 +1423,8 @@ int rhizome_list_manifests(struct cli_context *context, const char *service, con
|
|||||||
} else {
|
} else {
|
||||||
int64_t blob_version = rhizome_manifest_get_ll(m, "version");
|
int64_t blob_version = rhizome_manifest_get_ll(m, "version");
|
||||||
if (blob_version != q_version)
|
if (blob_version != q_version)
|
||||||
WARNF("MANIFESTS row id=%s version=%lld does not match manifest blob.version=%lld", q_manifestid, q_version, blob_version);
|
WARNF("MANIFESTS row id=%s version=%"PRId64" does not match manifest blob.version=%"PRId64,
|
||||||
|
q_manifestid, q_version, blob_version);
|
||||||
int match = 1;
|
int match = 1;
|
||||||
|
|
||||||
const char *blob_service = rhizome_manifest_get(m, "service", NULL, 0);
|
const char *blob_service = rhizome_manifest_get(m, "service", NULL, 0);
|
||||||
|
@ -615,7 +615,7 @@ int rhizome_direct_parse_http_request(rhizome_http_request *r)
|
|||||||
return rhizome_server_simple_http_response(r,400,"<html><h1>Missing or unsupported Content-Type header</h1></html>\r\n");
|
return rhizome_server_simple_http_response(r,400,"<html><h1>Missing or unsupported Content-Type header</h1></html>\r\n");
|
||||||
/* ok, we have content-type and content-length, now make sure they are well formed. */
|
/* ok, we have content-type and content-length, now make sure they are well formed. */
|
||||||
int64_t content_length;
|
int64_t content_length;
|
||||||
if (sscanf(cl_str,"Content-Length: %lld",&content_length)!=1)
|
if (sscanf(cl_str,"Content-Length: %"PRId64,&content_length)!=1)
|
||||||
return rhizome_server_simple_http_response(r,400,"<html><h1>Malformed Content-Length header</h1></html>\r\n");
|
return rhizome_server_simple_http_response(r,400,"<html><h1>Malformed Content-Length header</h1></html>\r\n");
|
||||||
char boundary_string[1024];
|
char boundary_string[1024];
|
||||||
int i;
|
int i;
|
||||||
|
@ -1024,7 +1024,7 @@ static void rhizome_fetch_mdp_slot_callback(struct sched_ent *alarm)
|
|||||||
|
|
||||||
time_ms_t now = gettime_ms();
|
time_ms_t now = gettime_ms();
|
||||||
if (now-slot->last_write_time>slot->mdpIdleTimeout) {
|
if (now-slot->last_write_time>slot->mdpIdleTimeout) {
|
||||||
DEBUGF("MDP connection timed out: last RX %lldms ago (read %"PRId64" of %"PRId64" bytes)",
|
DEBUGF("MDP connection timed out: last RX %"PRId64"ms ago (read %"PRId64" of %"PRId64" bytes)",
|
||||||
now-slot->last_write_time,
|
now-slot->last_write_time,
|
||||||
slot->write_state.file_offset, slot->write_state.file_length);
|
slot->write_state.file_offset, slot->write_state.file_length);
|
||||||
rhizome_fetch_close(slot);
|
rhizome_fetch_close(slot);
|
||||||
|
@ -823,7 +823,7 @@ static int send_neighbour_link(struct neighbour *n)
|
|||||||
}
|
}
|
||||||
n->next_neighbour_update = n->last_update + n->best_link->interface->destination->tick_ms;
|
n->next_neighbour_update = n->last_update + n->best_link->interface->destination->tick_ms;
|
||||||
if (config.debug.ack)
|
if (config.debug.ack)
|
||||||
DEBUGF("Next update for %s in %lldms", alloca_tohex_sid(n->subscriber->sid), n->next_neighbour_update - gettime_ms());
|
DEBUGF("Next update for %s in %"PRId64"ms", alloca_tohex_sid(n->subscriber->sid), n->next_neighbour_update - gettime_ms());
|
||||||
OUT();
|
OUT();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user