[phodav] server: fix PUT finish handler
- From: Marc-Andre Lureau <malureau src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [phodav] server: fix PUT finish handler
- Date: Fri, 11 Apr 2014 11:11:12 +0000 (UTC)
commit da2434dc8d9dfb009e0faeebb055a6f233f3bfac
Author: Marc-André Lureau <marcandre lureau gmail com>
Date: Fri Apr 11 13:10:57 2014 +0200
server: fix PUT finish handler
libphodav/phodav-method-put.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/libphodav/phodav-method-put.c b/libphodav/phodav-method-put.c
index 02bb68b..20eae0e 100644
--- a/libphodav/phodav-method-put.c
+++ b/libphodav/phodav-method-put.c
@@ -21,12 +21,11 @@
static void
method_put_finished (SoupMessage *msg,
- SoupBuffer *chunk,
gpointer user_data)
{
GFileOutputStream *output = user_data;
- g_debug ("PUT finished");
+ g_debug ("PUT finished %p", output);
g_object_unref (output);
}
@@ -105,9 +104,10 @@ phodav_method_put (PathHandler *handler, SoupMessage *msg, const gchar *path, GE
file = g_file_get_child (handler_get_file (handler), path + 1);
status = put_start (msg, file, &output, cancellable, err);
- if (*err)
+ if (!output || *err)
goto end;
+ g_debug ("PUT output %p", output);
soup_message_body_set_accumulate (msg->request_body, FALSE);
g_object_set_data (G_OBJECT (output), "handler", handler);
g_signal_connect (msg, "got-chunk", G_CALLBACK (method_put_got_chunk), output);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]