summaryrefslogtreecommitdiffabout
path: root/jabberd/main.c
authorSergey Poznyakoff <gray@gnu.org.ua>2007-06-05 12:29:00 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2007-06-05 12:29:00 (GMT)
commitba2ebb820881508c10afcdc3283447de1e4d85c2 (patch) (side-by-side diff)
tree98dea2b5f7957c1969dca7a75fb8839c7e0cb236 /jabberd/main.c
parent2c586254cf3fd476367b66eb9fab086bbc405674 (diff)
downloadgsc-ba2ebb820881508c10afcdc3283447de1e4d85c2.tar.gz
gsc-ba2ebb820881508c10afcdc3283447de1e4d85c2.tar.bz2
* jabberd/jabberd.h: Fix typo
* jabberd/progman.c (struct prog.pidfile): New member (register_prog): Take 6th argument, specifying the file to be deleted before startup. (register_transport, register_jabber_process): Update calls to register_prog (prog_start): Remove pidfile if requested (progman_dump_stats): Minor fix * jabberd/main.c: New configuration keyword (in `transport' section): `pidfile' * doc/gsc.texi: Update git-svn-id: file:///svnroot/gsc/trunk@258 d2de0444-eb31-0410-8365-af798a554d48
Diffstat (limited to 'jabberd/main.c') (more/less context) (ignore whitespace changes)
-rw-r--r--jabberd/main.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/jabberd/main.c b/jabberd/main.c
index e726d3a..a206bc9 100644
--- a/jabberd/main.c
+++ b/jabberd/main.c
@@ -422,6 +422,7 @@ struct transport_rec
int retr[2];
int depc;
char **depv;
+ char *pidfile;
};
static void
@@ -471,6 +472,14 @@ cfg_transport_depend (struct cfg_file *file, char *kw, char *val, void *data)
}
void
+cfg_transport_pidfile (struct cfg_file *file, char *kw, char *val,
+ void *data)
+{
+ struct transport_rec *prec = data;
+ prec->pidfile = strdup (val);
+}
+
+void
cfg_transport (struct cfg_file *file, char *kw, char *val, void *unused)
{
int rc;
@@ -484,6 +493,7 @@ cfg_transport (struct cfg_file *file, char *kw, char *val, void *unused)
{ "stderr", cfg_transport_stderr },
{ "facility", cfg_transport_facility },
{ "depend", cfg_transport_depend },
+ { "pidfile", cfg_transport_pidfile },
{ NULL }
};
memset (&rec, 0, sizeof rec);
@@ -499,9 +509,10 @@ cfg_transport (struct cfg_file *file, char *kw, char *val, void *unused)
config_file, file->line, strerror (rc));
return;
}
- register_transport (rec.tag, argv, rec.retr, rec.depv);
+ register_transport (rec.tag, argv, rec.retr, rec.depv, rec.pidfile);
free (rec.tag);
free (rec.command);
+ free (rec.pidfile);
argcv_free (rec.depc, rec.depv);
argcv_free (argc, argv);
}

Return to:

Send suggestions and report system problems to the System administrator.