summaryrefslogtreecommitdiff
path: root/noncore
authormjm <mjm>2002-11-27 21:23:11 (UTC)
committer mjm <mjm>2002-11-27 21:23:11 (UTC)
commit2a84b561e50f8fd7973b56b3b0a87471f6b5f18c (patch) (side-by-side diff)
treec1736828899785dc4ea83cef461082c2b2d29f54 /noncore
parentb95d47212803232e62e81b6507568097c949f014 (diff)
downloadopie-2a84b561e50f8fd7973b56b3b0a87471f6b5f18c.zip
opie-2a84b561e50f8fd7973b56b3b0a87471f6b5f18c.tar.gz
opie-2a84b561e50f8fd7973b56b3b0a87471f6b5f18c.tar.bz2
now part of lib
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/daemon/source/getgui.cc43
-rw-r--r--noncore/net/wellenreiter/daemon/source/getgui.hh16
-rw-r--r--noncore/net/wellenreiter/daemon/source/log.cc52
-rw-r--r--noncore/net/wellenreiter/daemon/source/log.hh14
4 files changed, 0 insertions, 125 deletions
diff --git a/noncore/net/wellenreiter/daemon/source/getgui.cc b/noncore/net/wellenreiter/daemon/source/getgui.cc
deleted file mode 100644
index f56f40b..0000000
--- a/noncore/net/wellenreiter/daemon/source/getgui.cc
+++ b/dev/null
@@ -1,43 +0,0 @@
-/*
- * Setup UDP socket for commands
- * Misc wrapper functions for incoming commands
- *
- * $Id$
- */
-
-#include "config.hh"
-#include "getgui.hh"
-#include "log.hh"
-
-struct sockaddr_in saddr;
-
-/* Setup UDP Socket for incoming commands */
-int commsock(int *sock)
-{
-
- if((*sock=socket(AF_INET, SOCK_DGRAM, 0)) < 0)
- {
- log_err("Cannot set up socket: %s", strerror(errno));
- return 0;
- }
-
- memset(&saddr, 0, sizeof(saddr));
- saddr.sin_family = PF_INET;
- saddr.sin_port = htons(DAEMONPORT);
- saddr.sin_addr.s_addr = htonl(INADDR_ANY);
-
- if(bind(*sock,(struct sockaddr *)&saddr, sizeof(saddr)) < 0)
- {
- log_err("Cannot bind socket: %s", strerror(errno));
- close(*sock);
- return 0;
- }
-
- return 1;
-}
-
-int commstring(const char *input)
-{
-
- return 1;
-}
diff --git a/noncore/net/wellenreiter/daemon/source/getgui.hh b/noncore/net/wellenreiter/daemon/source/getgui.hh
deleted file mode 100644
index f5a37f9..0000000
--- a/noncore/net/wellenreiter/daemon/source/getgui.hh
+++ b/dev/null
@@ -1,16 +0,0 @@
-/* $id */
-
-#ifndef GETGUI_HH
-#define GETGUI_HH
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <string.h>
-#include <unistd.h>
-#include <errno.h>
-
-int commsock(int *);
-int commstring(const char *);
-
-#endif /* GETGUI_HH */
diff --git a/noncore/net/wellenreiter/daemon/source/log.cc b/noncore/net/wellenreiter/daemon/source/log.cc
deleted file mode 100644
index 47589d2..0000000
--- a/noncore/net/wellenreiter/daemon/source/log.cc
+++ b/dev/null
@@ -1,52 +0,0 @@
-/*
- * Small functions to log to syslog
- *
- * $Id$
- */
-
-#include "config.hh"
-#include "log.hh"
-
-/* Log to syslog INFO */
-void log_info(const char *fmt,...)
-{
-
- char buffer[4096];
- va_list ap;
-
- memset(buffer, 0, sizeof(buffer)),
- va_start(ap, fmt);
- vsnprintf(buffer, sizeof(buffer)-1, fmt, ap);
- va_end(ap);
-
- openlog(PROGNAME, LOG_PID, LOG_SYSLOG);
- syslog(LOG_INFO, "(info) %s", buffer);
- closelog();
-
-#ifdef DEBUG
- fprintf(stderr, "(info) %s\n", buffer);
-#endif
-
-}
-
-/* Log to syslog ERR */
-void log_err(const char *fmt,...)
-{
-
- char buffer[4096];
- va_list ap;
-
- memset(buffer, 0, sizeof(buffer));
- va_start(ap, fmt);
- vsnprintf(buffer, sizeof(buffer)-1, fmt, ap);
- va_end(ap);
-
- openlog(PROGNAME, LOG_PID, LOG_SYSLOG);
- syslog(LOG_INFO, "(err) %s", buffer);
- closelog();
-
-#ifdef DEBUG
- fprintf(stderr, "(err) %s\n", buffer);
-#endif
-
-}
diff --git a/noncore/net/wellenreiter/daemon/source/log.hh b/noncore/net/wellenreiter/daemon/source/log.hh
deleted file mode 100644
index bdea7e4..0000000
--- a/noncore/net/wellenreiter/daemon/source/log.hh
+++ b/dev/null
@@ -1,14 +0,0 @@
-/* $Id$ */
-
-#ifndef LOG_HH
-#define LOG_HH
-
-#include <stdio.h>
-#include <syslog.h>
-#include <stdarg.h>
-#include <string.h>
-
-void log_info(const char *, ...);
-void log_err(const char *, ...);
-
-#endif /* LOG_HH */