]> code.delx.au - pulseaudio/blobdiff - src/modules/module-protocol-stub.c
Remove pa_bool_t and replace it with bool.
[pulseaudio] / src / modules / module-protocol-stub.c
index 7ba540543b41356671fe3229c75c233814b920fc..3218a01e155eaf338a2e316c2c8dfe6e48e2c79a 100644 (file)
 #include <config.h>
 #endif
 
-#include <string.h>
 #include <errno.h>
 #include <stdio.h>
 #include <unistd.h>
-#include <limits.h>
 
-#ifdef HAVE_ARPA_INET_H
-#include <arpa/inet.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
@@ -49,6 +44,7 @@
 #include <pulsecore/log.h>
 #include <pulsecore/native-common.h>
 #include <pulsecore/creds.h>
+#include <pulsecore/arpa-inet.h>
 
 #ifdef USE_TCP_SOCKETS
 #define SOCKET_DESCRIPTION "(TCP sockets)"
   PA_MODULE_DESCRIPTION("Native protocol "SOCKET_DESCRIPTION);
   PA_MODULE_USAGE("auth-anonymous=<don't check for cookies?> "
                   "auth-cookie=<path to cookie file> "
-                  "auth-cookie-enabled=<enable cookie authentification? "
+                  "auth-cookie-enabled=<enable cookie authentication?> "
                   AUTH_USAGE
                   SOCKET_USAGE);
 #elif defined(USE_PROTOCOL_ESOUND)
                   "source=<source to connect to> "
                   "auth-anonymous=<don't verify cookies?> "
                   "auth-cookie=<path to cookie file> "
-                  "auth-cookie-enabled=<enable cookie authentification? "
+                  "auth-cookie-enabled=<enable cookie authentication?> "
                   AUTH_USAGE
                   SOCKET_USAGE);
 #else
 #  error "Broken build system"
 #endif
 
-PA_MODULE_LOAD_ONCE(FALSE);
+PA_MODULE_LOAD_ONCE(false);
 PA_MODULE_AUTHOR("Lennart Poettering");
 PA_MODULE_VERSION(PACKAGE_VERSION);
 
@@ -243,7 +239,7 @@ int pa__init(pa_module*m) {
 
 #if defined(USE_TCP_SOCKETS)
     uint32_t port = IPV4_PORT;
-    pa_bool_t port_fallback = TRUE;
+    bool port_fallback = true;
     const char *listen_on;
 #else
     int r;
@@ -293,7 +289,7 @@ int pa__init(pa_module*m) {
 #if defined(USE_TCP_SOCKETS)
 
     if (pa_in_system_mode() || pa_modargs_get_value(ma, "port", NULL))
-        port_fallback = FALSE;
+        port_fallback = false;
 
     if (pa_modargs_get_value_u32(ma, "port", &port) < 0 || port < 1 || port > 0xFFFF) {
         pa_log("port= expects a numerical argument between 1 and 65535.");
@@ -341,7 +337,7 @@ int pa__init(pa_module*m) {
     /* This socket doesn't reside in our own runtime dir but in
      * /tmp/.esd/, hence we have to create the dir first */
 
-    if (pa_make_secure_parent_dir(u->socket_path, pa_in_system_mode() ? 0755U : 0700U, (uid_t)-1, (gid_t)-1) < 0) {
+    if (pa_make_secure_parent_dir(u->socket_path, pa_in_system_mode() ? 0755U : 0700U, (uid_t)-1, (gid_t)-1, false) < 0) {
         pa_log("Failed to create socket directory '%s': %s\n", u->socket_path, pa_cstrerror(errno));
         goto fail;
     }