[pulseaudio-commits] r2043 - in /trunk/src: daemon/ modules/ modules/gconf/ modules/rtp/ pulsecore/

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Fri Nov 9 10:25:41 PST 2007


Author: lennart
Date: Fri Nov  9 19:25:40 2007
New Revision: 2043

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=2043&root=pulseaudio&view=rev
Log:
tag modules that may only be loaded once at most especially, and enforce that in the module loader

Modified:
    trunk/src/daemon/dumpmodules.c
    trunk/src/modules/gconf/module-gconf.c
    trunk/src/modules/module-alsa-sink.c
    trunk/src/modules/module-alsa-source.c
    trunk/src/modules/module-cli.c
    trunk/src/modules/module-combine.c
    trunk/src/modules/module-default-device-restore.c
    trunk/src/modules/module-defs.h.m4
    trunk/src/modules/module-detect.c
    trunk/src/modules/module-esound-compat-spawnfd.c
    trunk/src/modules/module-esound-compat-spawnpid.c
    trunk/src/modules/module-esound-sink.c
    trunk/src/modules/module-hal-detect.c
    trunk/src/modules/module-jack-sink.c
    trunk/src/modules/module-jack-source.c
    trunk/src/modules/module-ladspa-sink.c
    trunk/src/modules/module-lirc.c
    trunk/src/modules/module-match.c
    trunk/src/modules/module-mmkbd-evdev.c
    trunk/src/modules/module-native-protocol-fd.c
    trunk/src/modules/module-null-sink.c
    trunk/src/modules/module-oss.c
    trunk/src/modules/module-pipe-sink.c
    trunk/src/modules/module-pipe-source.c
    trunk/src/modules/module-protocol-stub.c
    trunk/src/modules/module-remap-sink.c
    trunk/src/modules/module-rescue-streams.c
    trunk/src/modules/module-sine.c
    trunk/src/modules/module-suspend-on-idle.c
    trunk/src/modules/module-tunnel.c
    trunk/src/modules/module-volume-restore.c
    trunk/src/modules/module-x11-bell.c
    trunk/src/modules/module-x11-publish.c
    trunk/src/modules/module-x11-xsmp.c
    trunk/src/modules/module-zeroconf-discover.c
    trunk/src/modules/module-zeroconf-publish.c
    trunk/src/modules/rtp/module-rtp-recv.c
    trunk/src/modules/rtp/module-rtp-send.c
    trunk/src/pulsecore/modinfo.c
    trunk/src/pulsecore/modinfo.h
    trunk/src/pulsecore/module.c
    trunk/src/pulsecore/module.h

Modified: trunk/src/daemon/dumpmodules.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/daemon/dumpmodules.c?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/daemon/dumpmodules.c (original)
+++ trunk/src/daemon/dumpmodules.c Fri Nov  9 19:25:40 2007
@@ -71,6 +71,7 @@
             printf("Author: %s\n", i->author);
         if (i->usage)
             printf("Usage: %s\n", i->usage);
+        printf("Load Once: %s\n", pa_yes_no(i->load_once));
     }
 
     if (path)

Modified: trunk/src/modules/gconf/module-gconf.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/gconf/module-gconf.c?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/modules/gconf/module-gconf.c (original)
+++ trunk/src/modules/gconf/module-gconf.c Fri Nov  9 19:25:40 2007
@@ -53,10 +53,10 @@
 
 #include "module-gconf-symdef.h"
 
-PA_MODULE_AUTHOR("Lennart Poettering")
-PA_MODULE_DESCRIPTION("GConf Adapter")
-PA_MODULE_VERSION(PACKAGE_VERSION)
-PA_MODULE_USAGE("")
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_DESCRIPTION("GConf Adapter");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_LOAD_ONCE(TRUE);
 
 #define MAX_MODULES 10
 #define BUF_MAX 2048

Modified: trunk/src/modules/module-alsa-sink.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-alsa-sink.c?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/modules/module-alsa-sink.c (original)
+++ trunk/src/modules/module-alsa-sink.c Fri Nov  9 19:25:40 2007
@@ -50,9 +50,10 @@
 #include "alsa-util.h"
 #include "module-alsa-sink-symdef.h"
 
-PA_MODULE_AUTHOR("Lennart Poettering")
-PA_MODULE_DESCRIPTION("ALSA Sink")
-PA_MODULE_VERSION(PACKAGE_VERSION)
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_DESCRIPTION("ALSA Sink");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_LOAD_ONCE(FALSE);
 PA_MODULE_USAGE(
         "sink_name=<name for the sink> "
         "device=<ALSA device> "
@@ -62,7 +63,7 @@
         "fragments=<number of fragments> "
         "fragment_size=<fragment size> "
         "channel_map=<channel map> "
-        "mmap=<enable memory mapping?>")
+        "mmap=<enable memory mapping?>");
 
 #define DEFAULT_DEVICE "default"
 

Modified: trunk/src/modules/module-alsa-source.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-alsa-source.c?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/modules/module-alsa-source.c (original)
+++ trunk/src/modules/module-alsa-source.c Fri Nov  9 19:25:40 2007
@@ -51,9 +51,10 @@
 #include "alsa-util.h"
 #include "module-alsa-source-symdef.h"
 
-PA_MODULE_AUTHOR("Lennart Poettering")
-PA_MODULE_DESCRIPTION("ALSA Source")
-PA_MODULE_VERSION(PACKAGE_VERSION)
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_DESCRIPTION("ALSA Source");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_LOAD_ONCE(FALSE);
 PA_MODULE_USAGE(
         "source_name=<name for the source> "
         "device=<ALSA device> "
@@ -63,7 +64,7 @@
         "fragments=<number of fragments> "
         "fragment_size=<fragment size> "
         "channel_map=<channel map> "
-        "mmap=<enable memory mapping?>")
+        "mmap=<enable memory mapping?>");
 
 #define DEFAULT_DEVICE "default"
 

Modified: trunk/src/modules/module-cli.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-cli.c?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/modules/module-cli.c (original)
+++ trunk/src/modules/module-cli.c Fri Nov  9 19:25:40 2007
@@ -38,10 +38,11 @@
 
 #include "module-cli-symdef.h"
 
-PA_MODULE_AUTHOR("Lennart Poettering")
-PA_MODULE_DESCRIPTION("Command line interface")
-PA_MODULE_VERSION(PACKAGE_VERSION)
-PA_MODULE_USAGE("exit_on_eof=<exit daemon after EOF?>")
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_DESCRIPTION("Command line interface");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_LOAD_ONCE(TRUE);
+PA_MODULE_USAGE("exit_on_eof=<exit daemon after EOF?>");
 
 static const char* const valid_modargs[] = {
     "exit_on_eof",

Modified: trunk/src/modules/module-combine.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-combine.c?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/modules/module-combine.c (original)
+++ trunk/src/modules/module-combine.c Fri Nov  9 19:25:40 2007
@@ -50,9 +50,10 @@
 
 #include "module-combine-symdef.h"
 
-PA_MODULE_AUTHOR("Lennart Poettering")
-PA_MODULE_DESCRIPTION("Combine multiple sinks to one")
-PA_MODULE_VERSION(PACKAGE_VERSION)
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_DESCRIPTION("Combine multiple sinks to one");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_LOAD_ONCE(FALSE);
 PA_MODULE_USAGE(
         "sink_name=<name for the sink> "
         "master=<master sink> "
@@ -62,7 +63,7 @@
         "format=<sample format> "
         "channels=<number of channels> "
         "rate=<sample rate> "
-        "channel_map=<channel map>")
+        "channel_map=<channel map>");
 
 #define DEFAULT_SINK_NAME "combined"
 #define MEMBLOCKQ_MAXLENGTH (1024*170)

Modified: trunk/src/modules/module-default-device-restore.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-default-device-restore.c?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/modules/module-default-device-restore.c (original)
+++ trunk/src/modules/module-default-device-restore.c Fri Nov  9 19:25:40 2007
@@ -32,9 +32,10 @@
 
 #include "module-default-device-restore-symdef.h"
 
-PA_MODULE_AUTHOR("Lennart Poettering")
-PA_MODULE_DESCRIPTION("Automatically restore the default sink and source")
-PA_MODULE_VERSION(PACKAGE_VERSION)
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_DESCRIPTION("Automatically restore the default sink and source");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_LOAD_ONCE(TRUE);
 
 #define DEFAULT_SINK_FILE "default-sink"
 #define DEFAULT_SOURCE_FILE "default-source"
@@ -98,6 +99,3 @@
         fclose(f);
     }
 }
-
-
-

Modified: trunk/src/modules/module-defs.h.m4
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-defs.h.m4?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/modules/module-defs.h.m4 (original)
+++ trunk/src/modules/module-defs.h.m4 Fri Nov  9 19:25:40 2007
@@ -10,6 +10,7 @@
 
 #include <pulsecore/core.h>
 #include <pulsecore/module.h>
+#include <pulsecore/macro.h>
 
 gen_symbol(pa__init)
 gen_symbol(pa__done)
@@ -17,6 +18,7 @@
 gen_symbol(pa__get_description)
 gen_symbol(pa__get_usage)
 gen_symbol(pa__get_version)
+gen_symbol(pa__load_once)
 
 int pa__init(pa_module*m);
 void pa__done(pa_module*m);
@@ -25,5 +27,6 @@
 const char* pa__get_description(void);
 const char* pa__get_usage(void);
 const char* pa__get_version(void);
+pa_bool_t pa__load_once(void);
 
 #endif

Modified: trunk/src/modules/module-detect.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-detect.c?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/modules/module-detect.c (original)
+++ trunk/src/modules/module-detect.c Fri Nov  9 19:25:40 2007
@@ -47,10 +47,11 @@
 
 #include "module-detect-symdef.h"
 
-PA_MODULE_AUTHOR("Lennart Poettering")
-PA_MODULE_DESCRIPTION("Detect available audio hardware and load matching drivers")
-PA_MODULE_VERSION(PACKAGE_VERSION)
-PA_MODULE_USAGE("just-one=<boolean>")
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_DESCRIPTION("Detect available audio hardware and load matching drivers");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_LOAD_ONCE(TRUE);
+PA_MODULE_USAGE("just-one=<boolean>");
 
 static const char* const valid_modargs[] = {
     "just-one",

Modified: trunk/src/modules/module-esound-compat-spawnfd.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-esound-compat-spawnfd.c?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/modules/module-esound-compat-spawnfd.c (original)
+++ trunk/src/modules/module-esound-compat-spawnfd.c Fri Nov  9 19:25:40 2007
@@ -37,10 +37,11 @@
 
 #include "module-esound-compat-spawnfd-symdef.h"
 
-PA_MODULE_AUTHOR("Lennart Poettering")
-PA_MODULE_DESCRIPTION("ESOUND compatibility module: -spawnfd emulation")
-PA_MODULE_USAGE("fd=<file descriptor>")
-PA_MODULE_VERSION(PACKAGE_VERSION)
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_DESCRIPTION("ESOUND compatibility module: -spawnfd emulation");
+PA_MODULE_LOAD_ONCE(TRUE);
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_USAGE("fd=<file descriptor>");
 
 static const char* const valid_modargs[] = {
     "fd",

Modified: trunk/src/modules/module-esound-compat-spawnpid.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-esound-compat-spawnpid.c?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/modules/module-esound-compat-spawnpid.c (original)
+++ trunk/src/modules/module-esound-compat-spawnpid.c Fri Nov  9 19:25:40 2007
@@ -37,10 +37,11 @@
 
 #include "module-esound-compat-spawnpid-symdef.h"
 
-PA_MODULE_AUTHOR("Lennart Poettering")
-PA_MODULE_DESCRIPTION("ESOUND compatibility module: -spawnpid emulation")
-PA_MODULE_USAGE("pid=<process id>")
-PA_MODULE_VERSION(PACKAGE_VERSION)
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_DESCRIPTION("ESOUND compatibility module: -spawnpid emulation");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_LOAD_ONCE(TRUE);
+PA_MODULE_USAGE("pid=<process id>");
 
 static const char* const valid_modargs[] = {
     "pid",

Modified: trunk/src/modules/module-esound-sink.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-esound-sink.c?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/modules/module-esound-sink.c (original)
+++ trunk/src/modules/module-esound-sink.c Fri Nov  9 19:25:40 2007
@@ -64,15 +64,16 @@
 
 #include "module-esound-sink-symdef.h"
 
-PA_MODULE_AUTHOR("Lennart Poettering")
-PA_MODULE_DESCRIPTION("ESOUND Sink")
-PA_MODULE_VERSION(PACKAGE_VERSION)
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_DESCRIPTION("ESOUND Sink");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_LOAD_ONCE(FALSE);
 PA_MODULE_USAGE(
         "sink_name=<name for the sink> "
         "server=<address> cookie=<filename>  "
         "format=<sample format> "
         "channels=<number of channels> "
-        "rate=<sample rate>")
+        "rate=<sample rate>");
 
 #define DEFAULT_SINK_NAME "esound_out"
 

Modified: trunk/src/modules/module-hal-detect.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-hal-detect.c?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/modules/module-hal-detect.c (original)
+++ trunk/src/modules/module-hal-detect.c Fri Nov  9 19:25:40 2007
@@ -53,15 +53,16 @@
 #include "dbus-util.h"
 #include "module-hal-detect-symdef.h"
 
-PA_MODULE_AUTHOR("Shahms King")
-PA_MODULE_DESCRIPTION("Detect available audio hardware and load matching drivers")
-PA_MODULE_VERSION(PACKAGE_VERSION)
+PA_MODULE_AUTHOR("Shahms King");
+PA_MODULE_DESCRIPTION("Detect available audio hardware and load matching drivers");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_LOAD_ONCE(TRUE);
 #if defined(HAVE_ALSA) && defined(HAVE_OSS)
-PA_MODULE_USAGE("api=<alsa or oss>")
+PA_MODULE_USAGE("api=<alsa or oss>");
 #elif defined(HAVE_ALSA)
-PA_MODULE_USAGE("api=<alsa>")
+PA_MODULE_USAGE("api=<alsa>");
 #elif defined(HAVE_OSS)
-PA_MODULE_USAGE("api=<oss>")
+PA_MODULE_USAGE("api=<oss>");
 #endif
 
 struct device {

Modified: trunk/src/modules/module-jack-sink.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-jack-sink.c?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/modules/module-jack-sink.c (original)
+++ trunk/src/modules/module-jack-sink.c Fri Nov  9 19:25:40 2007
@@ -64,16 +64,17 @@
  * source support in JACK.
  */
 
-PA_MODULE_AUTHOR("Lennart Poettering")
-PA_MODULE_DESCRIPTION("JACK Sink")
-PA_MODULE_VERSION(PACKAGE_VERSION)
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_DESCRIPTION("JACK Sink");
+PA_MODULE_LOAD_ONCE(TRUE);
+PA_MODULE_VERSION(PACKAGE_VERSION);
 PA_MODULE_USAGE(
         "sink_name=<name of sink> "
         "server_name=<jack server name> "
         "client_name=<jack client name> "
         "channels=<number of channels> "
         "connect=<connect ports?> "
-        "channel_map=<channel map>")
+        "channel_map=<channel map>");
 
 #define DEFAULT_SINK_NAME "jack_out"
 

Modified: trunk/src/modules/module-jack-source.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-jack-source.c?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/modules/module-jack-source.c (original)
+++ trunk/src/modules/module-jack-source.c Fri Nov  9 19:25:40 2007
@@ -54,16 +54,17 @@
 /* See module-jack-sink for a few comments how this module basically
  * works */
 
-PA_MODULE_AUTHOR("Lennart Poettering")
-PA_MODULE_DESCRIPTION("JACK Source")
-PA_MODULE_VERSION(PACKAGE_VERSION)
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_DESCRIPTION("JACK Source");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_LOAD_ONCE(TRUE);
 PA_MODULE_USAGE(
         "source_name=<name of source> "
         "server_name=<jack server name> "
         "client_name=<jack client name> "
         "channels=<number of channels> "
         "connect=<connect ports?>"
-        "channel_map=<channel map>")
+        "channel_map=<channel map>");
 
 #define DEFAULT_SOURCE_NAME "jack_in"
 

Modified: trunk/src/modules/module-ladspa-sink.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-ladspa-sink.c?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/modules/module-ladspa-sink.c (original)
+++ trunk/src/modules/module-ladspa-sink.c Fri Nov  9 19:25:40 2007
@@ -45,9 +45,10 @@
 #include "module-ladspa-sink-symdef.h"
 #include "ladspa.h"
 
-PA_MODULE_AUTHOR("Lennart Poettering")
-PA_MODULE_DESCRIPTION("Virtual LADSPA sink")
-PA_MODULE_VERSION(PACKAGE_VERSION)
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_DESCRIPTION("Virtual LADSPA sink");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_LOAD_ONCE(FALSE);
 PA_MODULE_USAGE(
         "sink_name=<name for the sink> "
         "master=<name of sink to remap> "
@@ -57,7 +58,7 @@
         "channel_map=<channel map> "
         "plugin=<ladspa plugin name> "
         "label=<ladspa plugin label> "
-        "control=<comma seperated list of input control values>")
+        "control=<comma seperated list of input control values>");
 
 struct userdata {
     pa_core *core;

Modified: trunk/src/modules/module-lirc.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-lirc.c?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/modules/module-lirc.c (original)
+++ trunk/src/modules/module-lirc.c Fri Nov  9 19:25:40 2007
@@ -43,10 +43,11 @@
 
 #include "module-lirc-symdef.h"
 
-PA_MODULE_AUTHOR("Lennart Poettering")
-PA_MODULE_DESCRIPTION("LIRC volume control")
-PA_MODULE_VERSION(PACKAGE_VERSION)
-PA_MODULE_USAGE("config=<config file> sink=<sink name> appname=<lirc application name>")
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_DESCRIPTION("LIRC volume control");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_LOAD_ONCE(TRUE);
+PA_MODULE_USAGE("config=<config file> sink=<sink name> appname=<lirc application name>");
 
 static const char* const valid_modargs[] = {
     "config",

Modified: trunk/src/modules/module-match.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-match.c?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/modules/module-match.c (original)
+++ trunk/src/modules/module-match.c Fri Nov  9 19:25:40 2007
@@ -46,10 +46,11 @@
 
 #include "module-match-symdef.h"
 
-PA_MODULE_AUTHOR("Lennart Poettering")
-PA_MODULE_DESCRIPTION("Playback stream expression matching module")
-PA_MODULE_USAGE("table=<filename>")
-PA_MODULE_VERSION(PACKAGE_VERSION)
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_DESCRIPTION("Playback stream expression matching module");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_LOAD_ONCE(TRUE);
+PA_MODULE_USAGE("table=<filename>");
 
 #define WHITESPACE "\n\r \t"
 
@@ -241,5 +242,3 @@
 
     pa_xfree(u);
 }
-
-

Modified: trunk/src/modules/module-mmkbd-evdev.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-mmkbd-evdev.c?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/modules/module-mmkbd-evdev.c (original)
+++ trunk/src/modules/module-mmkbd-evdev.c Fri Nov  9 19:25:40 2007
@@ -46,10 +46,11 @@
 
 #include "module-mmkbd-evdev-symdef.h"
 
-PA_MODULE_AUTHOR("Lennart Poettering")
-PA_MODULE_DESCRIPTION("Multimedia keyboard support via Linux evdev")
-PA_MODULE_VERSION(PACKAGE_VERSION)
-PA_MODULE_USAGE("device=<evdev device> sink=<sink name>")
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_DESCRIPTION("Multimedia keyboard support via Linux evdev");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_LOAD_ONCE(FALSE);
+PA_MODULE_USAGE("device=<evdev device> sink=<sink name>");
 
 #define DEFAULT_DEVICE "/dev/input/event0"
 

Modified: trunk/src/modules/module-native-protocol-fd.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-native-protocol-fd.c?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/modules/module-native-protocol-fd.c (original)
+++ trunk/src/modules/module-native-protocol-fd.c Fri Nov  9 19:25:40 2007
@@ -37,9 +37,10 @@
 
 #include "module-native-protocol-fd-symdef.h"
 
-PA_MODULE_AUTHOR("Lennart Poettering")
-PA_MODULE_DESCRIPTION("Native protocol autospawn helper")
-PA_MODULE_VERSION(PACKAGE_VERSION)
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_DESCRIPTION("Native protocol autospawn helper");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_LOAD_ONCE(TRUE);
 
 static const char* const valid_modargs[] = {
     "fd",

Modified: trunk/src/modules/module-null-sink.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-null-sink.c?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/modules/module-null-sink.c (original)
+++ trunk/src/modules/module-null-sink.c Fri Nov  9 19:25:40 2007
@@ -51,16 +51,17 @@
 
 #include "module-null-sink-symdef.h"
 
-PA_MODULE_AUTHOR("Lennart Poettering")
-PA_MODULE_DESCRIPTION("Clocked NULL sink")
-PA_MODULE_VERSION(PACKAGE_VERSION)
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_DESCRIPTION("Clocked NULL sink");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_LOAD_ONCE(FALSE);
 PA_MODULE_USAGE(
         "format=<sample format> "
         "channels=<number of channels> "
         "rate=<sample rate> "
         "sink_name=<name of sink>"
         "channel_map=<channel map>"
-        "description=<description for the sink>")
+        "description=<description for the sink>");
 
 #define DEFAULT_SINK_NAME "null"
 

Modified: trunk/src/modules/module-oss.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-oss.c?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/modules/module-oss.c (original)
+++ trunk/src/modules/module-oss.c Fri Nov  9 19:25:40 2007
@@ -76,9 +76,10 @@
 #include "oss-util.h"
 #include "module-oss-symdef.h"
 
-PA_MODULE_AUTHOR("Lennart Poettering")
-PA_MODULE_DESCRIPTION("OSS Sink/Source")
-PA_MODULE_VERSION(PACKAGE_VERSION)
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_DESCRIPTION("OSS Sink/Source");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_LOAD_ONCE(FALSE);
 PA_MODULE_USAGE(
         "sink_name=<name for the sink> "
         "source_name=<name for the source> "
@@ -91,7 +92,7 @@
         "fragments=<number of fragments> "
         "fragment_size=<fragment size> "
         "channel_map=<channel map> "
-        "mmap=<enable memory mapping?>")
+        "mmap=<enable memory mapping?>");
 
 #define DEFAULT_DEVICE "/dev/dsp"
 

Modified: trunk/src/modules/module-pipe-sink.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-pipe-sink.c?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/modules/module-pipe-sink.c (original)
+++ trunk/src/modules/module-pipe-sink.c Fri Nov  9 19:25:40 2007
@@ -50,16 +50,17 @@
 
 #include "module-pipe-sink-symdef.h"
 
-PA_MODULE_AUTHOR("Lennart Poettering")
-PA_MODULE_DESCRIPTION("UNIX pipe sink")
-PA_MODULE_VERSION(PACKAGE_VERSION)
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_DESCRIPTION("UNIX pipe sink");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_LOAD_ONCE(FALSE);
 PA_MODULE_USAGE(
         "sink_name=<name for the sink> "
         "file=<path of the FIFO> "
         "format=<sample format> "
         "channels=<number of channels> "
         "rate=<sample rate>"
-        "channel_map=<channel map>")
+        "channel_map=<channel map>");
 
 #define DEFAULT_FILE_NAME "/tmp/music.output"
 #define DEFAULT_SINK_NAME "fifo_output"

Modified: trunk/src/modules/module-pipe-source.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-pipe-source.c?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/modules/module-pipe-source.c (original)
+++ trunk/src/modules/module-pipe-source.c Fri Nov  9 19:25:40 2007
@@ -49,16 +49,17 @@
 
 #include "module-pipe-source-symdef.h"
 
-PA_MODULE_AUTHOR("Lennart Poettering")
-PA_MODULE_DESCRIPTION("UNIX pipe source")
-PA_MODULE_VERSION(PACKAGE_VERSION)
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_DESCRIPTION("UNIX pipe source");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_LOAD_ONCE(FALSE);
 PA_MODULE_USAGE(
         "source_name=<name for the source> "
         "file=<path of the FIFO> "
         "format=<sample format> "
         "channels=<number of channels> "
         "rate=<sample rate> "
-        "channel_map=<channel map>")
+        "channel_map=<channel map>");
 
 #define DEFAULT_FILE_NAME "/tmp/music.input"
 #define DEFAULT_SOURCE_NAME "fifo_input"

Modified: trunk/src/modules/module-protocol-stub.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-protocol-stub.c?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/modules/module-protocol-stub.c (original)
+++ trunk/src/modules/module-protocol-stub.c Fri Nov  9 19:25:40 2007
@@ -76,7 +76,7 @@
   #else
     #include "module-simple-protocol-unix-symdef.h"
   #endif
-  PA_MODULE_DESCRIPTION("Simple protocol "SOCKET_DESCRIPTION)
+PA_MODULE_DESCRIPTION("Simple protocol "SOCKET_DESCRIPTION);
   PA_MODULE_USAGE("rate=<sample rate> "
                   "format=<sample format> "
                   "channels=<number of channels> "
@@ -84,7 +84,7 @@
                   "source=<source to connect to> "
                   "playback=<enable playback?> "
                   "record=<enable record?> "
-                  SOCKET_USAGE)
+                  SOCKET_USAGE);
 #elif defined(USE_PROTOCOL_CLI)
   #include <pulsecore/protocol-cli.h>
   #define protocol_new pa_protocol_cli_new
@@ -98,8 +98,8 @@
   #else
     #include "module-cli-protocol-unix-symdef.h"
   #endif
-  PA_MODULE_DESCRIPTION("Command line interface protocol "SOCKET_DESCRIPTION)
-  PA_MODULE_USAGE(SOCKET_USAGE)
+  PA_MODULE_DESCRIPTION("Command line interface protocol "SOCKET_DESCRIPTION);
+  PA_MODULE_USAGE(SOCKET_USAGE);
 #elif defined(USE_PROTOCOL_HTTP)
   #include <pulsecore/protocol-http.h>
   #define protocol_new pa_protocol_http_new
@@ -113,8 +113,8 @@
   #else
     #include "module-http-protocol-unix-symdef.h"
   #endif
-  PA_MODULE_DESCRIPTION("HTTP "SOCKET_DESCRIPTION)
-  PA_MODULE_USAGE(SOCKET_USAGE)
+  PA_MODULE_DESCRIPTION("HTTP "SOCKET_DESCRIPTION);
+  PA_MODULE_USAGE(SOCKET_USAGE);
 #elif defined(USE_PROTOCOL_NATIVE)
   #include <pulsecore/protocol-native.h>
   #define protocol_new pa_protocol_native_new
@@ -140,11 +140,11 @@
     #define AUTH_USAGE
   #endif
 
-  PA_MODULE_DESCRIPTION("Native protocol "SOCKET_DESCRIPTION)
+  PA_MODULE_DESCRIPTION("Native protocol "SOCKET_DESCRIPTION);
   PA_MODULE_USAGE("auth-anonymous=<don't check for cookies?> "
                   "cookie=<path to cookie file> "
                   AUTH_USAGE
-                  SOCKET_USAGE)
+                  SOCKET_USAGE);
 #elif defined(USE_PROTOCOL_ESOUND)
   #include <pulsecore/protocol-esound.h>
   #include <pulsecore/esound.h>
@@ -167,19 +167,20 @@
     #define AUTH_USAGE
   #endif
 
-  PA_MODULE_DESCRIPTION("ESOUND protocol "SOCKET_DESCRIPTION)
+  PA_MODULE_DESCRIPTION("ESOUND protocol "SOCKET_DESCRIPTION);
   PA_MODULE_USAGE("sink=<sink to connect to> "
                   "source=<source to connect to> "
                   "auth-anonymous=<don't verify cookies?> "
                   "cookie=<path to cookie file> "
                   AUTH_USAGE
-                  SOCKET_USAGE)
+                  SOCKET_USAGE);
 #else
   #error "Broken build system"
 #endif
 
-PA_MODULE_AUTHOR("Lennart Poettering")
-PA_MODULE_VERSION(PACKAGE_VERSION)
+PA_MODULE_LOAD_ONCE(FALSE);
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_VERSION(PACKAGE_VERSION);
 
 static const char* const valid_modargs[] = {
     MODULE_ARGUMENTS

Modified: trunk/src/modules/module-remap-sink.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-remap-sink.c?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/modules/module-remap-sink.c (original)
+++ trunk/src/modules/module-remap-sink.c Fri Nov  9 19:25:40 2007
@@ -40,9 +40,10 @@
 
 #include "module-remap-sink-symdef.h"
 
-PA_MODULE_AUTHOR("Lennart Poettering")
-PA_MODULE_DESCRIPTION("Virtual channel remapping sink")
-PA_MODULE_VERSION(PACKAGE_VERSION)
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_DESCRIPTION("Virtual channel remapping sink");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_LOAD_ONCE(FALSE);
 PA_MODULE_USAGE(
         "sink_name=<name for the sink> "
         "master=<name of sink to remap> "
@@ -50,7 +51,7 @@
         "format=<sample format> "
         "channels=<number of channels> "
         "rate=<sample rate> "
-        "channel_map=<channel map>")
+        "channel_map=<channel map>");
 
 struct userdata {
     pa_core *core;

Modified: trunk/src/modules/module-rescue-streams.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-rescue-streams.c?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/modules/module-rescue-streams.c (original)
+++ trunk/src/modules/module-rescue-streams.c Fri Nov  9 19:25:40 2007
@@ -36,9 +36,10 @@
 
 #include "module-rescue-streams-symdef.h"
 
-PA_MODULE_AUTHOR("Lennart Poettering")
-PA_MODULE_DESCRIPTION("When a sink/source is removed, try to move their streams to the default sink/source")
-PA_MODULE_VERSION(PACKAGE_VERSION)
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_DESCRIPTION("When a sink/source is removed, try to move their streams to the default sink/source");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_LOAD_ONCE(TRUE);
 
 static const char* const valid_modargs[] = {
     NULL,

Modified: trunk/src/modules/module-sine.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-sine.c?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/modules/module-sine.c (original)
+++ trunk/src/modules/module-sine.c Fri Nov  9 19:25:40 2007
@@ -39,10 +39,11 @@
 
 #include "module-sine-symdef.h"
 
-PA_MODULE_AUTHOR("Lennart Poettering")
-PA_MODULE_DESCRIPTION("Sine wave generator")
-PA_MODULE_USAGE("sink=<sink to connect to> frequency=<frequency in Hz>")
-PA_MODULE_VERSION(PACKAGE_VERSION)
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_DESCRIPTION("Sine wave generator");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_LOAD_ONCE(FALSE);
+PA_MODULE_USAGE("sink=<sink to connect to> frequency=<frequency in Hz>");
 
 struct userdata {
     pa_core *core;
@@ -203,4 +204,3 @@
 
     pa_xfree(u);
 }
-

Modified: trunk/src/modules/module-suspend-on-idle.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-suspend-on-idle.c?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/modules/module-suspend-on-idle.c (original)
+++ trunk/src/modules/module-suspend-on-idle.c Fri Nov  9 19:25:40 2007
@@ -37,9 +37,10 @@
 
 #include "module-suspend-on-idle-symdef.h"
 
-PA_MODULE_AUTHOR("Lennart Poettering")
-PA_MODULE_DESCRIPTION("When a sink/source is idle for too long, suspend it")
-PA_MODULE_VERSION(PACKAGE_VERSION)
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_DESCRIPTION("When a sink/source is idle for too long, suspend it");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_LOAD_ONCE(TRUE);
 
 static const char* const valid_modargs[] = {
     "timeout",

Modified: trunk/src/modules/module-tunnel.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-tunnel.c?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/modules/module-tunnel.c (original)
+++ trunk/src/modules/module-tunnel.c Fri Nov  9 19:25:40 2007
@@ -59,7 +59,8 @@
 
 #ifdef TUNNEL_SINK
 #include "module-tunnel-sink-symdef.h"
-PA_MODULE_DESCRIPTION("Tunnel module for sinks")
+PA_MODULE_DESCRIPTION("Tunnel module for sinks");
+PA_MODULE_LOAD_ONCE(FALSE);
 PA_MODULE_USAGE(
         "server=<address> "
         "sink=<remote sink name> "
@@ -68,10 +69,10 @@
         "channels=<number of channels> "
         "rate=<sample rate> "
         "sink_name=<name for the local sink> "
-        "channel_map=<channel map>")
+        "channel_map=<channel map>");
 #else
 #include "module-tunnel-source-symdef.h"
-PA_MODULE_DESCRIPTION("Tunnel module for sources")
+PA_MODULE_DESCRIPTION("Tunnel module for sources");
 PA_MODULE_USAGE(
         "server=<address> "
         "source=<remote source name> "
@@ -80,11 +81,11 @@
         "channels=<number of channels> "
         "rate=<sample rate> "
         "source_name=<name for the local source> "
-        "channel_map=<channel map>")
-#endif
-
-PA_MODULE_AUTHOR("Lennart Poettering")
-PA_MODULE_VERSION(PACKAGE_VERSION)
+        "channel_map=<channel map>");
+#endif
+
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_VERSION(PACKAGE_VERSION);
 
 #define DEFAULT_TLENGTH_MSEC 100
 #define DEFAULT_MINREQ_MSEC 10

Modified: trunk/src/modules/module-volume-restore.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-volume-restore.c?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/modules/module-volume-restore.c (original)
+++ trunk/src/modules/module-volume-restore.c Fri Nov  9 19:25:40 2007
@@ -48,10 +48,11 @@
 
 #include "module-volume-restore-symdef.h"
 
-PA_MODULE_AUTHOR("Lennart Poettering")
-PA_MODULE_DESCRIPTION("Automatically restore the volume and the devices of streams")
-PA_MODULE_USAGE("table=<filename>")
-PA_MODULE_VERSION(PACKAGE_VERSION)
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_DESCRIPTION("Automatically restore the volume and the devices of streams");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_LOAD_ONCE(TRUE);
+PA_MODULE_USAGE("table=<filename>");
 
 #define WHITESPACE "\n\r \t"
 

Modified: trunk/src/modules/module-x11-bell.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-x11-bell.c?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/modules/module-x11-bell.c (original)
+++ trunk/src/modules/module-x11-bell.c Fri Nov  9 19:25:40 2007
@@ -44,10 +44,11 @@
 
 #include "module-x11-bell-symdef.h"
 
-PA_MODULE_AUTHOR("Lennart Poettering")
-PA_MODULE_DESCRIPTION("X11 Bell interceptor")
-PA_MODULE_VERSION(PACKAGE_VERSION)
-PA_MODULE_USAGE("sink=<sink to connect to> sample=<sample name> display=<X11 display>")
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_DESCRIPTION("X11 Bell interceptor");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_LOAD_ONCE(FALSE);
+PA_MODULE_USAGE("sink=<sink to connect to> sample=<sample name> display=<X11 display>");
 
 struct userdata {
     pa_core *core;

Modified: trunk/src/modules/module-x11-publish.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-x11-publish.c?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/modules/module-x11-publish.c (original)
+++ trunk/src/modules/module-x11-publish.c Fri Nov  9 19:25:40 2007
@@ -53,10 +53,11 @@
 
 #include "module-x11-publish-symdef.h"
 
-PA_MODULE_AUTHOR("Lennart Poettering")
-PA_MODULE_DESCRIPTION("X11 Credential Publisher")
-PA_MODULE_VERSION(PACKAGE_VERSION)
-PA_MODULE_USAGE("display=<X11 display>")
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_DESCRIPTION("X11 Credential Publisher");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_LOAD_ONCE(FALSE);
+PA_MODULE_USAGE("display=<X11 display>");
 
 static const char* const valid_modargs[] = {
     "display",

Modified: trunk/src/modules/module-x11-xsmp.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-x11-xsmp.c?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/modules/module-x11-xsmp.c (original)
+++ trunk/src/modules/module-x11-xsmp.c Fri Nov  9 19:25:40 2007
@@ -45,9 +45,10 @@
 
 #include "module-x11-xsmp-symdef.h"
 
-PA_MODULE_AUTHOR("Lennart Poettering")
-PA_MODULE_DESCRIPTION("X11 session management")
-PA_MODULE_VERSION(PACKAGE_VERSION)
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_DESCRIPTION("X11 session management");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_LOAD_ONCE(TRUE);
 
 static int ice_in_use = 0;
 

Modified: trunk/src/modules/module-zeroconf-discover.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-zeroconf-discover.c?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/modules/module-zeroconf-discover.c (original)
+++ trunk/src/modules/module-zeroconf-discover.c Fri Nov  9 19:25:40 2007
@@ -53,9 +53,10 @@
 
 #include "module-zeroconf-discover-symdef.h"
 
-PA_MODULE_AUTHOR("Lennart Poettering")
-PA_MODULE_DESCRIPTION("mDNS/DNS-SD Service Discovery")
-PA_MODULE_VERSION(PACKAGE_VERSION)
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_DESCRIPTION("mDNS/DNS-SD Service Discovery");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_LOAD_ONCE(TRUE);
 
 #define SERVICE_TYPE_SINK "_pulse-sink._tcp"
 #define SERVICE_TYPE_SOURCE "_non-monitor._sub._pulse-source._tcp"

Modified: trunk/src/modules/module-zeroconf-publish.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-zeroconf-publish.c?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/modules/module-zeroconf-publish.c (original)
+++ trunk/src/modules/module-zeroconf-publish.c Fri Nov  9 19:25:40 2007
@@ -52,10 +52,11 @@
 
 #include "module-zeroconf-publish-symdef.h"
 
-PA_MODULE_AUTHOR("Lennart Poettering")
-PA_MODULE_DESCRIPTION("mDNS/DNS-SD Service Publisher")
-PA_MODULE_VERSION(PACKAGE_VERSION)
-PA_MODULE_USAGE("port=<IP port number>")
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_DESCRIPTION("mDNS/DNS-SD Service Publisher");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_LOAD_ONCE(TRUE);
+PA_MODULE_USAGE("port=<IP port number>");
 
 #define SERVICE_TYPE_SINK "_pulse-sink._tcp"
 #define SERVICE_TYPE_SOURCE "_pulse-source._tcp"

Modified: trunk/src/modules/rtp/module-rtp-recv.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/rtp/module-rtp-recv.c?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/modules/rtp/module-rtp-recv.c (original)
+++ trunk/src/modules/rtp/module-rtp-recv.c Fri Nov  9 19:25:40 2007
@@ -58,13 +58,14 @@
 #include "sdp.h"
 #include "sap.h"
 
-PA_MODULE_AUTHOR("Lennart Poettering")
-PA_MODULE_DESCRIPTION("Recieve data from a network via RTP/SAP/SDP")
-PA_MODULE_VERSION(PACKAGE_VERSION)
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_DESCRIPTION("Recieve data from a network via RTP/SAP/SDP");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_LOAD_ONCE(FALSE);
 PA_MODULE_USAGE(
         "sink=<name of the sink> "
         "sap_address=<multicast address to listen on> "
-)
+);
 
 #define SAP_PORT 9875
 #define DEFAULT_SAP_ADDRESS "224.0.0.56"

Modified: trunk/src/modules/rtp/module-rtp-send.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/rtp/module-rtp-send.c?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/modules/rtp/module-rtp-send.c (original)
+++ trunk/src/modules/rtp/module-rtp-send.c Fri Nov  9 19:25:40 2007
@@ -57,9 +57,10 @@
 #include "sdp.h"
 #include "sap.h"
 
-PA_MODULE_AUTHOR("Lennart Poettering")
-PA_MODULE_DESCRIPTION("Read data from source and send it to the network via RTP/SAP/SDP")
-PA_MODULE_VERSION(PACKAGE_VERSION)
+PA_MODULE_AUTHOR("Lennart Poettering");
+PA_MODULE_DESCRIPTION("Read data from source and send it to the network via RTP/SAP/SDP");
+PA_MODULE_VERSION(PACKAGE_VERSION);
+PA_MODULE_LOAD_ONCE(FALSE);
 PA_MODULE_USAGE(
         "source=<name of the source> "
         "format=<sample format> "
@@ -69,7 +70,7 @@
         "port=<port number> "
         "mtu=<maximum transfer unit> "
         "loop=<loopback to local host?>"
-)
+);
 
 #define DEFAULT_PORT 46000
 #define SAP_PORT 9875

Modified: trunk/src/pulsecore/modinfo.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulsecore/modinfo.c?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/pulsecore/modinfo.c (original)
+++ trunk/src/pulsecore/modinfo.c Fri Nov  9 19:25:40 2007
@@ -40,10 +40,12 @@
 #define PA_SYMBOL_DESCRIPTION "pa__get_description"
 #define PA_SYMBOL_USAGE "pa__get_usage"
 #define PA_SYMBOL_VERSION "pa__get_version"
+#define PA_SYMBOL_LOAD_ONCE "pa__load_once"
 
 pa_modinfo *pa_modinfo_get_by_handle(lt_dlhandle dl, const char *module_name) {
     pa_modinfo *i;
     const char* (*func)(void);
+    pa_bool_t (*func2) (void);
 
     pa_assert(dl);
 
@@ -60,6 +62,9 @@
 
     if ((func = (const char* (*)(void)) pa_load_sym(dl, module_name, PA_SYMBOL_VERSION)))
         i->version = pa_xstrdup(func());
+
+    if ((func2 = (pa_bool_t (*)(void)) pa_load_sym(dl, module_name, PA_SYMBOL_LOAD_ONCE)))
+        i->load_once = func2();
 
     return i;
 }

Modified: trunk/src/pulsecore/modinfo.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulsecore/modinfo.h?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/pulsecore/modinfo.h (original)
+++ trunk/src/pulsecore/modinfo.h Fri Nov  9 19:25:40 2007
@@ -25,12 +25,14 @@
 ***/
 
 /* Some functions for reading module meta data from PulseAudio modules */
+#include <pulsecore/macro.h>
 
 typedef struct pa_modinfo {
     char *author;
     char *description;
     char *usage;
     char *version;
+    pa_bool_t load_once;
 } pa_modinfo;
 
 /* Read meta data from an libtool handle */

Modified: trunk/src/pulsecore/module.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulsecore/module.c?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/pulsecore/module.c (original)
+++ trunk/src/pulsecore/module.c Fri Nov  9 19:25:40 2007
@@ -46,6 +46,7 @@
 
 #define PA_SYMBOL_INIT "pa__init"
 #define PA_SYMBOL_DONE "pa__done"
+#define PA_SYMBOL_LOAD_ONCE "pa__load_once"
 
 #define UNLOAD_POLL_TIME 2
 
@@ -66,6 +67,7 @@
 
 pa_module* pa_module_load(pa_core *c, const char *name, const char *argument) {
     pa_module *m = NULL;
+    pa_bool_t (*load_once)(void);
 
     pa_assert(c);
     pa_assert(name);
@@ -80,6 +82,22 @@
     if (!(m->dl = lt_dlopenext(name))) {
         pa_log("Failed to open module \"%s\": %s", name, lt_dlerror());
         goto fail;
+    }
+
+    if ((load_once = (pa_bool_t (*)(void)) pa_load_sym(m->dl, name, PA_SYMBOL_LOAD_ONCE))) {
+
+        if (load_once()) {
+            pa_module *i;
+            uint32_t idx;
+            /* OK, the module only wants to be loaded once, let's make sure it is */
+
+            for (i = pa_idxset_first(c->modules, &idx); i; i = pa_idxset_next(c->modules, &idx)) {
+                if (strcmp(name, i->name) == 0) {
+                    pa_log("Module \"%s\" should be loaded once at most. Refusing to load.", name);
+                    goto fail;
+                }
+            }
+        }
     }
 
     if (!(m->init = (int (*)(pa_module*_m)) pa_load_sym(m->dl, name, PA_SYMBOL_INIT))) {

Modified: trunk/src/pulsecore/module.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulsecore/module.h?rev=2043&root=pulseaudio&r1=2042&r2=2043&view=diff
==============================================================================
--- trunk/src/pulsecore/module.h (original)
+++ trunk/src/pulsecore/module.h Fri Nov  9 19:25:40 2007
@@ -62,10 +62,25 @@
 
 void pa_module_set_used(pa_module*m, int used);
 
-#define PA_MODULE_AUTHOR(s) const char *pa__get_author(void) { return s; }
-#define PA_MODULE_DESCRIPTION(s) const char *pa__get_description(void) { return s; }
-#define PA_MODULE_USAGE(s) const char *pa__get_usage(void) { return s; }
-#define PA_MODULE_VERSION(s) const char * pa__get_version(void) { return s; }
+#define PA_MODULE_AUTHOR(s)                                     \
+    const char *pa__get_author(void) { return s; }              \
+    struct __stupid_useless_struct_to_allow_trailing_semicolon
+
+#define PA_MODULE_DESCRIPTION(s)                                \
+    const char *pa__get_description(void) { return s; }         \
+    struct __stupid_useless_struct_to_allow_trailing_semicolon
+
+#define PA_MODULE_USAGE(s)                                      \
+    const char *pa__get_usage(void) { return s; }               \
+    struct __stupid_useless_struct_to_allow_trailing_semicolon
+
+#define PA_MODULE_VERSION(s)                                    \
+    const char * pa__get_version(void) { return s; }            \
+    struct __stupid_useless_struct_to_allow_trailing_semicolon
+
+#define PA_MODULE_LOAD_ONCE(b)                                  \
+    pa_bool_t pa__load_once(void) { return b; }                 \
+    struct __stupid_useless_struct_to_allow_trailing_semicolon
 
 pa_modinfo *pa_module_get_info(pa_module *m);
 




More information about the pulseaudio-commits mailing list