[phodav] Check glib version for disk_usage() API
- From: Marc-Andre Lureau <malureau src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [phodav] Check glib version for disk_usage() API
- Date: Thu, 23 Jan 2014 13:51:23 +0000 (UTC)
commit 9f87d91a7e0966c2282e3f62c159f1b0dce72585
Author: Marc-André Lureau <marcandre lureau gmail com>
Date: Thu Jan 23 14:42:04 2014 +0100
Check glib version for disk_usage() API
libphodav/phodav-server.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/libphodav/phodav-server.c b/libphodav/phodav-server.c
index ac41b40..db39672 100644
--- a/libphodav/phodav-server.c
+++ b/libphodav/phodav-server.c
@@ -1371,6 +1371,7 @@ end:
return node;
}
+#if GLIB_CHECK_VERSION (2, 38, 0)
static xmlNodePtr
prop_quota_used (PathHandler *handler, PropFind *pf,
const gchar *path, GFileInfo *info, xmlNsPtr ns)
@@ -1378,7 +1379,7 @@ prop_quota_used (PathHandler *handler, PropFind *pf,
gint status = SOUP_STATUS_OK;
PhodavServer *self = handler->self;
xmlNodePtr node = xmlNewNode (ns, BAD_CAST "quota-used-bytes");
- guint64 disk_usage;
+ guint64 disk_usage = 0;
GError *error = NULL;
gchar *tmp = NULL;
@@ -1405,6 +1406,7 @@ end:
PROP_SET_STATUS (node, status);
return node;
}
+#endif
static void
prop_add (GList **stat, xmlNodePtr node)
@@ -1431,7 +1433,9 @@ static const struct _PropList
PROP (supportedlock, 0),
PROP (lockdiscovery, 0),
{ "quota-available-bytes", prop_quota_available, },
+#if GLIB_CHECK_VERSION (2, 38, 0)
{ "quota-used-bytes", prop_quota_used, }
+#endif
};
static xmlNodePtr
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]