summaryrefslogtreecommitdiffstats
path: root/src/server/utils.h
diff options
context:
space:
mode:
authorsr2012-08-31 22:30:52 +0200
committersr2012-08-31 22:30:52 +0200
commit51cc7103be13a9cb756d6a89d7e3306d4ef517ed (patch)
tree1ab6468b3ae4550a389b1b78d63bfece8975c036 /src/server/utils.h
parentlast minute messup fixed (diff)
downloaddnbd3-51cc7103be13a9cb756d6a89d7e3306d4ef517ed.tar.gz
dnbd3-51cc7103be13a9cb756d6a89d7e3306d4ef517ed.tar.xz
dnbd3-51cc7103be13a9cb756d6a89d7e3306d4ef517ed.zip
[SERVER] Added soft and hard timeouts for image deletion: reject any new clients for an image where the soft timeout has been reached, kill all clients for an image where the hard timeout has been reached and remove it from the server. Check for the hard timeout every five minutes
[SERVER] Re-Implement image deletion to work with image names instead of vids [SERVER] Add helper functions to simplify dealing with libxml2
Diffstat (limited to 'src/server/utils.h')
-rw-r--r--src/server/utils.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/server/utils.h b/src/server/utils.h
index 18b205a..e923f82 100644
--- a/src/server/utils.h
+++ b/src/server/utils.h
@@ -26,6 +26,7 @@
#ifndef UTILS_H_
#define UTILS_H_
+#define ERROR_OK 0
#define ERROR_FILE_NOT_FOUND 1
#define ERROR_IMAGE_ALREADY_EXISTS 2
#define ERROR_CONFIG_FILE_PERMISSIONS 3
@@ -37,11 +38,14 @@
#define ERROR_INVALID_XML 9
#define ERROR_UNKNOWN_COMMAND 10
#define ERROR_SEE_LOG 11
+#define ERROR_WRONG_PASSWORD 12
void dnbd3_load_config();
int dnbd3_add_image(dnbd3_image_t *image);
int dnbd3_del_image(dnbd3_image_t *image);
+void dnbd3_exec_delete(int save_if_changed);
+
dnbd3_image_t* dnbd3_get_image(char *name, int rid, const char do_lock);
void dnbd3_handle_sigpipe(int signum);