merged in default ENGINE-332
authorKrista Bennett <krista@pep-project.org>
Wed, 24 Jan 2018 18:23:21 +0100
branchENGINE-332
changeset 2445c061bd2500bd
parent 2444 a97dd32908e5
parent 2443 154269655c12
child 2446 75d5cac2761a
merged in default
src/pEpEngine.c
     1.1 --- a/src/pEpEngine.c	Wed Jan 24 18:22:36 2018 +0100
     1.2 +++ b/src/pEpEngine.c	Wed Jan 24 18:23:21 2018 +0100
     1.3 @@ -1014,9 +1014,6 @@
     1.4  
     1.5      // runtime config
     1.6  
     1.7 -#ifdef ANDROID
     1.8 -#elif TARGET_OS_IPHONE
     1.9 -#else /* Desktop */
    1.10      if (very_first)
    1.11      {
    1.12          // On first run, all private keys already present in PGP keyring 
    1.13 @@ -1029,7 +1026,7 @@
    1.14          //
    1.15          // Indeed, if pEpEngine did import spoofed private keys in previous
    1.16          // install, then those keys become automatically trusted in case 
    1.17 -        // pEp_management.db is deleted.
    1.18 +        // management.db is deleted.
    1.19          //
    1.20          // A solution to distinguish bare GPG keyring from pEp keyring is
    1.21          // needed here. Then keys managed by pEpEngine wouldn't be
    1.22 @@ -1053,7 +1050,6 @@
    1.23              }
    1.24          }
    1.25      }
    1.26 -#endif
    1.27  
    1.28      // sync_session set to own session by default
    1.29      // sync_session is then never null on a valid session
     2.1 --- a/src/pEp_string.c	Wed Jan 24 18:22:36 2018 +0100
     2.2 +++ b/src/pEp_string.c	Wed Jan 24 18:23:21 2018 +0100
     2.3 @@ -1,6 +1,7 @@
     2.4  // This file is under GNU General Public License 3.0
     2.5  // see LICENSE.txt
     2.6  
     2.7 +#include "platform.h"
     2.8  #include "pEp_string.h"
     2.9  
    2.10  #include <stdlib.h>
    2.11 @@ -8,10 +9,6 @@
    2.12  
    2.13  DYNAMIC_API char * new_string(const char *src, size_t len)
    2.14  {
    2.15 -    assert(src || len);
    2.16 -    if (!(src || len))
    2.17 -        return NULL;
    2.18 -
    2.19      char *s = NULL;
    2.20      if (src) {
    2.21          if (len)
     3.1 --- a/src/pEp_string.h	Wed Jan 24 18:22:36 2018 +0100
     3.2 +++ b/src/pEp_string.h	Wed Jan 24 18:23:21 2018 +0100
     3.3 @@ -20,12 +20,9 @@
     3.4  //  return value:
     3.5  //      pointer to string object or NULL if out of memory
     3.6  //
     3.7 -//  caveat:
     3.8 -//      one of the two parameters has to be set at least
     3.9 -//
    3.10  //  calling with str and len is equivalent to strndup()
    3.11  //  calling with str but len=0 is equivalent to strdup()
    3.12 -//  calling with str=NULL and len is equivalent to calloc()
    3.13 +//  calling with str=NULL is equivalent to calloc()
    3.14  
    3.15  DYNAMIC_API char * new_string(const char *src, size_t len);
    3.16