...
authorvb
Thu, 26 Feb 2015 14:30:32 +0100
changeset 766da29caa5dae
parent 74 c94f9b9cb7f2
child 77 2c60cebca522
...
src/Makefile
src/message_api.c
src/pEpEngine.c
src/pgp_gpg.c
src/transport.c
src/transport.h
     1.1 --- a/src/Makefile	Tue Feb 24 02:19:11 2015 +0100
     1.2 +++ b/src/Makefile	Thu Feb 26 14:30:32 2015 +0100
     1.3 @@ -9,10 +9,10 @@
     1.4  LIBGPGME=libgpgme-pthread.dylib
     1.5  CC?=clang -std=c99 -pthread
     1.6  LD?=clang
     1.7 -CFLAGS?=-I$(GPGME_IN)/include -I/opt/local/include $(OPTIMIZE) -pedantic \
     1.8 +CFLAGS?=-I$(GPGME_IN)/include -I$(HOME)/include -I/opt/local/include $(OPTIMIZE) -pedantic \
     1.9  	-DSYSTEM_DB=\"$(SYSTEM_DB)\" -DLIBGPGME=\"$(LIBGPGME)\"
    1.10  LDFLAGS?=-lc -shared -arch x86_64 \
    1.11 -	-L/opt/local/lib -letpan -lgpgme-pthread -lsqlite3
    1.12 +	-L$(HOME)/lib -L/opt/local/lib -letpan -lgpgme-pthread -lsqlite3
    1.13  
    1.14  else
    1.15  $(error don't know how to make for $(BUILD_FOR) on $(BUILD_ON))
     2.1 --- a/src/message_api.c	Tue Feb 24 02:19:11 2015 +0100
     2.2 +++ b/src/message_api.c	Thu Feb 26 14:30:32 2015 +0100
     2.3 @@ -6,7 +6,7 @@
     2.4  #include <string.h>
     2.5  #include <stdlib.h>
     2.6  
     2.7 -#define NOT_IMPLEMENTED assert(0);
     2.8 +#define NOT_IMPLEMENTED assert(0); return PEP_UNKNOWN_ERROR;
     2.9  
    2.10  static char * combine_short_and_long(const message * src)
    2.11  {
    2.12 @@ -287,6 +287,7 @@
    2.13      *dst = NULL;
    2.14      
    2.15      // msg = new_message(src->dir, from, to, NULL);
    2.16 +    NOT_IMPLEMENTED
    2.17  
    2.18      *dst = msg;
    2.19      return PEP_STATUS_OK;
     3.1 --- a/src/pEpEngine.c	Tue Feb 24 02:19:11 2015 +0100
     3.2 +++ b/src/pEpEngine.c	Thu Feb 26 14:30:32 2015 +0100
     3.3 @@ -319,7 +319,7 @@
     3.4      if (src->next) {
     3.5          dst->next = stringlist_dup(src->next);
     3.6          if (dst->next == NULL) {
     3.7 -            free(dst);
     3.8 +            free_stringlist(dst);
     3.9              return NULL;
    3.10          }
    3.11      }
     4.1 --- a/src/pgp_gpg.c	Tue Feb 24 02:19:11 2015 +0100
     4.2 +++ b/src/pgp_gpg.c	Thu Feb 26 14:30:32 2015 +0100
     4.3 @@ -5,8 +5,8 @@
     4.4  
     4.5  #define _GPGERR(X) ((X) & 0xffffL)
     4.6  
     4.7 -void *gpgme;
     4.8 -struct gpg_s gpg;
     4.9 +static void *gpgme;
    4.10 +static struct gpg_s gpg;
    4.11  
    4.12  static bool ensure_keyserver()
    4.13  {
     5.1 --- a/src/transport.c	Tue Feb 24 02:19:11 2015 +0100
     5.2 +++ b/src/transport.c	Thu Feb 26 14:30:32 2015 +0100
     5.3 @@ -33,10 +33,8 @@
     5.4  {
     5.5      identity_list *id_list = calloc(1, sizeof(identity_list));
     5.6      assert(id_list);
     5.7 -    if (id_list == NULL) {
     5.8 -        free(ident);
     5.9 +    if (id_list == NULL)
    5.10          return NULL;
    5.11 -    }
    5.12  
    5.13      id_list->ident = ident;
    5.14  
     6.1 --- a/src/transport.h	Tue Feb 24 02:19:11 2015 +0100
     6.2 +++ b/src/transport.h	Thu Feb 26 14:30:32 2015 +0100
     6.3 @@ -37,7 +37,8 @@
     6.4  //      new identity_list or NULL if out of memory
     6.5  //
     6.6  //  caveat:
     6.7 -//      ident is being moved, the caller loses ownership
     6.8 +//      ident is being moved if the function succeeds, the caller loses
     6.9 +//      ownership
    6.10  
    6.11  DYNAMIC_API identity_list *new_identity_list(pEp_identity *ident);
    6.12  
    6.13 @@ -75,7 +76,8 @@
    6.14  //      pointer to the last element in identity_list or NULL if out of memory
    6.15  //
    6.16  //  caveat:
    6.17 -//      ident is being moved, the caller loses ownership
    6.18 +//      ident is being moved, the caller loses ownership if the function is
    6.19 +//      successful
    6.20  
    6.21  DYNAMIC_API identity_list *identity_list_add(identity_list *id_list, pEp_identity *ident);
    6.22