add functions for getting the current DavSession error dav-2 tip

Wed, 24 Jun 2026 20:26:58 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Wed, 24 Jun 2026 20:26:58 +0200
branch
dav-2
changeset 915
8f9dbd755fdb
parent 914
42c6b071b231

add functions for getting the current DavSession error

libidav/session.c file | annotate | diff | comparison | revisions
libidav/webdav.h file | annotate | diff | comparison | revisions
--- a/libidav/session.c	Sat Jun 20 19:00:56 2026 +0200
+++ b/libidav/session.c	Wed Jun 24 20:26:58 2026 +0200
@@ -359,6 +359,14 @@
     sn->errorstr = errstr;
 }
 
+DavError dav_session_get_error(DavSession *sn) {
+    return sn->error;
+}
+
+const char* dav_session_get_errorstr(DavSession *sn) {
+    return sn->errorstr;
+}
+
 void dav_session_destroy(DavSession *sn) { 
     // remove session from context
     DavContext *ctx = sn->context;
--- a/libidav/webdav.h	Sat Jun 20 19:00:56 2026 +0200
+++ b/libidav/webdav.h	Wed Jun 24 20:26:58 2026 +0200
@@ -305,6 +305,9 @@
 void dav_session_set_authcallback(DavSession *sn, dav_auth_func func, void *userdata);
 void dav_session_set_progresscallback(DavSession *sn, dav_progress_func get, dav_progress_func put, void *userdata);
 
+DavError dav_session_get_error(DavSession *sn);
+const char* dav_session_get_errorstr(DavSession *sn);
+
 void dav_session_destroy(DavSession *sn);
 
 void dav_session_destructor(DavSession *sn);

mercurial