#include "tools.h"
#include "serv_upgrade.h"
-void do_pre555_usersupp_upgrade(void) {
- struct pre555usersupp usbuf;
- struct usersupp newus;
+void do_pre555_user_upgrade(void) {
+ struct pre555user usbuf;
+ struct ctdluser newus;
struct cdbdata *cdbus;
char tempfilename[PATH_MAX];
FILE *fp, *tp;
strcpy(tempfilename, tmpnam(NULL));
/* First, back out all old version records to a flat file */
- cdb_rewind(CDB_USERSUPP);
- while(cdbus = cdb_next_item(CDB_USERSUPP), cdbus != NULL) {
- memset(&usbuf, 0, sizeof(struct pre555usersupp));
+ cdb_rewind(CDB_USERS);
+ while(cdbus = cdb_next_item(CDB_USERS), cdbus != NULL) {
+ memset(&usbuf, 0, sizeof(struct pre555user));
memcpy(&usbuf, cdbus->ptr,
- ( (cdbus->len > sizeof(struct pre555usersupp)) ?
- sizeof(struct pre555usersupp) : cdbus->len) );
+ ( (cdbus->len > sizeof(struct pre555user)) ?
+ sizeof(struct pre555user) : cdbus->len) );
cdb_free(cdbus);
- fwrite(&usbuf, sizeof(struct pre555usersupp), 1, fp);
+ fwrite(&usbuf, sizeof(struct pre555user), 1, fp);
}
/* ...and overwrite the records with new format records */
rewind(fp);
- while (fread(&usbuf, sizeof(struct pre555usersupp), 1, fp) > 0) {
+ while (fread(&usbuf, sizeof(struct pre555user), 1, fp) > 0) {
if (strlen(usbuf.fullname) > 0) {
lprintf(9, "Upgrading <%s>\n", usbuf.fullname);
- memset(&newus, 0, sizeof(struct usersupp));
+ memset(&newus, 0, sizeof(struct ctdluser));
newus.uid = usbuf.USuid;
strcpy(newus.password, usbuf.password);
/*
* Back end processing function for cmd_bmbx
*/
-void cmd_bmbx_backend(struct quickroom *qrbuf, void *data) {
+void cmd_bmbx_backend(struct ctdlroom *qrbuf, void *data) {
static struct RoomProcList *rplist = NULL;
struct RoomProcList *ptr;
- struct quickroom qr;
+ struct ctdlroom qr;
/* Lazy programming here. Call this function as a ForEachRoom backend
* in order to queue up the room names, or call it with a null room
/*
* Back end processing function for convert_bbsuid_to_minusone()
*/
-void cbtm_backend(struct usersupp *usbuf, void *data) {
+void cbtm_backend(struct ctdluser *usbuf, void *data) {
static struct UserProcList *uplist = NULL;
struct UserProcList *ptr;
- struct usersupp us;
+ struct ctdluser us;
/* Lazy programming here. Call this function as a ForEachUser backend
* in order to queue up the room names, or call it with a null user
return;
}
- if (CitControl.version < 555) do_pre555_usersupp_upgrade();
+ if (CitControl.version < 555) do_pre555_user_upgrade();
if (CitControl.version < 591) bump_mailbox_generation_numbers();
if (CitControl.version < 606) initialize_c_rfc822_strict_from();
if (CitControl.version < 608) convert_bbsuid_to_minusone();