Add info key 'i' to show some states.
Currently showing C-Netz attached subscribers
This commit is contained in:
@@ -155,3 +155,19 @@ void flush_db(void)
|
||||
remove_db(cnetz_db_head);
|
||||
}
|
||||
|
||||
void dump_db(void)
|
||||
{
|
||||
cnetz_db_t *db = cnetz_db_head;
|
||||
|
||||
PDEBUG(DDB, DEBUG_NOTICE, "Dump of subscriber database:\n");
|
||||
if (!db) {
|
||||
PDEBUG(DDB, DEBUG_NOTICE, " - No subscribers attached!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
while (db) {
|
||||
PDEBUG(DDB, DEBUG_NOTICE, " - Subscriber '%d,%d,%d' is attached.\n", db->futln_nat, db->futln_fuvst, db->futln_rest);
|
||||
db = db->next;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -2,4 +2,5 @@
|
||||
void update_db(cnetz_t *cnetz, uint8_t futln_nat, uint8_t futln_fuvst, uint16_t futln_rest, int busy, int failed);
|
||||
int find_db(uint8_t futln_nat, uint8_t futln_fuvst, uint16_t futln_rest);
|
||||
void flush_db(void);
|
||||
void dump_db(void);
|
||||
|
||||
|
@@ -81,6 +81,7 @@ void print_help(const char *arg0)
|
||||
printf(" we just accept any card. With this we get the vendor IDs of the phone.\n");
|
||||
printf("\nstation-id: Give 7 digit station-id, you don't need to enter it for every\n");
|
||||
printf(" start of this program.\n");
|
||||
printf("\nPress 'i' key for dumping currently attached subscribers.\n");
|
||||
}
|
||||
|
||||
static int handle_options(int argc, char **argv)
|
||||
|
Reference in New Issue
Block a user