]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Merge ../paraslash_meins/paraslash
authorAndre Noll <maan@systemlinux.org>
Wed, 31 Jan 2007 10:44:50 +0000 (11:44 +0100)
committerAndre Noll <maan@systemlinux.org>
Wed, 31 Jan 2007 10:44:50 +0000 (11:44 +0100)
Makefile.in
alsa_write.c
audiod.c
audiod_command.c
file_write.c
mysql_selector.c
osx_write.c
server.ggo
write.h
write_common.c

index 39e926e708226d85627a1cb6a47a88df40d6e776..b468cc843b889248724ffc8cc3846d99123c5a2f 100644 (file)
@@ -22,9 +22,9 @@ DEBUG_CPPFLAGS += -Wno-sign-compare -g -Wunused -Wundef -W
 DEBUG_CPPFLAGS += -Wredundant-decls
 # produces false positives
 # DEBUG_CPPFLAGS += -Wunreachable-code
-#CPPFLAGS += -Wwrite-strings
+# DEBUG_CPPFLAGS += -Wwrite-strings
 # invalid option for gcc-3.3.5
-# CPPFLAGS += -Wextra
+# DEBUG_CPPFLAGS += -Wextra
 
 CPPFLAGS += -Os
 CPPFLAGS += -Wall
@@ -199,9 +199,6 @@ aac_common.o: aac_common.c
 aac_afh.o: aac_afh.c
        $(CC) -c $(CPPFLAGS) $(DEBUG_CPPFLAGS) @faad_cppflags@ $<
 
-para_recv: @recv_objs@
-       $(CC) @recv_objs@ -o $@ @recv_ldflags@
-
 slider.o: slider.c
        $(CC) -c -Wall -o $@ -g @GLIB_CFLAGS@  @GTK_CFLAGS@ $<
 
@@ -209,13 +206,16 @@ krell.o: krell.c
        $(CC) -Wall -O -g -fPIC @GTK_CFLAGS@ -c -o $@ krell.c
 
 mysql_selector.o: mysql_selector.c
-       $(CC)  -Wall -O -g @mysql_cppflags@ -c -o $@ $<
+       $(CC) -c $(DEBUG_CPPFLAGS) -Wall -O -g @mysql_cppflags@ $<
 
 %.cmdline.o: %.cmdline.c
        $(CC) -c $(CPPFLAGS) $<
 %.o: %.c
        $(CC) -c $(CPPFLAGS) $(DEBUG_CPPFLAGS) $<
 
+para_recv: @recv_objs@
+       $(CC) @recv_objs@ -o $@ @recv_ldflags@
+
 para_filter: @filter_objs@
        $(CC) @filter_objs@ -o $@ @filter_ldflags@
 
index 705713b94e1d8acd1e2e21bf0e7520c6e155a9b0..7c090c899915cf454abad3c459dc45f0973239f8 100644 (file)
@@ -212,7 +212,7 @@ static void alsa_close(struct writer_node *wn)
        free(pad);
 }
 
-__malloc void *alsa_parse_config(char *options)
+__malloc static void *alsa_parse_config(const char *options)
 {
        struct alsa_write_args_info *conf
                = para_calloc(sizeof(struct alsa_write_args_info));
index e6e9041801e416828d76556929d4a2f7033a1de3..9009123ad6772b9c34c09269b3be3457fde3dfd6 100644 (file)
--- a/audiod.c
+++ b/audiod.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2006 Andre Noll <noll@mathematik.tu-darmstadt.de>
+ * Copyright (C) 2005-2007 Andre Noll <maan@systemlinux.org>
  *
  *     This program is free software; you can redistribute it and/or modify
  *     it under the terms of the GNU General Public License as published by
index 2fa7eb148d6d32bb9e003e4da55b7180bff41375..3bb94ad60a8a1079659105b792068e71045c9e01 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2007 Andre Noll <noll@mathematik.tu-darmstadt.de>
+ * Copyright (C) 2005-2007 Andre Noll <maan@systemlinux.org>
  *
  *     This program is free software; you can redistribute it and/or modify
  *     it under the terms of the GNU General Public License as published by
index 2163b7a91109980936133a5336d22673bba201dc..202152648463af43de0c826e0a1b7448c370ef96 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2006-2007 Andre Noll <maan@systemlinux.org>
  *
  *     This program is free software; you can redistribute it and/or modify
  *     it under the terms of the GNU General Public License as published by
@@ -102,7 +102,7 @@ static void file_write_close(struct writer_node *wn)
        free(pfwd);
 }
 
-__malloc void *file_write_parse_config(char *options)
+__malloc static void *file_write_parse_config(const char *options)
 {
        PARA_INFO_LOG("options: %s\n", options);
        struct file_write_args_info *conf
index e2812fd7904df3d155d422569b74c86683bc4669..0eb19bc58da2f7d78681a793efb746cc0b14bc00 100644 (file)
@@ -766,7 +766,7 @@ out:
  */
 static char *get_selector_info(char *name)
 {
-       char *meta = NULL, *atts = NULL, *info, *dir = NULL, *query, *stream = NULL;
+       char *meta, *atts, *info, *dir, *query, *stream;
        void *result = NULL;
        MYSQL_ROW row = NULL;
 
@@ -792,14 +792,10 @@ write:
                stream, meta, 
                (result && row && row[0])? row[0] : "(no score)",
                atts);
-       if (dir)
-               free(dir);
-       if (meta)
-               free(meta);
-       if (atts)
-               free(atts);
-       if (stream)
-               free(stream);
+       free(dir);
+       free(meta);
+       free(atts);
+       free(stream);
        if (result)
                mysql_free_result(result);
        return info;
@@ -2156,8 +2152,15 @@ static void shutdown_connection(void)
 /**
  * the init function of the mysql-based audio file selector
  *
- * Check the command line options and initialize all function pointers of \a db.
- * Connect to the mysql server and initialize the info string.
+ * \param db pointer to the struct to initialize
+ *
+ * Check the command line options and initialize all function pointers of \a
+ * db.  Connect to the mysql server and initialize the info string.
+ *
+ * \return This function returns success even if it could not connect
+ * to the mysql server. This is because the connect is expected to fail
+ * if there the paraslash database is not yet created. This gives the
+ * user a chance to send the "cdb" to create the database.
  *
  * \sa struct audio_file_selector, misc_meta_data::selector_info,
  * random_selector.c
index f2e5c485e52dada412c0e2c8e7b6bc3971720b7b..95a84f2a548cbe153cff31f1ae831ecb1cebae6a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2006-2007 Andre Noll <maan@systemlinux.org>
  *
  *     This program is free software; you can redistribute it and/or modify
  *     it under the terms of the GNU General Public License as published by
@@ -247,7 +247,7 @@ e0:
        return ret;
 }
 
-__malloc void *osx_write_parse_config(char *options)
+__malloc static void *osx_write_parse_config(const char *options)
 {
        struct osx_write_args_info *conf
                = para_calloc(sizeof(struct osx_write_args_info));
index e5238dbd3bdc20761eb229df02ba2d097125c5af..2c3ff1d0970258d1ddce7471ce4222f87cf6d508 100644 (file)
@@ -38,11 +38,11 @@ privileges right after parsing the command
 line options, but before parsing the
 configuration file. In this case,
 real/effective/saved UID are all set to the
-UID of 'username'. As the configuration file
+UID of 'name'. As the configuration file
 is read afterwards, those options that have a
 default value depending on the UID (e.g. the
 directory for the configuration file) are
-computed by using the uid of 'username'.
+computed by using the uid of 'name'.
 This option has no effect if para_server is
 started as a non-root user (i.e.  EUID != 0)"
 
@@ -59,7 +59,7 @@ Otherwise, real/effective GID and the saved
 set-group ID are all set to the GID given by
 'group'. Must not be given in the config file."
 
-       string typestr="groupname"
+       string typestr="group"
        optional
 
 
diff --git a/write.h b/write.h
index 63efbfed4d381a94783bf7749a4547ba7151099e..9f23663413603d67b7b147763116dc77f2bd210d 100644 (file)
--- a/write.h
+++ b/write.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2006-2007 Andre Noll <maan@systemlinux.org>
  *
  *     This program is free software; you can redistribute it and/or modify
  *     it under the terms of the GNU General Public License as published by
@@ -60,7 +60,7 @@ struct writer {
         * more than once with different values of \a options.
         *
         */
-               void * (*parse_config)(char *options);
+               void * (*parse_config)(const char *options);
        /**
         *
         * open one instance of this writer
index acf1d292a4a33ed8ed7ef2649382c9a2c3f4a3e8..b1ab00cfa97ca9c991396a76a4fc4964eb169232 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2006-2007 Andre Noll <maan@systemlinux.org>
  *
  *     This program is free software; you can redistribute it and/or modify
  *     it under the terms of the GNU General Public License as published by
@@ -149,7 +149,7 @@ void init_supported_writers(void)
                writers[i].init(&writers[i]);
 }
 
-void *check_writer_arg(char *wa, int *writer_num)
+void *check_writer_arg(const char *wa, int *writer_num)
 {
        int i;