diff options
author | Lars-Dominik Braun <PromyLOPh@gmail.com> | 2008-06-11 14:59:15 +0200 |
---|---|---|
committer | Lars-Dominik Braun <PromyLOPh@gmail.com> | 2008-06-11 14:59:15 +0200 |
commit | b5f287577d924b9d5898602a11a2fd265bb9a84f (patch) | |
tree | a4c0e1f01711e57da5d5685f2fc075dc192b1c2e | |
parent | 4954fde9c7c7bb6644521dec0e43feb532f8ca42 (diff) | |
download | pianobar-b5f287577d924b9d5898602a11a2fd265bb9a84f.tar.gz pianobar-b5f287577d924b9d5898602a11a2fd265bb9a84f.tar.bz2 pianobar-b5f287577d924b9d5898602a11a2fd265bb9a84f.zip |
Update the station pointer when renaming station
-rw-r--r-- | libpiano/main.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libpiano/main.c b/libpiano/main.c index 7e9b129..895b01c 100644 --- a/libpiano/main.c +++ b/libpiano/main.c @@ -268,7 +268,7 @@ PianoReturn_t PianoRateTrack (PianoHandle_t *ph, PianoStation_t *station, return ret; } -/* rename station +/* rename station (on the server and local) * @author PromyLOPh * @added 2008-06-10 * @public yes @@ -301,6 +301,11 @@ PianoReturn_t PianoRenameStation (PianoHandle_t *ph, PianoStation_t *station, PianoHttpPost (ph->curlHandle, url, requestStr, &retStr); ret = PianoXmlParseSimple (retStr); + if (ret == PIANO_RET_OK) { + free (station->name); + station->name = strdup (newName); + } + curl_free (urlencodedNewName); free (xmlencodedNewName); free (requestStr); |