]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Merge topic branch t/ff-compat into master
authorAndre Noll <maan@tuebingen.mpg.de>
Tue, 17 Jan 2023 15:29:16 +0000 (16:29 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Tue, 17 Jan 2023 15:29:52 +0000 (16:29 +0100)
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().

NEWS.md
command.c

diff --git a/NEWS.md b/NEWS.md
index fff7a242bba99d3a322b47c0d101d36b93e8d8d5..92a63ee76b5d86cda54166138731cf3f1423df07 100644 (file)
--- 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)
index c56a15822dfaf8a7b165b44480a6adcf90d5e1a3..94e9ed1cbfba5e24f8f46a6b2a8ee3ad8b3a2c54 100644 (file)
--- 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)