add stored bundle count to /rssi web page display.

This commit is contained in:
gardners 2013-02-15 15:58:11 +10:30 committed by Jeremy Lakeman
parent 3bd4c49af5
commit d49649ed96
3 changed files with 6 additions and 1 deletions

View File

@ -532,10 +532,12 @@ int rhizome_server_parse_http_request(rhizome_http_request *r)
"</head><html><h1>Radio link margin = %+ddB<br>"
"Radio temperature = %d&deg;C<br>"
"SID: %s*<br>"
"%d rhizome bundles in database<br>"
"%d rhizome transfers in progress<br>"
"</h1></html>\n",
last_radio_rssi,last_radio_temperature,
alloca_tohex_sid(my_subscriber->sid),
(int)bundles_available,
rhizome_active_fetch_count()
);
rhizome_server_simple_http_response(r, 200, temp);

View File

@ -171,8 +171,9 @@ static int append_bars(struct overlay_buffer *e, sqlite_retry_state *retry, cons
/* Periodically queue BAR advertisements
Always advertise the most recent 3 manifests in the table, cycle through the rest of the table, adding 17 BAR's at a time
*/
long long bundles_available=0;
void overlay_rhizome_advertise(struct sched_ent *alarm){
static long long bundles_available=0;
bundles_available=0;
static int64_t bundle_last_rowid=INT64_MAX;
if (!is_rhizome_advertise_enabled())

View File

@ -859,5 +859,7 @@ uint32_t Crc32_ComputeBuf( uint32_t inCrc32, const void *buf,
extern int last_radio_rssi;
extern int last_radio_temperature;
int rhizome_active_fetch_count();
extern long long bundles_available;
#endif // __SERVALD_SERVALD_H