From b8aeafb0377321d8443fc36a7a1ae660f407cfd2 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 5 Jul 2018 11:58:24 +0200 Subject: drop 'struct services' Now that we have just one service this can be merged with 'struct hosts'. --- pacredir.h | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) (limited to 'pacredir.h') 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 */ -- cgit v1.2.3-54-g00ecf