diff --git a/dbus/dbus-server-unix.c b/dbus/dbus-server-unix.c
index 92664a8..ef6e0b4 100644
a
|
b
|
_dbus_server_listen_platform_specific (DBusAddressEntry *entry, |
262 | 262 | const char *launchd_env_var = dbus_address_entry_get_value (entry, "env"); |
263 | 263 | if (launchd_env_var == NULL) |
264 | 264 | { |
| 265 | #if !(defined(DBUS_BUILD_X11)) |
265 | 266 | _dbus_set_bad_address (error, "launchd", "env", NULL); |
266 | 267 | return DBUS_SERVER_LISTEN_DID_NOT_CONNECT; |
| 268 | #else |
| 269 | goto fallback; |
| 270 | #endif |
267 | 271 | } |
268 | 272 | *server_p = _dbus_server_new_for_launchd (launchd_env_var, error); |
269 | 273 | |
… |
… |
_dbus_server_listen_platform_specific (DBusAddressEntry *entry, |
272 | 276 | _DBUS_ASSERT_ERROR_IS_CLEAR(error); |
273 | 277 | return DBUS_SERVER_LISTEN_OK; |
274 | 278 | } |
| 279 | #if !(defined(DBUS_BUILD_X11)) |
275 | 280 | else |
276 | 281 | { |
277 | 282 | _DBUS_ASSERT_ERROR_IS_SET(error); |
278 | 283 | return DBUS_SERVER_LISTEN_DID_NOT_CONNECT; |
279 | 284 | } |
| 285 | #else |
| 286 | fallback:; |
| 287 | // try a hardcoded traditional address |
| 288 | { |
| 289 | DBusAddressEntry **altEntry; |
| 290 | int altLen; |
| 291 | DBusError altError; |
| 292 | DBusServerListenResult retval; |
| 293 | if (dbus_parse_address ("unix:tmpdir=/tmp", &altEntry, &altLen, &altError) && altLen > 0) |
| 294 | { |
| 295 | retval = _dbus_server_listen_platform_specific (altEntry[0], server_p, error); |
| 296 | dbus_address_entries_free (altEntry); |
| 297 | } |
| 298 | else |
| 299 | { |
| 300 | retval = DBUS_SERVER_LISTEN_DID_NOT_CONNECT; |
| 301 | } |
| 302 | return retval; |
| 303 | } |
| 304 | #endif |
280 | 305 | } |
281 | 306 | #endif |
282 | 307 | else |
diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c
index 5691c5a..31f2060 100644
a
|
b
|
_dbus_lookup_session_address (dbus_bool_t *supported, |
4128 | 4128 | DBusString *address, |
4129 | 4129 | DBusError *error) |
4130 | 4130 | { |
| 4131 | dbus_bool_t retval = FALSE; |
4131 | 4132 | #ifdef DBUS_ENABLE_LAUNCHD |
4132 | 4133 | *supported = TRUE; |
4133 | | return _dbus_lookup_session_address_launchd (address, error); |
4134 | | #else |
| 4134 | retval = _dbus_lookup_session_address_launchd (address, error); |
| 4135 | if (retval) |
| 4136 | { |
| 4137 | // success, no need to attempt anything else |
| 4138 | return TRUE; |
| 4139 | } |
| 4140 | #endif |
| 4141 | // dbus can function with an X11 server like it does on other Unix versions, even when |
| 4142 | // it will use launchd by default (on Mac) |
| 4143 | #if !defined(DBUS_ENABLE_LAUNCHD) || (defined(DBUS_BUILD_X11)) |
4135 | 4144 | *supported = FALSE; |
4136 | 4145 | |
4137 | 4146 | if (!_dbus_lookup_user_bus (supported, address, error)) |
4138 | 4147 | return FALSE; |
4139 | | else if (*supported) |
| 4148 | #ifdef DBUS_ENABLE_LAUNCHD |
| 4149 | _dbus_verbose ("traditional session bus lookup yielded address \"%s\"", |
| 4150 | _dbus_string_get_const_data (address)); |
| 4151 | #endif |
| 4152 | if (*supported) |
4140 | 4153 | return TRUE; |
4141 | 4154 | |
4142 | 4155 | /* On non-Mac Unix platforms, if the session address isn't already |
… |
… |
_dbus_lookup_session_address (dbus_bool_t *supported, |
4145 | 4158 | * autolaunch: global default; see init_session_address in |
4146 | 4159 | * dbus/dbus-bus.c. */ |
4147 | 4160 | return TRUE; |
| 4161 | #else |
| 4162 | return retval; |
4148 | 4163 | #endif |
4149 | 4164 | } |
4150 | 4165 | |
diff --git a/dbus/dbus-transport-unix.c b/dbus/dbus-transport-unix.c
index f2b1f09..d898c13 100644
a
|
b
|
_dbus_transport_open_platform_specific (DBusAddressEntry *entry, |
392 | 392 | _DBUS_ASSERT_ERROR_IS_SET (error); |
393 | 393 | return DBUS_TRANSPORT_OPEN_DID_NOT_CONNECT; |
394 | 394 | } |
| 395 | #if !(defined(DBUS_BUILD_X11)) |
395 | 396 | else |
396 | 397 | { |
397 | 398 | _DBUS_ASSERT_ERROR_IS_CLEAR (error); |
398 | 399 | return DBUS_TRANSPORT_OPEN_OK; |
399 | 400 | } |
| 401 | #endif |
400 | 402 | } |
401 | 403 | #endif |
402 | 404 | else |