25 #include "dbus-internals.h"
26 #include "dbus-server-unix.h"
27 #include "dbus-server-socket.h"
28 #include "dbus-server-launchd.h"
29 #include "dbus-transport-unix.h"
30 #include "dbus-connection-internal.h"
31 #include "dbus-sysdeps-unix.h"
32 #include "dbus-string.h"
53 DBusServerListenResult
64 if (strcmp (method,
"unix") == 0)
73 "path or tmpdir or abstract",
75 return DBUS_SERVER_LISTEN_BAD_ADDRESS;
78 if ((path && tmpdir) ||
83 "cannot specify two of \"path\" and \"tmpdir\" and \"abstract\" at the same time");
84 return DBUS_SERVER_LISTEN_BAD_ADDRESS;
95 return DBUS_SERVER_LISTEN_DID_NOT_CONNECT;
102 return DBUS_SERVER_LISTEN_DID_NOT_CONNECT;
114 return DBUS_SERVER_LISTEN_DID_NOT_CONNECT;
121 #ifdef HAVE_ABSTRACT_SOCKETS
139 if (*server_p !=
NULL)
141 _DBUS_ASSERT_ERROR_IS_CLEAR(error);
142 return DBUS_SERVER_LISTEN_OK;
146 _DBUS_ASSERT_ERROR_IS_SET(error);
147 return DBUS_SERVER_LISTEN_DID_NOT_CONNECT;
150 else if (strcmp (method,
"systemd") == 0)
158 _DBUS_ASSERT_ERROR_IS_SET (error);
159 return DBUS_SERVER_LISTEN_DID_NOT_CONNECT;
165 for (i = 0; i < n; i++)
177 if (*server_p ==
NULL)
182 return DBUS_SERVER_LISTEN_OK;
184 _DBUS_SET_OOM (error);
186 for (i = 0; i < n; i++)
193 return DBUS_SERVER_LISTEN_DID_NOT_CONNECT;
195 #ifdef DBUS_ENABLE_LAUNCHD
196 else if (strcmp (method,
"launchd") == 0)
199 if (launchd_env_var ==
NULL)
202 return DBUS_SERVER_LISTEN_DID_NOT_CONNECT;
206 if (*server_p !=
NULL)
208 _DBUS_ASSERT_ERROR_IS_CLEAR(error);
209 return DBUS_SERVER_LISTEN_OK;
213 _DBUS_ASSERT_ERROR_IS_SET(error);
214 return DBUS_SERVER_LISTEN_DID_NOT_CONNECT;
223 _DBUS_ASSERT_ERROR_IS_CLEAR(error);
224 return DBUS_SERVER_LISTEN_NOT_HANDLED;
247 _DBUS_ASSERT_ERROR_IS_CLEAR (error);
273 if (path_copy ==
NULL)
284 _DBUS_ASSERT_ERROR_IS_SET (error);
295 if (path_copy !=
NULL)