WIP: ENGINE-524: use new fn signature ENGINE-524
authorClaudio Luck <claudio.luck@pep.foundation>
Mon, 20 May 2019 13:13:46 +0200
branchENGINE-524
changeset 3736b28bcc5b8c0c
parent 3735 25b31318dcdc
child 3740 248166aa4ab2
WIP: ENGINE-524: use new fn signature
src/platform_unix.c
src/platform_unix.h
     1.1 --- a/src/platform_unix.c	Mon May 20 12:26:41 2019 +0200
     1.2 +++ b/src/platform_unix.c	Mon May 20 13:13:46 2019 +0200
     1.3 @@ -311,6 +311,7 @@
     1.4              p = stpncpy(p, confsdir[cf_i], len);
     1.5              if (automkdir[cf_i]) {
     1.6                  if (mkdir(buffer, S_IRUSR | S_IWUSR | S_IXUSR) != 0 && errno != EEXIST) {
     1.7 +                    printf("ERROR: mkdir '%s' FAIL %d\n", confvals[cf_i], errno);
     1.8                      return PEP_INIT_CANNOT_OPEN_DB;
     1.9                  }
    1.10              }
    1.11 @@ -335,10 +336,10 @@
    1.12  
    1.13      #ifdef NDEBUG
    1.14      if (!done)
    1.15 -        done = unix_local_db_file(buffer, LOCAL_DB_FILENAME);
    1.16 +        done = (PEP_STATUS_OK == unix_local_db_file(buffer, LOCAL_DB_FILENAME));
    1.17      #else
    1.18      if ((!done) || reset)
    1.19 -        done = unix_local_db_file(buffer, LOCAL_DB_FILENAME, reset);
    1.20 +        done = (PEP_STATUS_OK == unix_local_db_file(buffer, LOCAL_DB_FILENAME, reset));
    1.21      #endif
    1.22  
    1.23      if (done)
    1.24 @@ -357,10 +358,10 @@
    1.25  
    1.26      #ifdef NDEBUG
    1.27      if (!done)
    1.28 -        done = unix_local_db_file(buffer, LOCAL_KEYS_DB_FILENAME);
    1.29 +        done = (PEP_STATUS_OK == unix_local_db_file(buffer, LOCAL_KEYS_DB_FILENAME));
    1.30      #else
    1.31      if ((!done) || reset)
    1.32 -        done = unix_local_db_file(buffer, LOCAL_KEYS_DB_FILENAME, reset);
    1.33 +        done = (PEP_STATUS_OK == unix_local_db_file(buffer, LOCAL_KEYS_DB_FILENAME, reset));
    1.34      #endif
    1.35  
    1.36      if (done) {
     2.1 --- a/src/platform_unix.h	Mon May 20 12:26:41 2019 +0200
     2.2 +++ b/src/platform_unix.h	Mon May 20 13:13:46 2019 +0200
     2.3 @@ -16,6 +16,7 @@
     2.4  #include <uuid/uuid.h>
     2.5  #endif
     2.6  
     2.7 +#include "pEpEngine.h"
     2.8  
     2.9  #ifdef __cplusplus
    2.10  extern "C" {