dav/main.c

changeset 611
a7c48e0dca88
parent 609
dc3d70848c7c
child 618
4b34d12cf211
equal deleted inserted replaced
610:aa3baf1dd81b 611:a7c48e0dca88
1 /* 1 /*
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3 * 3 *
4 * Copyright 2018 Olaf Wintermann. All rights reserved. 4 * Copyright 2019 Olaf Wintermann. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met: 7 * modification, are permitted provided that the following conditions are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
87 if(!args) { 87 if(!args) {
88 print_usage(argv[0]); 88 print_usage(argv[0]);
89 return -1; 89 return -1;
90 } 90 }
91 91
92 sys_init();
92 xmlGenericErrorFunc fnc = xmlerrorfnc; 93 xmlGenericErrorFunc fnc = xmlerrorfnc;
93 initGenericErrorDefaultFunc(&fnc); 94 initGenericErrorDefaultFunc(&fnc);
94 ctx = dav_context_new(); 95 ctx = dav_context_new();
95 dav_add_namespace(ctx, "apache", "http://apache.org/dav/props/"); 96 dav_add_namespace(ctx, "apache", "http://apache.org/dav/props/");
96 int cfgret = load_config(ctx); 97 int cfgret = load_config(ctx);
209 dav_context_destroy(ctx); 210 dav_context_destroy(ctx);
210 cmd_args_free(args); 211 cmd_args_free(args);
211 free_config(); 212 free_config();
212 xmlCleanupParser(); 213 xmlCleanupParser();
213 curl_global_cleanup(); 214 curl_global_cleanup();
215 sys_uninit();
214 216
215 return ret; 217 return ret;
216 } 218 }
217 219
218 static char *cmdusageinfo[] = { 220 static char *cmdusageinfo[] = {

mercurial