diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2020-08-07 08:08:10 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2020-08-08 15:15:19 +0200 |
commit | 7f6457aa9b7110869e89111c42651b1055728679 (patch) | |
tree | ca1138c88748679ad6a564576e922803fdab5ec7 /src/libpiano/piano.c | |
parent | bcc0c5fecfb79f412f45b7befc65b380a7e2bb5d (diff) | |
download | pianobar-7f6457aa9b7110869e89111c42651b1055728679.tar.gz pianobar-7f6457aa9b7110869e89111c42651b1055728679.tar.bz2 pianobar-7f6457aa9b7110869e89111c42651b1055728679.zip |
Allow changing station mode
Fixes #700.
Diffstat (limited to 'src/libpiano/piano.c')
-rw-r--r-- | src/libpiano/piano.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libpiano/piano.c b/src/libpiano/piano.c index a189f34..fde8789 100644 --- a/src/libpiano/piano.c +++ b/src/libpiano/piano.c @@ -183,6 +183,18 @@ static void PianoDestroyPartner (PianoPartner_t *partner) { memset (partner, 0, sizeof (*partner)); } +void PianoDestroyStationMode (PianoStationMode_t * const modes) { + PianoStationMode_t *curMode = modes; + + while (curMode != NULL) { + free (curMode->name); + free (curMode->description); + PianoStationMode_t * const lastMode = curMode; + curMode = (PianoStationMode_t *) curMode->head.next; + free (lastMode); + } +} + /* frees the whole piano handle structure * @param piano handle * @return nothing |