From 2c8bbcb71422ca3d6fe16f4d5f9ccce49c812889 Mon Sep 17 00:00:00 2001 From: trisk Date: Sat, 7 Jul 2007 03:36:32 +0000 Subject: [PATCH] Fix use of uninitialised variables in msgapi, also some housekeeping. --- src/libs/msgapi/msgapi.c | 13 +++++-------- src/libs/msgapi/msgcollector.c | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/libs/msgapi/msgapi.c b/src/libs/msgapi/msgapi.c index 776bb46..c5006c7 100644 --- a/src/libs/msgapi/msgapi.c +++ b/src/libs/msgapi/msgapi.c @@ -66,12 +66,6 @@ #define CONNMGR_REQ_STORE_NAME 2 #define CONNMGR_REQ_CHECK_NAME 3 -/* I made sure this is defined in xplschema.h --Ryan - We should remove it from here at some point. */ -#if !defined(A_INTERNET_EMAIL_ADDRESS) -#define A_INTERNET_EMAIL_ADDRESS "Internet EMail Address" -#endif - enum LibraryStates { LIBRARY_LOADED = 0, LIBRARY_INITIALIZING, @@ -167,6 +161,10 @@ typedef struct _ConnectionManagerCommand { unsigned char name[1]; } ConnectionManagerCommand; +/* private */ +BOOL +MsgGetUpdateStatus(char *record, int record_length); + /* I tried to remove this, but it's still needed :( * Python server for Dragonfly needs a way to authenticate itself * to the queue... @@ -638,7 +636,6 @@ MsgGetParentAttribute(const unsigned char *userDN, unsigned char *attribute, MDB { char configDn[MDB_MAX_OBJECT_CHARS + 1]; unsigned long index; - MDBValueStruct *v; int result = 0; configDn[0] = '\0'; @@ -646,7 +643,7 @@ MsgGetParentAttribute(const unsigned char *userDN, unsigned char *attribute, MDB if (MsgGetUserSettingsDN(userDN, configDn, vOut, FALSE)) { if (MDBRead(configDn, MSGSRV_A_PARENT_OBJECT, vOut) > 0) { index = vOut->Used - 1; - if (MDBRead(v->Value[index], attribute, vOut)>0) { + if (MDBRead(vOut->Value[index], attribute, vOut)>0) { MDBFreeValue(index, vOut); result = vOut->Used; } else { diff --git a/src/libs/msgapi/msgcollector.c b/src/libs/msgapi/msgcollector.c index 95b5752..222a1c2 100644 --- a/src/libs/msgapi/msgcollector.c +++ b/src/libs/msgapi/msgcollector.c @@ -355,7 +355,7 @@ ImportJson(BongoArray *objects, if (BongoJsonArrayGetObject(objects, i, &event) == BONGO_JSON_OK) { BongoCalObject *cal; EventData *evtData = NULL; - int res; + int res = MSG_COLLECT_OK; char *guid = NULL; BOOL import = TRUE;