summaryrefslogtreecommitdiffstats
path: root/pacredir.h
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2018-07-05 11:58:24 +0200
committerGravatar Christian Hesse <mail@eworm.de>2018-07-05 11:58:24 +0200
commitb8aeafb0377321d8443fc36a7a1ae660f407cfd2 (patch)
tree1fa776df51ae5b41f2dcd65472458fa806f4d12e /pacredir.h
parenta834db5dc933a4b48c8323ae3e490448a86b448f (diff)
downloadpacredir-b8aeafb0377321d8443fc36a7a1ae660f407cfd2.tar.gz
pacredir-b8aeafb0377321d8443fc36a7a1ae660f407cfd2.tar.zst
drop 'struct services'
Now that we have just one service this can be merged with 'struct hosts'.
Diffstat (limited to 'pacredir.h')
-rw-r--r--pacredir.h28
1 files changed, 10 insertions, 18 deletions
diff --git a/pacredir.h b/pacredir.h
index bddab74..75017b7 100644
--- a/pacredir.h
+++ b/pacredir.h
@@ -44,18 +44,6 @@
#define PROGNAME "pacredir"
-/* services */
-struct services {
- /* network port */
- uint16_t port;
- /* true if host/service is online */
- uint8_t online;
- /* unix timestamp of last bad request */
- __time_t badtime;
- /* count the number of bad requests */
- unsigned int badcount;
-};
-
/* hosts */
struct hosts {
/* host name */
@@ -64,8 +52,14 @@ struct hosts {
AvahiProtocol proto;
/* resolved address */
char address[AVAHI_ADDRESS_STR_MAX];
- /* online status and bad time for services */
- struct services pacserve;
+ /* network port */
+ uint16_t port;
+ /* true if host/service is online */
+ uint8_t online;
+ /* unix timestamp of last bad request */
+ __time_t badtime;
+ /* count the number of bad requests */
+ unsigned int badcount;
/* pointer to next struct element */
struct hosts * next;
};
@@ -80,10 +74,8 @@ struct ignore_interfaces {
/* request */
struct request {
- /* host name */
- const char * host;
- /* pointer to service */
- struct services * service;
+ /* host infos */
+ struct hosts * host;
/* url */
char * url;
/* HTTP status code */