/*
* This module dumps and/or loads the Citadel database in XML format.
*
- * Copyright (c) 1987-2016 by the citadel.org team
+ * Copyright (c) 1987-2018 by the citadel.org team
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3.
cprintf("<msg_meta_refcount>%d</msg_meta_refcount>\n", smi.meta_refcount);
cprintf("<msg_meta_rfc822_length>%ld</msg_meta_rfc822_length>\n", smi.meta_rfc822_length);
client_write(HKEY("<msg_meta_content_type>")); xml_strout(smi.meta_content_type); client_write(HKEY("</msg_meta_content_type>\n"));
- client_write(HKEY("<msg_mimetype>")); xml_strout(smi.mimetype); client_write(HKEY("</msg_mimetype>\n"));
client_write(HKEY("<msg_text>"));
CtdlSerializeMessage(&smr, msg);
long usernum;
char url[512];
- cdb_rewind(CDB_OPENID);
- while (cdboi = cdb_next_item(CDB_OPENID), cdboi != NULL) {
+ cdb_rewind(CDB_EXTAUTH);
+ while (cdboi = cdb_next_item(CDB_EXTAUTH), cdboi != NULL) {
if (cdboi->len > sizeof(long)) {
client_write(HKEY("<openid>\n"));
memcpy(&usernum, cdboi->ptr, sizeof(long));
oid_data = malloc(oid_data_len);
memcpy(oid_data, &openid_usernum, sizeof(long));
memcpy(&oid_data[sizeof(long)], openid_url, strlen(openid_url) + 1);
- cdb_store(CDB_OPENID, openid_url, strlen(openid_url), oid_data, oid_data_len);
+ cdb_store(CDB_EXTAUTH, openid_url, strlen(openid_url), oid_data, oid_data_len);
free(oid_data);
syslog(LOG_INFO, "Imported OpenID: %s (%ld)", openid_url, openid_usernum);
}
else if (!strcasecmp(el, "msg_meta_refcount")) smi.meta_refcount = atoi(ChrPtr(migr_chardata));
else if (!strcasecmp(el, "msg_meta_rfc822_length")) smi.meta_rfc822_length = atoi(ChrPtr(migr_chardata));
else if (!strcasecmp(el, "msg_meta_content_type")) safestrncpy(smi.meta_content_type, ChrPtr(migr_chardata), sizeof smi.meta_content_type);
- else if (!strcasecmp(el, "msg_mimetype")) safestrncpy(smi.mimetype, ChrPtr(migr_chardata), sizeof smi.mimetype);
else if (!strcasecmp(el, "msg_text"))
{
}
syslog(LOG_INFO,
- "%s message #%ld, size=%d, refcount=%d, bodylength=%ld, content-type: %s / %s",
+ "%s message #%ld, size=%d, refcount=%d, bodylength=%ld, content-type: %s",
(rc!= 0)?"failed to import ":"Imported ",
import_msgnum,
StrLength(migr_MsgData),
smi.meta_refcount,
smi.meta_rfc822_length,
- smi.meta_content_type,
- smi.mimetype);
+ smi.meta_content_type
+ );
memset(&smi, 0, sizeof(smi));
}
syslog(LOG_INFO,
- "Setting message #%ld meta data to: refcount=%d, bodylength=%ld, content-type: %s / %s",
+ "Setting message #%ld meta data to: refcount=%d, bodylength=%ld, content-type: %s",
smi.meta_msgnum,
smi.meta_refcount,
smi.meta_rfc822_length,
- smi.meta_content_type,
- smi.mimetype);
+ smi.meta_content_type
+ );
PutMetaData(&smi);