doveadm-util.c revision 70ac869db925653b57f721cd045c467612fd5ee9
/* Copyright (c) 2009-2010 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "array.h"
#include "network.h"
#include "master-service.h"
#include "module-dir.h"
#include "doveadm-settings.h"
#include "doveadm-mail.h"
#include "doveadm-util.h"
#include <time.h>
#include <dirent.h>
void doveadm_load_modules(void)
{
struct module_dir_load_settings mod_set;
/* some doveadm plugins have dependencies to mail plugins. we can load
only those whose dependencies have been loaded earlier, the rest are
ignored. */
}
void doveadm_unload_modules(void)
{
}
bool doveadm_has_unloaded_plugin(const char *name)
{
struct dirent *d;
const char *plugin_name;
/* first check that it's not actually loaded */
return FALSE;
}
return FALSE;
plugin_name += 8;
break;
}
}
return found;
}
{
static char buf[64];
return buf;
}
const char *doveadm_plugin_getenv(const char *name)
{
const char *const *envs;
unsigned int i, count;
return NULL;
for (i = 0; i < count; i += 2) {
return envs[i+1];
}
return NULL;
}
static bool
{
const char *p;
/* host:port */
return FALSE;
/* there is any '/' character (unlikely to be found from host names),
assume ':' is part of a file path */
return FALSE;
return TRUE;
}
int doveadm_connect(const char *path)
{
const char *host;
/* it's a host:port, connect via TCP */
if (ret != 0) {
i_fatal("Lookup of host %s failed: %s",
}
if (fd == -1) {
i_fatal("connect(%s:%u) failed: %m",
}
} else {
if (fd == -1)
}
return fd;
}