mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-01-31 00:23:50 +00:00
add more info to /rssi http page.
This commit is contained in:
parent
d251f46638
commit
3bd4c49af5
@ -137,6 +137,15 @@ struct rhizome_fetch_queue rhizome_fetch_queues[] = {
|
|||||||
|
|
||||||
#define NQUEUES NELS(rhizome_fetch_queues)
|
#define NQUEUES NELS(rhizome_fetch_queues)
|
||||||
|
|
||||||
|
int rhizome_active_fetch_count()
|
||||||
|
{
|
||||||
|
int i,active=0;
|
||||||
|
for(i=0;i<NQUEUES;i++)
|
||||||
|
if (rhizome_fetch_queues[i].active.state!=RHIZOME_FETCH_FREE)
|
||||||
|
active++;
|
||||||
|
return active;
|
||||||
|
}
|
||||||
|
|
||||||
static struct sched_ent sched_activate = STRUCT_SCHED_ENT_UNUSED;
|
static struct sched_ent sched_activate = STRUCT_SCHED_ENT_UNUSED;
|
||||||
static struct profile_total fetch_stats;
|
static struct profile_total fetch_stats;
|
||||||
|
|
||||||
|
@ -531,10 +531,13 @@ int rhizome_server_parse_http_request(rhizome_http_request *r)
|
|||||||
"<head><meta http-equiv=\"refresh\" content=\"5\" >"
|
"<head><meta http-equiv=\"refresh\" content=\"5\" >"
|
||||||
"</head><html><h1>Radio link margin = %+ddB<br>"
|
"</head><html><h1>Radio link margin = %+ddB<br>"
|
||||||
"Radio temperature = %d°C<br>"
|
"Radio temperature = %d°C<br>"
|
||||||
"SID: %s*"
|
"SID: %s*<br>"
|
||||||
|
"%d rhizome transfers in progress<br>"
|
||||||
"</h1></html>\n",
|
"</h1></html>\n",
|
||||||
last_radio_rssi,last_radio_temperature,
|
last_radio_rssi,last_radio_temperature,
|
||||||
alloca_tohex_sid(my_subscriber->sid));
|
alloca_tohex_sid(my_subscriber->sid),
|
||||||
|
rhizome_active_fetch_count()
|
||||||
|
);
|
||||||
rhizome_server_simple_http_response(r, 200, temp);
|
rhizome_server_simple_http_response(r, 200, temp);
|
||||||
} else if (strcmp(path, "/rhizome/groups") == 0) {
|
} else if (strcmp(path, "/rhizome/groups") == 0) {
|
||||||
/* Return the list of known groups */
|
/* Return the list of known groups */
|
||||||
|
2
serval.h
2
serval.h
@ -858,4 +858,6 @@ uint32_t Crc32_ComputeBuf( uint32_t inCrc32, const void *buf,
|
|||||||
size_t bufLen );
|
size_t bufLen );
|
||||||
extern int last_radio_rssi;
|
extern int last_radio_rssi;
|
||||||
extern int last_radio_temperature;
|
extern int last_radio_temperature;
|
||||||
|
int rhizome_active_fetch_count();
|
||||||
|
|
||||||
#endif // __SERVALD_SERVALD_H
|
#endif // __SERVALD_SERVALD_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user