[phodav] chezdav: learn -r option for read-only server
- From: Marc-Andre Lureau <malureau src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [phodav] chezdav: learn -r option for read-only server
- Date: Sat, 14 Feb 2015 00:53:55 +0000 (UTC)
commit 69782ca46ed365b52d42f7f41c9c5ea6743a6f95
Author: Marc-André Lureau <marcandre lureau gmail com>
Date: Sat Feb 14 01:53:35 2015 +0100
chezdav: learn -r option for read-only server
libphodav/chezdav.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/libphodav/chezdav.c b/libphodav/chezdav.c
index 17acf31..7e8a544 100644
--- a/libphodav/chezdav.c
+++ b/libphodav/chezdav.c
@@ -39,6 +39,7 @@ static GaEntryGroupService *mdns_service;
static PhodavServer *dav;
static gint verbose;
+static gint readonly;
static gint port = 8080;
G_GNUC_PRINTF (1, 2) static void
@@ -202,6 +203,7 @@ main (int argc, char *argv[])
{ "port", 'p', 0, G_OPTION_ARG_INT, &port, N_ ("Port to listen to"), NULL },
{ "path", 'P', 0, G_OPTION_ARG_FILENAME, &path, N_ ("Path to export"), NULL },
{ "htdigest", 'd', 0, G_OPTION_ARG_FILENAME, &htdigest, N_ ("Path to htdigest file"), NULL },
+ { "readonly", 'r', 0, G_OPTION_ARG_NONE, &readonly, N_ ("Read-only access"), NULL },
{ NULL }
};
@@ -242,6 +244,7 @@ main (int argc, char *argv[])
#endif
dav = phodav_server_new (path);
+ g_object_set (dav, "read-only", readonly, NULL);
if (htdigest)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]