From 7ce7502e1ae23766ba40105327de787c2d1cef9d Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Fri, 25 Feb 2005 22:03:30 +0000 Subject: 2005-02-25 Havoc Pennington * doc/dbus-specification.xml: document the GUID thing * dbus/dbus-server.c (_dbus_server_init_base): initialize a globally unique ID for the server, and put a "guid=hexencoded" field in the address * dbus/dbus-bus.c: fix missing #include of dbus-threads-internal.h * dbus/dbus-message.c: ditto * dbus/dbus-dataslot.c: ditto * dbus/dbus-list.c: ditto * dbus/dbus-internals.h: wait, just include dbus-threads-internal.h here * dbus/dbus-string.c (_dbus_string_copy_to_buffer): move back for use in main library * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes_buffer): new function --- dbus/dbus-string-util.c | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'dbus/dbus-string-util.c') diff --git a/dbus/dbus-string-util.c b/dbus/dbus-string-util.c index 0610c66d..ddb9d750 100644 --- a/dbus/dbus-string-util.c +++ b/dbus/dbus-string-util.c @@ -31,30 +31,6 @@ * @{ */ -/** - * Copies the contents of a DBusString into a different - * buffer. The resulting buffer will be nul-terminated. - * - * @param str a string - * @param buffer a C buffer to copy data to - * @param avail_len maximum length of C buffer - */ -void -_dbus_string_copy_to_buffer (const DBusString *str, - char *buffer, - int avail_len) -{ - int copy_len; - DBUS_CONST_STRING_PREAMBLE (str); - - _dbus_assert (avail_len >= 0); - - copy_len = MIN (avail_len, real->len+1); - memcpy (buffer, real->str, copy_len); - if (avail_len > 0 && avail_len == copy_len) - buffer[avail_len-1] = '\0'; -} - /** * Returns whether a string ends with the given suffix * -- cgit