]> 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().

1  2 
NEWS.md
command.c

diff --combined NEWS.md
index fff7a242bba99d3a322b47c0d101d36b93e8d8d5,5a00175c3255702b03ec86e0af1938863f53ba4d..92a63ee76b5d86cda54166138731cf3f1423df07
+++ b/NEWS.md
@@@ -1,23 -1,6 +1,25 @@@
  NEWS
  ====
  
 +------------------------------------------
 +0.7.2 (to be announced) "optical friction"
 +------------------------------------------
 +
 +- A major cleanup of the audio file selector.
 +- The client no longer prints error messages from afs commands to
 +  stdout but to stderr.
 +- The sleep subcommand of para_mixer gained two options to control
 +  the startup mood and the time period before fade-out starts. A bunch
 +  of further improvements for this subcommand went in as well.
 +- 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)
 +
  --------------------------------------
  0.7.1 (2022-10-03) "digital spindrift"
  --------------------------------------
@@@ -44,7 -27,6 +46,7 @@@ usual mix of bug fixes and minor improv
    requires support from the compiler, the oldest supported gcc version
    has been bumped to gcc-5.4 (released in 2015).
  
 +Downloads:
  [tarball](./releases/paraslash-0.7.1.tar.xz),
  [signature](./releases/paraslash-0.7.1.tar.xz.asc)
  
@@@ -237,23 -219,6 +239,23 @@@ Downloads
  [tarball](./releases/paraslash-0.6.1.tar.xz),
  [signature](./releases/paraslash-0.6.1.tar.xz.asc)
  
 +---------------------------------------
 +0.5.9 (2021-11-04) "reversed dimension"
 +---------------------------------------
 +This release contains a few important fixes which have accumulated in
 +the maint branch. The paraslash-0.5.x series has now reached its end
 +of life and will no longer be supported. All users should upgrade to
 +a more recent version at this point.
 +
 +- Fix an issue with the bash completion script.
 +- Initialize the random seed also when using libgrypt.
 +- Fix some compiler warnings in the resample filter
 +- Don't return spurious errors from the ff server command.
 +
 +Downloads:
 +[tarball](./releases/paraslash-0.5.9.tar.bz2),
 +[signature](./releases/paraslash-0.5.9.tar.bz2.asc)
 +
  ---------------------------------------
  0.5.8 (2017-09-23) "branching parabola"
  ---------------------------------------
diff --combined command.c
index c56a15822dfaf8a7b165b44480a6adcf90d5e1a3,0c257b358cd49db73fc56d590c4c04cf42c53096..94e9ed1cbfba5e24f8f46a6b2a8ee3ad8b3a2c54
+++ b/command.c
@@@ -47,14 -47,12 +47,14 @@@ extern struct misc_meta_data *mmd
  int send_afs_status(struct command_context *cc, int parser_friendly);
  static bool subcmd_should_die;
  
 +/*
 + * Don't call PARA_XXX_LOG() here as we might already hold the log mutex. See
 + * generic_signal_handler() for details.
 + */
  static void command_handler_sighandler(int s)
  {
 -      if (s != SIGTERM)
 -              return;
 -      PARA_EMERG_LOG("terminating on signal %d\n", SIGTERM);
 -      subcmd_should_die = true;
 +      if (s == SIGTERM)
 +              subcmd_should_die = true;
  }
  
  /*
@@@ -507,7 -505,6 +507,7 @@@ static int com_stat(struct command_cont
         * while we sleep.
         */
        para_block_signal(SIGTERM);
 +      para_block_signal(SIGUSR1);
        for (;;) {
                sigset_t set;
                /*
                 * open a race window similar to the one described above.
                 */
                pselect(1, NULL, NULL, NULL, &ts, &set);
 -              if (subcmd_should_die)
 +              if (subcmd_should_die) {
 +                      PARA_EMERG_LOG("terminating on SIGTERM\n");
                        goto out;
 +              }
                ret = -E_SERVER_CRASH;
                if (getppid() == 1)
                        goto out;
@@@ -710,7 -705,7 +710,7 @@@ static int com_ff(struct command_contex
  {
        long promille;
        int i, ret;
-       char c, *errctx;
+       char *errctx;
  
        ret = lls(lls_check_arg_count(lpr, 1, 1, &errctx));
        if (ret < 0) {
                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)