diff options
Diffstat (limited to 'libpiano/main.c')
-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); |