[phodav] phodav: don't return slow properties on allprop
- From: Marc-Andre Lureau <malureau src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [phodav] phodav: don't return slow properties on allprop
- Date: Thu, 23 Jan 2014 16:23:30 +0000 (UTC)
commit 1f52810dab89ebd4120441c3de8f772af0d36097
Author: Marc-André Lureau <marcandre lureau gmail com>
Date: Thu Jan 23 17:23:15 2014 +0100
phodav: don't return slow properties on allprop
libphodav/phodav-server.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/libphodav/phodav-server.c b/libphodav/phodav-server.c
index db39672..cbb569a 100644
--- a/libphodav/phodav-server.c
+++ b/libphodav/phodav-server.c
@@ -1420,6 +1420,7 @@ static const struct _PropList
const gchar *name;
xmlNodePtr (*func) (PathHandler *, PropFind *, const gchar *, GFileInfo *, xmlNsPtr);
gboolean need_info;
+ gboolean slow;
} prop_list[] = {
PROP (resourcetype, 1),
@@ -1434,7 +1435,7 @@ static const struct _PropList
PROP (lockdiscovery, 0),
{ "quota-available-bytes", prop_quota_available, },
#if GLIB_CHECK_VERSION (2, 38, 0)
- { "quota-used-bytes", prop_quota_used, }
+ { "quota-used-bytes", prop_quota_used, FALSE, TRUE, }
#endif
};
@@ -1479,9 +1480,13 @@ propfind_populate (PathHandler *handler, const gchar *path,
{
for (i = 0; i < G_N_ELEMENTS (prop_list); i++)
{
- if (pf->type != PROPFIND_PROPNAME &&
- prop_list[i].need_info && !info)
- continue;
+ if (pf->type != PROPFIND_PROPNAME)
+ {
+ if (prop_list[i].need_info && !info)
+ continue;
+ if (prop_list[i].slow)
+ continue;
+ }
/* perhaps not include the 404? */
prop_add (&stat, prop_list[i].func (handler, pf, path, info, ns));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]