[glib/glib-2-30] GDBusWorker: rename some functions
- From: Simon McVittie <smcv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/glib-2-30] GDBusWorker: rename some functions
- Date: Mon, 21 Nov 2011 18:28:47 +0000 (UTC)
commit 628eee1c7dd76d698a43645d510ac236bb34845d
Author: Simon McVittie <simon mcvittie collabora co uk>
Date: Fri Oct 21 14:43:44 2011 +0100
GDBusWorker: rename some functions
maybe_write_next_message now also closes, and I'm about to make it
consider whether to flush as well, so its name is increasingly
inappropriate. Similarly, write_message_in_idle_cb is a wrapper around
it which could do any of those things.
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=662395
Signed-off-by: Simon McVittie <simon mcvittie collabora co uk>
Reviewed-by: Cosimo Alfarano <cosimo alfarano collabora co uk>
gio/gdbusprivate.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/gio/gdbusprivate.c b/gio/gdbusprivate.c
index da9388a..0b8506f 100644
--- a/gio/gdbusprivate.c
+++ b/gio/gdbusprivate.c
@@ -1144,7 +1144,7 @@ write_message_finish (GAsyncResult *res,
}
/* ---------------------------------------------------------------------------------------------------- */
-static void maybe_write_next_message (GDBusWorker *worker);
+static void continue_writing (GDBusWorker *worker);
typedef struct
{
@@ -1216,7 +1216,7 @@ ostream_flush_cb (GObject *source_object,
g_mutex_unlock (data->worker->write_lock);
/* OK, cool, finally kick off the next write */
- maybe_write_next_message (data->worker);
+ continue_writing (data->worker);
_g_dbus_worker_unref (data->worker);
g_free (data);
@@ -1294,7 +1294,7 @@ message_written (GDBusWorker *worker,
else
{
/* kick off the next write! */
- maybe_write_next_message (worker);
+ continue_writing (worker);
}
}
@@ -1409,7 +1409,7 @@ iostream_close_cb (GObject *source_object,
* output_pending must be PENDING_NONE on entry
*/
static void
-maybe_write_next_message (GDBusWorker *worker)
+continue_writing (GDBusWorker *worker)
{
MessageToWriteData *data;
@@ -1509,7 +1509,7 @@ maybe_write_next_message (GDBusWorker *worker)
* output_pending may be anything
*/
static gboolean
-write_message_in_idle_cb (gpointer user_data)
+continue_writing_in_idle_cb (gpointer user_data)
{
GDBusWorker *worker = user_data;
@@ -1517,7 +1517,7 @@ write_message_in_idle_cb (gpointer user_data)
* without holding the lock: no other thread ever modifies it.
*/
if (worker->output_pending == PENDING_NONE)
- maybe_write_next_message (worker);
+ continue_writing (worker);
return FALSE;
}
@@ -1551,7 +1551,7 @@ schedule_write_in_worker_thread (GDBusWorker *worker,
idle_source = g_idle_source_new ();
g_source_set_priority (idle_source, G_PRIORITY_DEFAULT);
g_source_set_callback (idle_source,
- write_message_in_idle_cb,
+ continue_writing_in_idle_cb,
_g_dbus_worker_ref (worker),
(GDestroyNotify) _g_dbus_worker_unref);
g_source_attach (idle_source, worker->shared_thread_data->context);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]