aboutsummaryrefslogtreecommitdiffstats
path: root/apps/sympathy.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/sympathy.c')
-rw-r--r--apps/sympathy.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/apps/sympathy.c b/apps/sympathy.c
index 7821ce5..c85bdae 100644
--- a/apps/sympathy.c
+++ b/apps/sympathy.c
@@ -11,6 +11,9 @@ static char rcsid[] =
/*
* $Log$
+ * Revision 1.47 2008/05/09 12:26:58 staffcvs
+ * *** empty log message ***
+ *
* Revision 1.46 2008/05/09 12:19:18 james
* *** empty log message ***
*
@@ -164,10 +167,13 @@ static char rcsid[] =
#include <fcntl.h>
#include <sys/resource.h>
#include <sys/wait.h>
+#include <syslog.h>
#include "mainloop.h"
+int use_syslog=0;
+
extern void usage (void);
extern char *expand (const char *, int *);
static char hostname[1024];
@@ -652,6 +658,10 @@ main (int argc, char *argv[])
fatal_moan
("-c or -r are incompatible with -p, -d, -K, -b, -f, -R, -P or -L");
+ if (oflags['C'] || !oflags['d'])
+ fatal_moan("-C requires -d");
+
+
if (oflags['t'] || oflags['s']) {
if (!oflags['p'] && !oflags['d'])
oflags['p']++;
@@ -714,7 +724,7 @@ main (int argc, char *argv[])
}
- if (oflags['s'] || oflags['t']) {
+ if (oflags['s'] || oflags['t'] || oflags['C']) {
if (oflags['P']) {
FILE *fp;
pid_file = oargs['P'];
@@ -774,7 +784,7 @@ main (int argc, char *argv[])
fatal_moan ("unable to open serial port %s", oargs['d']);
if (oflags['C']) {
- serial_close(ctx->t);
+ ctx->t->close(ctx->t);
return 0;
}
}