Call sodium_init() - dedup - deduplicating backup program
HTML git clone git://bitreich.org/dedup/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/dedup/
DIR Log
DIR Files
DIR Refs
DIR Tags
DIR README
DIR LICENSE
---
DIR commit 3ae183aa99bba33b67a2f59447e1e835104b629b
DIR parent 7d0e3db7c6c61fdea091bccb1d8a8e61545be235
HTML Author: sin <sin@2f30.org>
Date: Wed, 1 May 2019 22:19:30 +0100
Call sodium_init()
Diffstat:
M bstorage.c | 6 ++++++
1 file changed, 6 insertions(+), 0 deletions(-)
---
DIR diff --git a/bstorage.c b/bstorage.c
@@ -289,6 +289,9 @@ bscreat(struct bctx *bctx, char *path, int mode, struct bparam *bpar)
struct bhdr *bhdr;
int fd;
+ if (sodium_init() < 0)
+ return -1;
+
fd = open(path, O_RDWR | O_CREAT | O_EXCL, mode);
if (fd < 0)
return -1;
@@ -348,6 +351,9 @@ bsopen(struct bctx *bctx, char *path, int flags, int mode, struct bparam *bpar)
return -1;
}
+ if (sodium_init() < 0)
+ return -1;
+
fd = open(path, flags, mode);
if (fd < 0)
return -1;