citadel
About: Citadel is an advanced messaging and collaboration system for groupware and BBS applications (preferred OS: Linux).
  Fossies Dox: citadel.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

serv_migrate.c File Reference
#include "sysdep.h"
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <fcntl.h>
#include <signal.h>
#include <pwd.h>
#include <errno.h>
#include <sys/types.h>
#include <time.h>
#include <sys/wait.h>
#include <string.h>
#include <ctype.h>
#include <limits.h>
#include <expat.h>
#include <libcitadel.h>
#include "citadel.h"
#include "server.h"
#include "citserver.h"
#include "support.h"
#include "config.h"
#include "database.h"
#include "msgbase.h"
#include "user_ops.h"
#include "euidindex.h"
#include "ctdl_module.h"
Include dependency graph for serv_migrate.c:

Go to the source code of this file.

Functions

void xml_strout (char *str)
 
void migr_export_users_backend (char *username, void *data)
 
void migr_export_users (void)
 
void migr_export_room_msg (long msgnum, void *userdata)
 
void migr_export_rooms_backend (struct ctdlroom *buf, void *data)
 
void migr_export_rooms (void)
 
void migr_export_floors (void)
 
int is_sequence_set (char *s)
 
void migr_export_visits (void)
 
void migr_export_message (long msgnum)
 
void migr_export_openids (void)
 
void migr_export_configs (void)
 
void migr_export_messages (void)
 
void migr_do_export (void)
 
void migr_xml_chardata (void *data, const XML_Char *s, int len)
 
void migr_xml_start (void *data, const char *el, const char **attr)
 
int migr_userrecord (void *data, const char *el)
 
int migr_roomrecord (void *data, const char *el)
 
int migr_floorrecord (void *data, const char *el)
 
int migr_visitrecord (void *data, const char *el)
 
void migr_xml_end (void *data, const char *el)
 
void migr_do_import (void)
 
void migr_do_listdirs (void)
 
int migr_restore_message_metadata (long msgnum, int refcount)
 
void migr_check_room_msg (long msgnum, void *userdata)
 
void migr_check_rooms_backend (struct ctdlroom *buf, void *data)
 
void RemoveMessagesFromRooms (StrBuf *RoomNameVec, long msgnum)
 
void migr_do_restore_meta (void)
 
void cmd_migr (char *cmdbuf)
 
char * ctdl_module_migrate_init (int threading)
 

Variables

char migr_tempfilename1 [PATH_MAX]
 
char migr_tempfilename2 [PATH_MAX]
 
FILE * migr_global_message_list
 
int total_msgs = 0
 
char * ikey = NULL
 
int citadel_migrate_data = 0
 
StrBuf * migr_chardata = NULL
 
StrBuf * migr_MsgData = NULL
 
struct ctdluser usbuf
 
struct ctdlroom qrbuf
 
char openid_url [512]
 
long openid_usernum = 0
 
char FRname [128]
 
struct floor flbuf
 
int floornum = 0
 
visit vbuf
 
struct MetaData smi
 
long import_msgnum = 0
 
StrBuf * PlainMessageBuf = NULL
 
HashList * UsedMessageIDS = NULL
 

Function Documentation

◆ cmd_migr()

◆ ctdl_module_migrate_init()

char * ctdl_module_migrate_init ( int  threading)

Definition at line 1121 of file serv_migrate.c.

References cmd_migr(), and CtdlRegisterProtoHook().

◆ is_sequence_set()

int is_sequence_set ( char *  s)

Definition at line 239 of file serv_migrate.c.

Referenced by migr_export_visits().

◆ migr_check_room_msg()

void migr_check_room_msg ( long  msgnum,
void *  userdata 
)

Definition at line 970 of file serv_migrate.c.

References CC, and migr_global_message_list.

Referenced by migr_check_rooms_backend().

◆ migr_check_rooms_backend()

void migr_check_rooms_backend ( struct ctdlroom buf,
void *  data 
)

◆ migr_do_export()

◆ migr_do_import()

◆ migr_do_listdirs()

void migr_do_listdirs ( void  )

Definition at line 880 of file serv_migrate.c.

References cprintf(), ctdl_file_dir, ctdl_key_dir, ctdl_message_dir, and LISTING_FOLLOWS.

Referenced by cmd_migr().

◆ migr_do_restore_meta()

◆ migr_export_configs()

void migr_export_configs ( void  )

◆ migr_export_floors()

◆ migr_export_message()

◆ migr_export_messages()

void migr_export_messages ( void  )

◆ migr_export_openids()

void migr_export_openids ( void  )

◆ migr_export_room_msg()

void migr_export_room_msg ( long  msgnum,
void *  userdata 
)

Definition at line 131 of file serv_migrate.c.

References cprintf(), and migr_global_message_list.

Referenced by migr_export_rooms_backend().

◆ migr_export_rooms()

void migr_export_rooms ( void  )

◆ migr_export_rooms_backend()

◆ migr_export_users()

void migr_export_users ( void  )

Definition at line 126 of file serv_migrate.c.

References ForEachUser(), and migr_export_users_backend().

Referenced by migr_do_export().

◆ migr_export_users_backend()

◆ migr_export_visits()

◆ migr_floorrecord()

int migr_floorrecord ( void *  data,
const char *  el 
)

◆ migr_restore_message_metadata()

◆ migr_roomrecord()

◆ migr_userrecord()

◆ migr_visitrecord()

int migr_visitrecord ( void *  data,
const char *  el 
)

◆ migr_xml_chardata()

void migr_xml_chardata ( void *  data,
const XML_Char *  s,
int  len 
)

Definition at line 508 of file serv_migrate.c.

References migr_chardata.

Referenced by migr_do_import().

◆ migr_xml_end()

◆ migr_xml_start()

void migr_xml_start ( void *  data,
const char *  el,
const char **  attr 
)

◆ RemoveMessagesFromRooms()

void RemoveMessagesFromRooms ( StrBuf *  RoomNameVec,
long  msgnum 
)

◆ xml_strout()

Variable Documentation

◆ citadel_migrate_data

int citadel_migrate_data = 0

Definition at line 493 of file serv_migrate.c.

Referenced by migr_xml_end(), and migr_xml_start().

◆ flbuf

◆ floornum

int floornum = 0

Definition at line 502 of file serv_migrate.c.

Referenced by imap_create(), migr_floorrecord(), and migr_xml_end().

◆ FRname

char FRname[128]

Definition at line 500 of file serv_migrate.c.

Referenced by migr_xml_end(), and migr_xml_start().

◆ ikey

char* ikey = NULL

Definition at line 58 of file serv_migrate.c.

Referenced by migr_xml_end(), and migr_xml_start().

◆ import_msgnum

long import_msgnum = 0

Definition at line 505 of file serv_migrate.c.

Referenced by migr_xml_end(), and migr_xml_start().

◆ migr_chardata

◆ migr_global_message_list

FILE* migr_global_message_list

◆ migr_MsgData

StrBuf* migr_MsgData = NULL

Definition at line 495 of file serv_migrate.c.

Referenced by migr_do_import(), migr_xml_end(), and migr_xml_start().

◆ migr_tempfilename1

char migr_tempfilename1[PATH_MAX]

◆ migr_tempfilename2

char migr_tempfilename2[PATH_MAX]

Definition at line 55 of file serv_migrate.c.

Referenced by cmd_migr(), migr_do_restore_meta(), and migr_export_rooms().

◆ openid_url

char openid_url[512]

Definition at line 498 of file serv_migrate.c.

Referenced by migr_xml_end(), and migr_xml_start().

◆ openid_usernum

long openid_usernum = 0

Definition at line 499 of file serv_migrate.c.

Referenced by migr_xml_end().

◆ PlainMessageBuf

StrBuf* PlainMessageBuf = NULL

Definition at line 893 of file serv_migrate.c.

Referenced by migr_restore_message_metadata().

◆ qrbuf

◆ smi

◆ total_msgs

int total_msgs = 0

Definition at line 57 of file serv_migrate.c.

Referenced by migr_export_messages(), migr_export_rooms(), and pop3_stat().

◆ usbuf

◆ UsedMessageIDS

HashList* UsedMessageIDS = NULL

Definition at line 894 of file serv_migrate.c.

◆ vbuf