From: Andre Noll Date: Tue, 17 Jan 2023 15:29:16 +0000 (+0100) Subject: Merge topic branch t/ff-compat into master X-Git-Tag: v0.7.2~8 X-Git-Url: http://git.tuebingen.mpg.de/?a=commitdiff_plain;h=b85e61d07fc2fa9e56147af29609a84721947a6f;hp=06edb176d8fbbbe8323fe2f4f6bfda7153a66782;p=paraslash.git Merge topic branch t/ff-compat into master A single commit which removes support for the old syntax of the ff command where negative values could be specified with a postfix such as "ff 30-". This syntax has long been deprecated. * refs/heads/t/ff-compat: server: Remove compatibility code of com_ff(). --- diff --git a/NEWS.md b/NEWS.md index fff7a242..92a63ee7 100644 --- a/NEWS.md +++ b/NEWS.md @@ -14,6 +14,8 @@ NEWS - Minor cleanup of the net subsystem. - The openssl specific code now employs the EVP API to compute hashes. It should compile without warnings against openssl-3. +- The deprecated syntax for specifying negative offsets in the argument + to the "ff" server command has been removed. Downloads: [tarball](./releases/paraslash-git.tar.xz) diff --git a/command.c b/command.c index c56a1582..94e9ed1c 100644 --- a/command.c +++ b/command.c @@ -710,7 +710,7 @@ static int com_ff(struct command_context *cc, struct lls_parse_result *lpr) { long promille; int i, ret; - char c, *errctx; + char *errctx; ret = lls(lls_check_arg_count(lpr, 1, 1, &errctx)); if (ret < 0) { @@ -718,21 +718,8 @@ static int com_ff(struct command_context *cc, struct lls_parse_result *lpr) return ret; } ret = para_atoi32(lls_input(0, lpr), &i); - if (ret < 0) { - if (ret != -E_ATOI_JUNK_AT_END) - return ret; - /* - * Compatibility code to keep the historic syntax (ff 30-) - * working. This can be removed after 0.7.0. - */ - ret = sscanf(lls_input(0, lpr), "%i%c", &i, &c); - if (ret <= 0) - return -E_COMMAND_SYNTAX; - if (ret > 1 && c == '-') { - PARA_WARNING_LOG("use of obsolete syntax\n"); - i = -i; - } - } + if (ret < 0) + return ret; mutex_lock(mmd_mutex); ret = -E_NO_AUDIO_FILE; if (!mmd->afd.afhi.chunks_total || !mmd->afd.afhi.seconds_total)