diff --git a/upnpsoap.c b/upnpsoap.c index 3dc64d8..df8f7ad 100644 --- a/upnpsoap.c +++ b/upnpsoap.c @@ -585,8 +585,7 @@ parse_sort_criteria(char *sortCriteria, int *error) else { DPRINTF(E_ERROR, L_HTTP, "No order specified [%s]\n", item); - *error = -1; - goto unhandled_order; + goto bad_direction; } if( strcasecmp(item, "upnp:class") == 0 ) { @@ -612,6 +611,7 @@ parse_sort_criteria(char *sortCriteria, int *error) else { DPRINTF(E_ERROR, L_HTTP, "Unhandled SortCriteria [%s]\n", item); + bad_direction: *error = -1; if( i ) {