]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
gindent
authorwessels <>
Wed, 10 Apr 1996 00:20:26 +0000 (00:20 +0000)
committerwessels <>
Wed, 10 Apr 1996 00:20:26 +0000 (00:20 +0000)
src/cache_cf.cc
src/main.cc
src/send-announce.cc

index 47472936eec060d3bec5cfee987bf45c0d65acad..b6a5a418b5656afa838a874257ead5524a6f8aaf 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: cache_cf.cc,v 1.26 1996/04/09 18:18:46 wessels Exp $ */
+/* $Id: cache_cf.cc,v 1.27 1996/04/09 18:20:26 wessels Exp $ */
 
 /* DEBUG: Section 3             cache_cf: Configuration file parsing */
 
@@ -135,8 +135,8 @@ static struct {
 #define DefaultFtpUser         "cached@"       /* Default without domain */
 #define DefaultAnnounceHost    "sd.cache.nlanr.net"
 #define DefaultAnnouncePort    3131
-#define DefaultAnnounceFile    (char *)NULL    /* default NONE */
-#define DefaultAnnounceRate    86400           /* every 24 hours */
+#define DefaultAnnounceFile    (char *)NULL    /* default NONE */
+#define DefaultAnnounceRate    86400   /* every 24 hours */
 
 extern char *config_file;
 
@@ -1533,7 +1533,6 @@ int parseConfigFile(file_name)
        printf("         For this run, however, cached will use %d minutes for clean_rate.\n", (int) (getCleanRate() / 60));
        fflush(stdout);         /* print message */
     }
-
     if (accel_ip_acl == NULL)
        accel_ip_acl = proxy_ip_acl;
 
index 65518a3a7f22c072cc1066757b6ded56d722fc27..50a7e57da2918462827725084a21c90df482332d 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: main.cc,v 1.24 1996/04/09 18:18:50 wessels Exp $ */
+/* $Id: main.cc,v 1.25 1996/04/09 18:20:28 wessels Exp $ */
 
 /* DEBUG: Section 1             main: startup and main loop */
 
@@ -320,8 +320,8 @@ int main(argc, argv)
            }
            if ((n = getAnnounceRate()) > 0) {
                if (cached_curtime > last_announce + n)
-                       send_announce();
-                       last_announce = cached_curtime;
+                   send_announce();
+               last_announce = cached_curtime;
            }
            /* house keeping */
            break;
index 428b9cf4fd43013dcbdd5aa5a81162650f2e14c5..b3529c5685c85ce84b0419bb57bd77198aa13326 100644 (file)
@@ -1,7 +1,7 @@
-/* $Id: send-announce.cc,v 1.5 1996/04/09 18:18:50 wessels Exp $ */
+/* $Id: send-announce.cc,v 1.6 1996/04/09 18:20:28 wessels Exp $ */
 
 /*
- * DEBUG: Section 27           send-announce
+ * DEBUG: Section 27          send-announce
  */
 
 #include "squid.h"
@@ -38,24 +38,23 @@ void send_announce()
     host = getAnnounceHost();
     port = getAnnouncePort();
 
-    if ((hp = ipcache_gethostbyname(host))== NULL) {
-       debug(27,1,"send_announce: Unknown host '%s'\n", host);
+    if ((hp = ipcache_gethostbyname(host)) == NULL) {
+       debug(27, 1, "send_announce: Unknown host '%s'\n", host);
        return;
     }
     if ((file = getAnnounceFile())) {
        /* XXX could block */
        fd = file_open(file, NULL, O_RDONLY);
-       if (fd > -1 && (n = read(fd, sndbuf+l, BUFSIZ-l-1)) > 0);
-               l += n;
-               sndbuf[l] = '\0';
+       if (fd > -1 && (n = read(fd, sndbuf + l, BUFSIZ - l - 1)) > 0) {
+           l += n;
+           sndbuf[l] = '\0';
        } else {
-               debug(27,1,"send_announce: %s: %s\n", file, xstrerror());
+           debug(27, 1, "send_announce: %s: %s\n", file, xstrerror());
        }
     }
-
     qdata = (icpUdpData *) xcalloc(1, sizeof(icpUdpData));
     qdata->msg = xstrdup(sndbuf);
-    qdata->len = strlen(sndbuf)+1;
+    qdata->len = strlen(sndbuf) + 1;
     qdata->address.sin_family = AF_INET;
     qdata->address.sin_port = htons(port);
     memcpy(&qdata->address.sin_addr, hp->h_addr_list[0], hp->h_length);
@@ -63,5 +62,5 @@ void send_announce()
     comm_set_select_handler(theUdpConnection,
        COMM_SELECT_WRITE,
        (PF) icpUdpReply,
-        (void *) qdata);
+       (void *) qdata);
 }