]> git.tue.mpg.de Git - paraslash.git/commitdiff
Merge branch 'refs/heads/t/long-help'
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 10 Jun 2018 16:59:36 +0000 (18:59 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 10 Jun 2018 17:03:23 +0000 (19:03 +0200)
This series introduces lsu.c and lsu.h which contain helpers related to
the lopsub library. These helpers are designed to be shared between
the executables. The series starts by implementing a generic help
command for lopsub suites and converts para_server. Subsequent patches
convert audiod and para_play.

The second part of the series adds another lopsub related helper which
merges command line options and config file options. Each executable
is modified to make use of the new helper, getting rid of quite some
code duplication.

The conflict resolution for server.c has been tested for a while.

Cooking for five weeks.

* refs/heads/t/long-help:
  play: Use lsu_merge_config_file_options().
  mixer: Use lsu_merge_config_file_options().
  gui: Use lsu_merge_config_file_options().
  filter: Use lsu_merge_config_file_options().
  audioc: Use lsu_merge_config_file_options().
  audiod: Use lsu_merge_config_file_options().
  client: Use lsu_merge_config_file_options().
  lsu: Add helper to merge config file options, convert server.
  Trivial: Rename completion_result variables.
  play: Implement help --long.
  audiod: Implement help --long.
  Introduce lsu.{c,h}, implement help --long for para_server.

1  2 
NEWS.md
audiod.c
client.c
client_common.c
command.c
configure.ac
gui.c
m4/lls/server_cmd.suite.m4
server.c

diff --cc NEWS.md
index 4a837ed8fe77e42ee889757c17805bb8addf9e7e,d0bd6585a3a2f04be5ec262d580bfb8800733498..29a64ff9467a5d65960aa420688cedc1bb69c327
+++ b/NEWS.md
@@@ -1,26 -1,6 +1,30 @@@
  NEWS
  ====
  
- 0.6.2 (to be accounced) "elastic diversity"
 +-------------------------------------------
++0.6.2 (to be announced) "elastic diversity"
 +-------------------------------------------
 +
 +- para_gui no longer waits up to one second to update the screen when
 +  the geometry of the terminal changes.
 +- Minor documentation improvements.
 +- Improvements to the crypto subsystem.
 +- The server subcommand "task" has been deprecated. It still works,
 +  but prints nothing. It will be removed in the next major release.
 +- Server log output is now serialized, avoiding issues with partial
 +  lines.
 +- It is now possible to switch to a different afs database by changing
 +  the server configuration and sending SIGHUP to the server process.
 +- New server options: --listen--address, --http-listen-address and
 +  --dccp-listen-address. These options restrict the set of listening
 +  addresses of the TCP and DCCP sockets of the server process.
++- The help commands of server, audiod, play now support --long. By default,
++  the short help is shown.
++- The code which merges the command line options with the config file
++  options has been consolidated.
 +
 +Download: [tarball](./releases/paraslash-git.tar.xz)
 +
  ----------------------------------------
  0.6.1 (2017-09-23) "segmented iteration"
  ----------------------------------------
diff --cc audiod.c
Simple merge
diff --cc client.c
Simple merge
diff --cc client_common.c
Simple merge
diff --cc command.c
Simple merge
diff --cc configure.ac
index 9493f8e316f165288641dbcf9abc0c352b847ee5,b8c8817e35d2e09daf6b5b62fa136c4812de37dd..053996d1606b13a1ff3da085d59a0f1451f065af
@@@ -392,9 -392,10 +392,10 @@@ if test -n "$CRYPTOLIB" && test $HAVE_O
                wma_common
                sideband
                version
+               lsu
        "
        if test "$CRYPTOLIB" = openssl; then
 -              server_errlist_objs="$server_errlist_objs crypt"
 +              server_errlist_objs="$server_errlist_objs openssl"
        else
                server_errlist_objs="$server_errlist_objs gcrypt"
        fi
@@@ -486,9 -488,10 +488,10 @@@ if test -n "$CRYPTOLIB"; the
                wmadec_filter
                buffer_tree
                sync_filter
+               lsu
        "
        if test "$CRYPTOLIB" = openssl; then
 -              audiod_errlist_objs="$audiod_errlist_objs crypt"
 +              audiod_errlist_objs="$audiod_errlist_objs openssl"
        else
                audiod_errlist_objs="$audiod_errlist_objs gcrypt"
        fi
diff --cc gui.c
Simple merge
Simple merge
diff --cc server.c
index a344b77440751a6e7017d9d7e641390a36eb157f,d98009d0097f25540174e1a79f194dada46093e4..eee0a4128e9218233dad9e316d6cc9c1658a6cbb
+++ b/server.c
@@@ -283,19 -210,19 +248,19 @@@ void parse_config_or_die(bool reload
        if (OPT_GIVEN(LOG_TIMING))
                daemon_set_flag(DF_LOG_TIMING);
        daemon_set_priority(OPT_UINT32_VAL(PRIORITY));
-       if (user_list_file)
+       if (!reload || getpid() != afs_pid) {
+               char *user_list_file;
+               if (OPT_GIVEN(USER_LIST))
+                       user_list_file = para_strdup(OPT_STRING_VAL(USER_LIST));
+               else {
+                       char *home = para_homedir();
+                       user_list_file = make_message("%s/.paraslash/server.users", home);
+                       free(home);
+               }
 -              init_user_list(user_list_file);
 +              user_list_init(user_list_file);
-       ret = 1;
- free_cf:
-       free(cf);
-       free(user_list_file);
-       if (ret < 0) {
-               if (errctx)
-                       PARA_ERROR_LOG("%s\n", errctx);
-               free(errctx);
-               PARA_EMERG_LOG("%s\n", para_strerror(-ret));
-               exit(EXIT_FAILURE);
+               free(user_list_file);
        }
+       return;
  }
  
  /*