[telepathy-gabble/master] hoist timeout_cb definition to avoid forward references later
Dafydd Harries
dafydd.harries at collabora.co.uk
Fri Aug 14 10:31:08 PDT 2009
---
src/request-pipeline.c | 50 ++++++++++++++++++++++++------------------------
1 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/src/request-pipeline.c b/src/request-pipeline.c
index f533c4a..039f4a6 100644
--- a/src/request-pipeline.c
+++ b/src/request-pipeline.c
@@ -290,6 +290,31 @@ response_cb (GabbleConnection *conn,
return LM_HANDLER_RESULT_REMOVE_MESSAGE;
}
+static gboolean
+timeout_cb (gpointer data)
+{
+ GabbleRequestPipelineItem *item = (GabbleRequestPipelineItem *) data;
+ GabbleRequestPipeline *pipeline = item->pipeline;
+ GabbleRequestPipelinePrivate *priv;
+ GError *error = NULL;
+
+ g_assert (GABBLE_IS_REQUEST_PIPELINE (pipeline));
+ priv = GABBLE_REQUEST_PIPELINE_GET_PRIVATE (item->pipeline);
+
+ error = g_error_new (GABBLE_REQUEST_PIPELINE_ERROR,
+ GABBLE_REQUEST_PIPELINE_ERROR_TIMEOUT,
+ "Request timed out");
+
+ item->callback (priv->connection, NULL, item->user_data, error);
+
+ item->timer_id = 0;
+ item->zombie = TRUE;
+
+ gabble_request_pipeline_go (pipeline);
+
+ return FALSE;
+}
+
static void
send_next_request (GabbleRequestPipeline *pipeline)
{
@@ -341,31 +366,6 @@ gabble_request_pipeline_go (GabbleRequestPipeline *pipeline)
}
static gboolean
-timeout_cb (gpointer data)
-{
- GabbleRequestPipelineItem *item = (GabbleRequestPipelineItem *) data;
- GabbleRequestPipeline *pipeline = item->pipeline;
- GabbleRequestPipelinePrivate *priv;
- GError *error = NULL;
-
- g_assert (GABBLE_IS_REQUEST_PIPELINE (pipeline));
- priv = GABBLE_REQUEST_PIPELINE_GET_PRIVATE (item->pipeline);
-
- error = g_error_new (GABBLE_REQUEST_PIPELINE_ERROR,
- GABBLE_REQUEST_PIPELINE_ERROR_TIMEOUT,
- "Request timed out");
-
- item->callback (priv->connection, NULL, item->user_data, error);
-
- item->timer_id = 0;
- item->zombie = TRUE;
-
- gabble_request_pipeline_go (pipeline);
-
- return FALSE;
-}
-
-static gboolean
delayed_run_pipeline (gpointer user_data)
{
GabbleRequestPipeline *pipeline = (GabbleRequestPipeline *) user_data;
--
1.5.6.5
More information about the telepathy-commits
mailing list