TP->Tokens = Token;
searchFieldNo = GetTemplateTokenNumber(Target, TP, 0, 0);
if (searchFieldNo >= VCEnumCounter) {
- LogTemplateError(NULL, "VCardItem", ERR_PARM1, TP,
- "Invalid define");
+ LogTemplateError(NULL, "VCardItem", ERR_PARM1, TP, "Invalid define");
return 0;
}
return 1;
addrbookent *ab = (addrbookent*) CTX(CTX_VCARD);
if (t == NULL) {
- LogTemplateError(NULL, "VCard item", ERR_NAME, TP,
- "Missing context");
+ LogTemplateError(NULL, "VCard item", ERR_NAME, TP, "Missing context");
return;
}
long searchType;
long type = 0;
void *v;
- int rc = 0;
vcField *vf = (vcField*) Context;
+ int rc = 0;
memcpy(&type, key, sizeof(long));
searchType = GetTemplateTokenNumber(Target, TP, IT_ADDT_PARAM(0), 0);
if (vf->Type == searchType) {
addrbookent *ab = (addrbookent*) CTX(CTX_VCARD);
- if (GetHash(ab->VC, LKEY(vf->cval), &v) && v != NULL)
+ if (GetHash(ab->VC, LKEY(vf->cval), &v) && v != NULL) {
return 1;
+ }
}
return rc;
}
FlushStrBuf(thisVCToken);
is_qp = 0;
is_b64 = 0;
- syslog(LOG_DEBUG, "i: %d oneprop: %s - value: %s", i, v->prop[i].name, v->prop[i].value);
+ // syslog(LOG_DEBUG, "i: %d oneprop: %s - value: %s", i, v->prop[i].name, v->prop[i].value);
StrBufPlain(thisname, v->prop[i].name, -1);
StrBufLowerCase(thisname);
(vField != NULL)) {
vcField *thisField = (vcField *)vField;
StrBuf *ThisFieldStr = NULL;
- syslog(LOG_DEBUG, "got this token: %s, found: %s", ChrPtr(thisVCToken), thisField->STR.Key);
+ // syslog(LOG_DEBUG, "got this token: %s, found: %s", ChrPtr(thisVCToken), thisField->STR.Key);
switch (thisField->Type) {
case StringCluster: {
int j = 0;
StrBufPlain(abEntry->name, _("(no name)"), -1);
}
+ syslog(LOG_DEBUG, "abEntry->name : %s", ChrPtr(abEntry->name));
+
vcard_free(v);
Put(VS->addrbook, SKEY(abEntry->name), abEntry, deleteAbEnt);
vcardview_struct *VS;
VS = (vcardview_struct*) *ViewSpecific;
- if (VS->is_singlecard)
+ if (VS->is_singlecard) {
read_message(WC->WBuf, HKEY("view_message"), lbstr("startmsg"), NULL, &Mime, NULL);
- else
+ }
+ else {
do_addrbook_view(VS); /* Render the address book */
+ }
return 0;
}
VS = (vcardview_struct*) *ViewSpecific;
wDumpContent(1);
- if ((VS != NULL) &&
- (VS->addrbook != NULL))
+ if ((VS != NULL) && (VS->addrbook != NULL)) {
DeleteHash(&VS->addrbook);
- if (VS != NULL)
+ }
+ if (VS != NULL) {
free(VS);
+ }
return 0;
}
{
wc_mime_attachment *Mime = (wc_mime_attachment *) CTX(CTX_MIME_ATACH);
wcsession *WCC = WC;
- if (StrLength(Mime->Data) == 0)
+ if (StrLength(Mime->Data) == 0) {
MimeLoadData(Mime);
+ }
if (StrLength(Mime->Data) > 0) {
struct vCard *v;
StrBuf *Buf;