68 #include <sys/types.h>    84 #define MD5_DIGEST_LEN      32    85 #define SHA1_DIGEST_LEN     40    87 # define OUR_DIGEST_LEN     SHA1_DIGEST_LEN    89 # define OUR_DIGEST_LEN     MD5_DIGEST_LEN   127     unsigned char hash[20];
   130     memset(hash, 0, 
sizeof(hash));
   156 static int verified_file(
const char *
filename, 
const struct stat *sb, 
int tflag, 
struct FTW *ftwbuf)
   165 static int verified_file(
const char *
filename, 
const struct stat *sb, 
int tflag, 
void *ftwbuf)
   218 static int unlink_file(
const char *
filename, 
const struct stat *sb, 
int tflag, 
struct FTW *ftwbuf)
   243                          int(*cb)(
const char *, 
const struct stat *, 
int, 
struct FTW *))
   253                          int(*cb)(
const char *, 
const struct stat *, 
int, 
void *))
   258 #ifndef _DIRENT_HAVE_D_TYPE   266     while ((ent = readdir(dir)) != NULL) {
   268         if (!(strcmp((
char*)ent->d_name, 
"." ) != 0 && strcmp((
char*)ent->d_name, 
".." ) != 0))
   271 #ifdef _DIRENT_HAVE_D_TYPE   274         } 
else if (ent->d_type == DT_REG && cb != NULL) {
   284         } 
else if (S_ISREG(stat.st_mode) && cb != NULL)
   288         if (ret == -1 && ignore_err)
   311     while ((ent = readdir(dir)) != NULL) {
   316             long addr_len = 0, pos = 0;
   376 #define MAP(to, from) \   403     if (mkdir(
octstr_get_cstr(dir), S_IRUSR|S_IWUSR|S_IXUSR) == -1 && errno != EEXIST) {
   500 #define MAP(to, from) \   611         panic(0, 
"DLR: spool: group 'core' is not specified!");
   614         panic(0, 
"DLR: spool: directive 'dlr-spool' is not specified!");
   617     OpenSSL_add_all_digests();
 void error(int err, const char *fmt,...)
 
static Octstr * spool_dir
 
void counter_destroy(Counter *counter)
 
static Octstr * our_hash_func(Octstr *os)
 
void octstr_append(Octstr *ostr1, const Octstr *ostr2)
 
struct dlr_entry * dlr_entry_create(void)
 
long octstr_search(const Octstr *haystack, const Octstr *needle, long pos)
 
#define cfg_get(grp, varname)
 
unsigned long counter_set(Counter *counter, unsigned long n)
 
unsigned long counter_decrease(Counter *counter)
 
Msg *(* store_msg_unpack)(Octstr *os)
 
static void dlr_spool_shutdown()
 
static int for_each_file(const Octstr *dir_s, int ignore_err, int(*cb)(const char *, const struct stat *, int, void *))
 
#define octstr_get_cstr(ostr)
 
#define octstr_copy(ostr, from, len)
 
void octstr_binary_to_hex(Octstr *ostr, int uppercase)
 
unsigned long counter_increase(Counter *counter)
 
static struct pid_list * found
 
static struct dlr_storage handles
 
Octstr * octstr_imm(const char *cstr)
 
Counter * counter_create(void)
 
static Octstr * get_msg_surrogate(const Octstr *dir_s, const Octstr *hash, const Octstr *dst, Octstr **filename)
 
static void dlr_spool_flush(void)
 
int octstr_ncompare(const Octstr *ostr1, const Octstr *ostr2, long n)
 
#define octstr_duplicate(ostr)
 
static long dlr_spool_messages(void)
 
static void dlr_spool_remove(const Octstr *smsc, const Octstr *ts, const Octstr *dst)
 
void msg_destroy(Msg *msg)
 
unsigned long octstr_hash_key(Octstr *ostr)
 
Octstr * octstr_format(const char *fmt,...)
 
void octstr_destroy(Octstr *ostr)
 
char filename[FILENAME_MAX+1]
 
#define octstr_create(cstr)
 
unsigned long counter_value(Counter *counter)
 
Octstr *(* store_msg_pack)(Msg *msg)
 
struct dlr_storage * dlr_init_spool(Cfg *cfg)
 
Octstr * octstr_read_file(const char *filename)
 
static void dlr_spool_add(struct dlr_entry *dlr)
 
long octstr_len(const Octstr *ostr)
 
void dlr_entry_destroy(struct dlr_entry *dlr)
 
static struct dlr_entry * dlr_spool_get(const Octstr *smsc, const Octstr *ts, const Octstr *dst)
 
static Octstr * get_msg_filename(const Octstr *dir_s, const Octstr *hash, const Octstr *dst)
 
static int unlink_file(const char *filename, const struct stat *sb, int tflag, void *ftwbuf)
 
CfgGroup * cfg_get_single_group(Cfg *cfg, Octstr *name)
 
#define octstr_create_from_data(data, len)
 
static int non_verified_file(const char *filename, const struct stat *sb, int tflag, void *ftwbuf)
 
static XMLRPCDocument * msg
 
Octstr * md5digest(Octstr *data)