/*
* $Id$
*
- * Copyright (c) 2000-2009 by the citadel.org development team
- *
* This module dumps and/or loads the Citadel database in XML format.
*
+ * Copyright (c) 1987-2010 by the citadel.org team
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "sysdep.h"
* Traverse the visits file...
*/
void migr_export_visits(void) {
- struct visit vbuf;
+ visit vbuf;
struct cdbdata *cdbv;
cdb_rewind(CDB_VISIT);
while (cdbv = cdb_next_item(CDB_VISIT), cdbv != NULL) {
- memset(&vbuf, 0, sizeof(struct visit));
+ memset(&vbuf, 0, sizeof(visit));
memcpy(&vbuf, cdbv->ptr,
- ((cdbv->len > sizeof(struct visit)) ?
- sizeof(struct visit) : cdbv->len));
+ ((cdbv->len > sizeof(visit)) ?
+ sizeof(visit) : cdbv->len));
cdb_free(cdbv);
client_write("<visit>\n", 8);
char FRname[ROOMNAMELEN];
struct floor flbuf;
int floornum = 0;
-struct visit vbuf;
+visit vbuf;
struct MetaData smi;
long import_msgnum = 0;
char *decoded_msg = NULL;
}
if (citadel_migrate_data != 1) {
- CtdlLogPrintf(CTDL_ALERT, "Out-of-sequence tag <%s> detected. Warning: ODD-DATA!\n");
+ CtdlLogPrintf(CTDL_ALERT, "Out-of-sequence tag <%s> detected. Warning: ODD-DATA!\n", el);
return;
}
else if (!strcasecmp(el, "room")) memset(&qrbuf, 0, sizeof (struct ctdlroom));
else if (!strcasecmp(el, "room_messages")) memset(FRname, 0, sizeof FRname);
else if (!strcasecmp(el, "floor")) memset(&flbuf, 0, sizeof (struct floor));
- else if (!strcasecmp(el, "visit")) memset(&vbuf, 0, sizeof (struct visit));
+ else if (!strcasecmp(el, "visit")) memset(&vbuf, 0, sizeof (visit));
else if (!strcasecmp(el, "message")) {
memset(&smi, 0, sizeof (struct MetaData));
}
-void migr_xml_end(void *data, const char *el, const char **attr) {
+void migr_xml_end(void *data, const char *el) {
char *ptr;
int msgcount = 0;
long msgnum = 0L;
}
if (citadel_migrate_data != 1) {
- CtdlLogPrintf(CTDL_ALERT, "Out-of-sequence tag <%s> detected. Warning: ODD-DATA!\n");
+ CtdlLogPrintf(CTDL_ALERT, "Out-of-sequence tag <%s> detected. Warning: ODD-DATA!\n", el);
return;
}
}
}
if (msgcount > 0) {
- CtdlSaveMsgPointersInRoom(FRname, msglist, msgcount, 0, NULL);
+ CtdlSaveMsgPointersInRoom(FRname, msglist, msgcount, 0, NULL, 1);
}
free(msglist);
msglist = NULL;