projects
/
platform
/
upstream
/
glib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[kdbus] Make SipHash function as a private utility function to kdbus
[platform/upstream/glib.git]
/
gio
/
gdbusprivate.c
diff --git
a/gio/gdbusprivate.c
b/gio/gdbusprivate.c
index
cda0b07
..
730ee3f
100644
(file)
--- a/
gio/gdbusprivate.c
+++ b/
gio/gdbusprivate.c
@@
-13,9
+13,7
@@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General
- * Public License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
*
* Author: David Zeuthen <davidz@redhat.com>
*/
*
* Author: David Zeuthen <davidz@redhat.com>
*/
@@
-24,9
+22,6
@@
#include <stdlib.h>
#include <string.h>
#include <stdlib.h>
#include <string.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
#include "giotypes.h"
#include "gsocket.h"
#include "giotypes.h"
#include "gsocket.h"
@@
-39,6
+34,7
@@
#include "ginputstream.h"
#include "gmemoryinputstream.h"
#include "giostream.h"
#include "ginputstream.h"
#include "gmemoryinputstream.h"
#include "giostream.h"
+#include "glib/gstdio.h"
#include "gsocketcontrolmessage.h"
#include "gsocketconnection.h"
#include "gsocketoutputstream.h"
#include "gsocketcontrolmessage.h"
#include "gsocketconnection.h"
#include "gsocketoutputstream.h"
@@
-481,7
+477,7
@@
_g_dbus_worker_emit_disconnected (GDBusWorker *worker,
GError *error)
{
if (!g_atomic_int_get (&worker->stopped))
GError *error)
{
if (!g_atomic_int_get (&worker->stopped))
- worker->disconnected_callback (
worker,
remote_peer_vanished, error, worker->user_data);
+ worker->disconnected_callback (remote_peer_vanished, error, worker->user_data);
}
static void
}
static void
@@
-489,7
+485,7
@@
_g_dbus_worker_emit_message_received (GDBusWorker *worker,
GDBusMessage *message)
{
if (!g_atomic_int_get (&worker->stopped))
GDBusMessage *message)
{
if (!g_atomic_int_get (&worker->stopped))
- worker->message_received_callback (
worker,
message, worker->user_data);
+ worker->message_received_callback (message, worker->user_data);
}
static GDBusMessage *
}
static GDBusMessage *
@@
-498,7
+494,7
@@
_g_dbus_worker_emit_message_about_to_be_sent (GDBusWorker *worker,
{
GDBusMessage *ret;
if (!g_atomic_int_get (&worker->stopped))
{
GDBusMessage *ret;
if (!g_atomic_int_get (&worker->stopped))
- ret = worker->message_about_to_be_sent_callback (
worker,
message, worker->user_data);
+ ret = worker->message_about_to_be_sent_callback (message, worker->user_data);
else
ret = message;
return ret;
else
ret = message;
return ret;
@@
-558,6
+554,7
@@
_g_dbus_worker_unfreeze (GDBusWorker *worker)
unfreeze_in_idle_cb,
_g_dbus_worker_ref (worker),
(GDestroyNotify) _g_dbus_worker_unref);
unfreeze_in_idle_cb,
_g_dbus_worker_ref (worker),
(GDestroyNotify) _g_dbus_worker_unref);
+ g_source_set_name (idle_source, "[gio] unfreeze_in_idle_cb");
g_source_attach (idle_source, worker->shared_thread_data->context);
g_source_unref (idle_source);
}
g_source_attach (idle_source, worker->shared_thread_data->context);
g_source_unref (idle_source);
}
@@
-621,7
+618,7
@@
_g_dbus_worker_do_read_cb (GInputStream *input_stream,
{
/* TODO: really want a append_steal() */
g_unix_fd_list_append (worker->read_fd_list, fds[n], NULL);
{
/* TODO: really want a append_steal() */
g_unix_fd_list_append (worker->read_fd_list, fds[n], NULL);
-
close (fds[n]
);
+
(void) g_close (fds[n], NULL
);
}
}
g_free (fds);
}
}
g_free (fds);
@@
-1558,7
+1555,7
@@
continue_writing_in_idle_cb (gpointer user_data)
return FALSE;
}
return FALSE;
}
-/*
+/*
*
* @write_data: (transfer full) (allow-none):
* @flush_data: (transfer full) (allow-none):
* @close_data: (transfer full) (allow-none):
* @write_data: (transfer full) (allow-none):
* @flush_data: (transfer full) (allow-none):
* @close_data: (transfer full) (allow-none):
@@
-1600,6
+1597,7
@@
schedule_writing_unlocked (GDBusWorker *worker,
continue_writing_in_idle_cb,
_g_dbus_worker_ref (worker),
(GDestroyNotify) _g_dbus_worker_unref);
continue_writing_in_idle_cb,
_g_dbus_worker_ref (worker),
(GDestroyNotify) _g_dbus_worker_unref);
+ g_source_set_name (idle_source, "[gio] continue_writing_in_idle_cb");
g_source_attach (idle_source, worker->shared_thread_data->context);
g_source_unref (idle_source);
}
g_source_attach (idle_source, worker->shared_thread_data->context);
g_source_unref (idle_source);
}
@@
-1685,6
+1683,7
@@
_g_dbus_worker_new (GIOStream *stream,
_g_dbus_worker_do_initial_read,
_g_dbus_worker_ref (worker),
(GDestroyNotify) _g_dbus_worker_unref);
_g_dbus_worker_do_initial_read,
_g_dbus_worker_ref (worker),
(GDestroyNotify) _g_dbus_worker_unref);
+ g_source_set_name (idle_source, "[gio] _g_dbus_worker_do_initial_read");
g_source_attach (idle_source, worker->shared_thread_data->context);
g_source_unref (idle_source);
g_source_attach (idle_source, worker->shared_thread_data->context);
g_source_unref (idle_source);
@@
-1909,7
+1908,7
@@
_g_dbus_debug_print_unlock (void)
G_UNLOCK (print_lock);
}
G_UNLOCK (print_lock);
}
-/*
+/*
*
* _g_dbus_initialize:
*
* Does various one-time init things such as
* _g_dbus_initialize:
*
* Does various one-time init things such as
@@
-2154,7
+2153,7
@@
write_message_print_transport_debug (gssize bytes_written,
_g_dbus_debug_print_lock ();
g_print ("========================================================================\n"
"GDBus-debug:Transport:\n"
_g_dbus_debug_print_lock ();
g_print ("========================================================================\n"
"GDBus-debug:Transport:\n"
- " >>>> WROTE %" G_GSIZE_FORMAT " bytes of message with serial %d and\n"
+ " >>>> WROTE %" G_GS
S
IZE_FORMAT " bytes of message with serial %d and\n"
" size %" G_GSIZE_FORMAT " from offset %" G_GSIZE_FORMAT " on a %s\n",
bytes_written,
g_dbus_message_get_serial (data->message),
" size %" G_GSIZE_FORMAT " from offset %" G_GSIZE_FORMAT " on a %s\n",
bytes_written,
g_dbus_message_get_serial (data->message),
@@
-2205,7
+2204,7
@@
read_message_print_transport_debug (gssize bytes_read,
_g_dbus_debug_print_lock ();
g_print ("========================================================================\n"
"GDBus-debug:Transport:\n"
_g_dbus_debug_print_lock ();
g_print ("========================================================================\n"
"GDBus-debug:Transport:\n"
- " <<<< READ %" G_GSIZE_FORMAT " bytes of message with serial %d and\n"
+ " <<<< READ %" G_GS
S
IZE_FORMAT " bytes of message with serial %d and\n"
" size %d to offset %" G_GSIZE_FORMAT " from a %s\n",
bytes_read,
serial,
" size %d to offset %" G_GSIZE_FORMAT " from a %s\n",
bytes_read,
serial,