[mpd] Do not treat playback_start return value > 0 as an error

This commit is contained in:
chme 2016-10-23 08:20:42 +02:00
parent 3981c67e3a
commit 39314c1560

View File

@ -1122,7 +1122,7 @@ mpd_command_pause(struct evbuffer *evbuf, int argc, char **argv, char **errmsg)
else
ret = player_playback_start(NULL);
if (ret != 0)
if (ret < 0)
{
ret = asprintf(errmsg, "Failed to pause playback");
if (ret < 0)
@ -1177,7 +1177,7 @@ mpd_command_play(struct evbuffer *evbuf, int argc, char **argv, char **errmsg)
else
ret = player_playback_start(NULL);
if (ret != 0)
if (ret < 0)
{
ret = asprintf(errmsg, "Failed to start playback");
if (ret < 0)
@ -1227,7 +1227,7 @@ mpd_command_playid(struct evbuffer *evbuf, int argc, char **argv, char **errmsg)
else
ret = player_playback_start(NULL);
if (ret != 0)
if (ret < 0)
{
ret = asprintf(errmsg, "Failed to start playback");
if (ret < 0)