- DBusString full_path;
- DBusString filename;
-
- if (!_dbus_string_init (&full_path))
- {
- dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL);
- goto out;
- }
-
- if (!_dbus_string_init (&filename))
- {
- _dbus_string_free (&full_path);
- dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL);
- goto out;
- }
-
- if (!_dbus_string_append (&filename,
- "dbus-") ||
- !_dbus_generate_random_ascii (&filename, 10) ||
- !_dbus_string_append (&full_path, tmpdir) ||
- !_dbus_concat_dir_and_file (&full_path, &filename))
- {
- _dbus_string_free (&full_path);
- _dbus_string_free (&filename);
- dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL);
- goto out;
- }
-
- /* FIXME - we will unconditionally unlink() the path if
- * we don't support abstract namespace. unlink() does
- * not follow symlinks, but would like independent
- * confirmation this is safe enough. See also
- * _dbus_listen_unix_socket() and comments therein.
- */
-
- /* Always use abstract namespace if possible with tmpdir */
-
- server =
- _dbus_server_new_for_domain_socket (_dbus_string_get_const_data (&full_path),
-#ifdef HAVE_ABSTRACT_SOCKETS
- TRUE,
-#else
- FALSE,
-#endif
- error);
-
- _dbus_string_free (&full_path);
- _dbus_string_free (&filename);
+ _dbus_assert (server == NULL);
+ dbus_set_error (error,
+ DBUS_ERROR_ADDRESS_IN_USE,
+ "Address '%s' already used",
+ dbus_address_entry_get_method (entries[0]));
+ handled_once = TRUE;
+ goto out;