Fix use of uninitialised variables in msgapi, also some housekeeping.

This commit is contained in:
trisk
2007-07-07 03:36:32 +00:00
parent 77d4d73212
commit 2c8bbcb714
2 changed files with 6 additions and 9 deletions
+5 -8
View File
@@ -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 {
+1 -1
View File
@@ -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;