mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-01-18 02:39:44 +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)
|
||||
|
||||
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 profile_total fetch_stats;
|
||||
|
||||
|
@ -526,15 +526,18 @@ int rhizome_server_parse_http_request(rhizome_http_request *r)
|
||||
rhizome_server_http_response_header(r, 200, "image/vnd.microsoft.icon", favicon_len);
|
||||
} else if (strcmp(path, "/rssi") == 0) {
|
||||
r->request_type = RHIZOME_HTTP_REQUEST_FROMBUFFER;
|
||||
char temp[8192];
|
||||
char temp[8192];
|
||||
snprintf(temp,8192,
|
||||
"<head><meta http-equiv=\"refresh\" content=\"5\" >"
|
||||
"</head><html><h1>Radio link margin = %+ddB<br>"
|
||||
"Radio temperature = %d°C<br>"
|
||||
"SID: %s*"
|
||||
"SID: %s*<br>"
|
||||
"%d rhizome transfers in progress<br>"
|
||||
"</h1></html>\n",
|
||||
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);
|
||||
} else if (strcmp(path, "/rhizome/groups") == 0) {
|
||||
/* Return the list of known groups */
|
||||
|
Loading…
Reference in New Issue
Block a user