]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
server: Remove compatibility code of com_ff().
authorAndre Noll <maan@tuebingen.mpg.de>
Mon, 16 May 2022 19:08:05 +0000 (21:08 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Tue, 18 Oct 2022 19:47:56 +0000 (21:47 +0200)
The old syntax "ff 30-" is undocumented and deprecated since four
years thanks to commit 9d232e63. According to the comment, the removal
of the feature was scheduled for 0.7.0 but as of 0.7.1 the syntax is
still accepted. So remove the extra code now.

command.c

index 00d2c5a61ada8fdcedfad2989e43844265ca46d5..0c257b358cd49db73fc56d590c4c04cf42c53096 100644 (file)
--- a/command.c
+++ b/command.c
@@ -705,7 +705,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) {
@@ -713,21 +713,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)