mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-05 01:48:00 +02:00
Merge branch 'dbus-1.8'
Conflicts: NEWS
This commit is contained in:
commit
6ebf75590e
5 changed files with 46 additions and 9 deletions
6
NEWS
6
NEWS
|
|
@ -28,8 +28,14 @@ Enhancements:
|
|||
• on Unix platforms, disable Nagle's algorithm on TCP connections to improve
|
||||
initial latency (fd.o #75544, Matt Hoosier)
|
||||
|
||||
• add Documentation key to dbus.service (fd.o #77447, Cameron Norman)
|
||||
|
||||
Fixes:
|
||||
|
||||
• in "dbus-uuidgen --ensure", try to copy systemd's /etc/machine-id
|
||||
to /var/lib/dbus/machine-id instead of generating an entirely new ID
|
||||
(fd.o #77941, Simon McVittie)
|
||||
|
||||
• on Windows, allow up to 8K connections to the dbus-daemon, instead of the
|
||||
previous 64 (fd.o #71297; Cristian Onet, Ralf Habacker)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
[Unit]
|
||||
Description=D-Bus System Message Bus
|
||||
Documentation=man:dbus-daemon(1)
|
||||
Requires=dbus.socket
|
||||
|
||||
[Service]
|
||||
|
|
|
|||
|
|
@ -745,10 +745,18 @@ _dbus_read_uuid_file_without_creating (const DBusString *filename,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static dbus_bool_t
|
||||
_dbus_create_uuid_file_exclusively (const DBusString *filename,
|
||||
DBusGUID *uuid,
|
||||
DBusError *error)
|
||||
/**
|
||||
* Write the give UUID to a file.
|
||||
*
|
||||
* @param filename the file to write
|
||||
* @param uuid the UUID to save
|
||||
* @param error used to raise an error
|
||||
* @returns #FALSE on error
|
||||
*/
|
||||
dbus_bool_t
|
||||
_dbus_write_uuid_file (const DBusString *filename,
|
||||
const DBusGUID *uuid,
|
||||
DBusError *error)
|
||||
{
|
||||
DBusString encoded;
|
||||
|
||||
|
|
@ -757,8 +765,6 @@ _dbus_create_uuid_file_exclusively (const DBusString *filename,
|
|||
_DBUS_SET_OOM (error);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
_dbus_generate_uuid (uuid);
|
||||
|
||||
if (!_dbus_uuid_encode (uuid, &encoded))
|
||||
{
|
||||
|
|
@ -825,7 +831,8 @@ _dbus_read_uuid_file (const DBusString *filename,
|
|||
else
|
||||
{
|
||||
dbus_error_free (&read_error);
|
||||
return _dbus_create_uuid_file_exclusively (filename, uuid, error);
|
||||
_dbus_generate_uuid (uuid);
|
||||
return _dbus_write_uuid_file (filename, uuid, error);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -361,6 +361,10 @@ dbus_bool_t _dbus_read_uuid_file (const DBusString *filename,
|
|||
dbus_bool_t create_if_not_found,
|
||||
DBusError *error);
|
||||
|
||||
dbus_bool_t _dbus_write_uuid_file (const DBusString *filename,
|
||||
const DBusGUID *uuid,
|
||||
DBusError *error);
|
||||
|
||||
dbus_bool_t _dbus_get_local_machine_uuid_encoded (DBusString *uuid_str);
|
||||
|
||||
#define _DBUS_PASTE2(a, b) a ## b
|
||||
|
|
|
|||
|
|
@ -3597,7 +3597,7 @@ _dbus_read_local_machine_uuid (DBusGUID *machine_id,
|
|||
|
||||
_dbus_string_init_const (&filename, DBUS_MACHINE_UUID_FILE);
|
||||
|
||||
b = _dbus_read_uuid_file (&filename, machine_id, create_if_not_found, error);
|
||||
b = _dbus_read_uuid_file (&filename, machine_id, FALSE, error);
|
||||
if (b)
|
||||
return TRUE;
|
||||
|
||||
|
|
@ -3605,7 +3605,26 @@ _dbus_read_local_machine_uuid (DBusGUID *machine_id,
|
|||
|
||||
/* Fallback to the system machine ID */
|
||||
_dbus_string_init_const (&filename, "/etc/machine-id");
|
||||
return _dbus_read_uuid_file (&filename, machine_id, FALSE, error);
|
||||
b = _dbus_read_uuid_file (&filename, machine_id, FALSE, error);
|
||||
|
||||
if (b)
|
||||
{
|
||||
/* try to copy it to the DBUS_MACHINE_UUID_FILE, but do not
|
||||
* complain if that isn't possible for whatever reason */
|
||||
_dbus_string_init_const (&filename, DBUS_MACHINE_UUID_FILE);
|
||||
_dbus_write_uuid_file (&filename, machine_id, NULL);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (!create_if_not_found)
|
||||
return FALSE;
|
||||
|
||||
/* if none found, try to make a new one */
|
||||
dbus_error_free (error);
|
||||
_dbus_string_init_const (&filename, DBUS_MACHINE_UUID_FILE);
|
||||
_dbus_generate_uuid (machine_id);
|
||||
return _dbus_write_uuid_file (&filename, machine_id, error);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue