64 vfprintf(stderr, msg, ap); |
64 vfprintf(stderr, msg, ap); |
65 va_end(ap); |
65 va_end(ap); |
66 } |
66 } |
67 } |
67 } |
68 |
68 |
|
69 static Repository* url2repo(char *url, char **path); |
|
70 static DavSession* connect_to_repo(Repository *repo, char *path, CmdArgs *a); |
|
71 |
69 //define DO_THE_TEST |
72 //define DO_THE_TEST |
70 //include <libidav/davqlparser.h> |
73 //include <libidav/davqlparser.h> |
71 //include <libidav/davqlexec.h> |
74 //include <libidav/davqlexec.h> |
72 //include "tags.h" |
75 //include "tags.h" |
73 //include <libidav/resource.h> |
76 //include <libidav/resource.h> |
74 |
77 |
75 void test() { |
78 void test(CmdArgs *a) { |
76 |
79 |
77 } |
80 } |
78 |
81 |
79 int dav_main(int argc, char **argv); |
82 int dav_main(int argc, char **argv); |
80 |
83 |
140 dav_add_namespace(ctx, "apache", "http://apache.org/dav/props/"); |
144 dav_add_namespace(ctx, "apache", "http://apache.org/dav/props/"); |
141 int cfgret = load_config(ctx); |
145 int cfgret = load_config(ctx); |
142 int ret = EXIT_FAILURE; |
146 int ret = EXIT_FAILURE; |
143 printxmlerror = 0; |
147 printxmlerror = 0; |
144 #ifdef DO_THE_TEST |
148 #ifdef DO_THE_TEST |
145 test(); |
149 test(args); |
146 return 0; |
150 return 0; |
147 #endif |
151 #endif |
148 if(!strcmp(cmd, "check") || !strcmp(cmd, "check-config")) { |
152 if(!strcmp(cmd, "check") || !strcmp(cmd, "check-config")) { |
149 if(!cfgret) { |
153 if(!cfgret) { |
150 fprintf(stdout, "Configuration OK.\n"); |
154 fprintf(stdout, "Configuration OK.\n"); |