Refactor for possible client registration data storage

This commit is contained in:
F. Duncanh
2023-12-02 20:50:20 -05:00
parent 3898c2d013
commit 6c0c3cb287
6 changed files with 106 additions and 39 deletions

View File

@@ -68,7 +68,8 @@ struct raop_s {
/* for temporary storage of pin during pair-pin start */
unsigned short pin;
bool use_pin;
/* public key as string */
char pk_str[2*ED25519_KEY_SIZE + 1];
};
@@ -481,7 +482,8 @@ raop_init(int max_clients, raop_callbacks_t *callbacks, const char* keyfile) {
/* initialise stored pin */
raop->pin = 0;
raop->use_pin = false;
/* initialize switch for display of client's streaming data records */
raop->clientFPSdata = 0;
@@ -552,6 +554,7 @@ int raop_set_plist(raop_t *raop, const char *plist_item, const int value) {
if (raop->audio_delay_micros != value) retval = 1;
} else if (strcmp(plist_item, "pin") == 0) {
raop->pin = value;
raop->use_pin = true;
} else {
retval = -1;
}