Blob Blame Raw
diff -Naur mod_cluster-1.1.1.Final-src-ssl.orig/srclib/mod_cluster/native/advertise/mod_advertise.c mod_cluster-1.1.1.Final-src-ssl.new/srclib/mod_cluster/native/advertise/mod_advertise.c
--- mod_cluster-1.1.1.Final-src-ssl.orig/srclib/mod_cluster/native/advertise/mod_advertise.c	2010-07-29 17:04:18.000000000 +0200
+++ mod_cluster-1.1.1.Final-src-ssl.new/srclib/mod_cluster/native/advertise/mod_advertise.c	2011-03-11 14:02:42.290960551 +0100
@@ -81,7 +81,6 @@
 
 /* Advertise sockets */
 static apr_socket_t     *ma_mgroup_socket = NULL;
-static apr_socket_t     *ma_listen_socket = NULL;
 static apr_sockaddr_t   *ma_mgroup_sa     = NULL;
 static apr_sockaddr_t   *ma_listen_sa     = NULL;
 static apr_sockaddr_t   *ma_niface_sa     = NULL;
@@ -170,7 +169,7 @@
 {
     mod_advertise_config *mconf = ap_get_module_config(cmd->server->module_config, &advertise_module);
     if (mconf->ma_advertise_port != MA_DEFAULT_ADVPORT &&
-        mconf->ma_advertise_adrs != MA_DEFAULT_GROUP)
+        strcmp(mconf->ma_advertise_adrs, MA_DEFAULT_GROUP))
         return "Duplicate AdvertiseGroup directives are not allowed";
 
     if (apr_parse_addr_port(&mconf->ma_advertise_adrs,
@@ -626,7 +625,7 @@
          * if the code below doesn't work
          */
         char *ptr = NULL;
-        int port = DEFAULT_HTTP_PORT;
+        unsigned int port = DEFAULT_HTTP_PORT;
         if (ma_server_rec->addrs && ma_server_rec->addrs->host_addr &&
             ma_server_rec->addrs->host_addr->next == NULL) {
             ptr = apr_psprintf(pproc, "%pI", ma_server_rec->addrs->host_addr);
@@ -639,7 +638,7 @@
             } else {
                 port = ma_server_rec->port;
              }
-            ptr = apr_psprintf(pproc, "%s:%lu", ma_server_rec->server_hostname, port);
+            ptr = apr_psprintf(pproc, "%s:%u", ma_server_rec->server_hostname, port);
         }
         rv = apr_parse_addr_port(&mconf->ma_advertise_srvs,
                                  &mconf->ma_advertise_srvi,
@@ -712,10 +711,10 @@
         }
         if (mconf->ma_advertise_server != NULL) {
             ap_rprintf(r, " Advertising on Group %s Port %d ", mconf->ma_advertise_adrs, mconf->ma_advertise_port);
-            ap_rprintf(r, "for %s://%s:%d every %d seconds<br/>",
+            ap_rprintf(r, "for %s://%s:%d every %ld seconds<br/>",
                        mconf->ma_advertise_srvm, mconf->ma_advertise_srvs,
                        mconf-> ma_advertise_srvp,
-                       apr_time_sec(mconf->ma_advertise_freq)
+                       (long) apr_time_sec(mconf->ma_advertise_freq)
                        );
         } else {
             ap_rputs("<br/>", r);
diff -Naur mod_cluster-1.1.1.Final-src-ssl.orig/srclib/mod_cluster/native/mod_manager/balancer.c mod_cluster-1.1.1.Final-src-ssl.new/srclib/mod_cluster/native/mod_manager/balancer.c
--- mod_cluster-1.1.1.Final-src-ssl.orig/srclib/mod_cluster/native/mod_manager/balancer.c	2009-08-05 21:35:44.000000000 +0200
+++ mod_cluster-1.1.1.Final-src-ssl.new/srclib/mod_cluster/native/mod_manager/balancer.c	2011-03-11 14:10:23.706778901 +0100
@@ -170,7 +170,7 @@
     apr_status_t rv;
     balancerinfo_t *ou = balancer;
     if (balancer->id)
-        s->storage->ap_slotmem_free(s->slotmem, balancer->id, balancer);
+        rv = s->storage->ap_slotmem_free(s->slotmem, balancer->id, balancer);
     else {
         /* XXX: for the moment January 2007 ap_slotmem_free only uses ident to remove */
         rv = s->storage->ap_slotmem_do(s->slotmem, loc_read_balancer, &ou, s->p);
diff -Naur mod_cluster-1.1.1.Final-src-ssl.orig/srclib/mod_cluster/native/mod_manager/context.c mod_cluster-1.1.1.Final-src-ssl.new/srclib/mod_cluster/native/mod_manager/context.c
--- mod_cluster-1.1.1.Final-src-ssl.orig/srclib/mod_cluster/native/mod_manager/context.c	2010-02-19 14:41:39.000000000 +0100
+++ mod_cluster-1.1.1.Final-src-ssl.new/srclib/mod_cluster/native/mod_manager/context.c	2011-03-11 14:10:49.531585887 +0100
@@ -173,7 +173,7 @@
     apr_status_t rv;
     contextinfo_t *ou = context;
     if (context->id)
-        s->storage->ap_slotmem_free(s->slotmem, context->id, context);
+        rv = s->storage->ap_slotmem_free(s->slotmem, context->id, context);
     else {
         /* XXX: for the moment January 2007 ap_slotmem_free only uses ident to remove */
         rv = s->storage->ap_slotmem_do(s->slotmem, loc_read_context, &ou, s->p);
diff -Naur mod_cluster-1.1.1.Final-src-ssl.orig/srclib/mod_cluster/native/mod_manager/domain.c mod_cluster-1.1.1.Final-src-ssl.new/srclib/mod_cluster/native/mod_manager/domain.c
--- mod_cluster-1.1.1.Final-src-ssl.orig/srclib/mod_cluster/native/mod_manager/domain.c	2009-08-05 21:35:44.000000000 +0200
+++ mod_cluster-1.1.1.Final-src-ssl.new/srclib/mod_cluster/native/mod_manager/domain.c	2011-03-11 14:09:20.697129579 +0100
@@ -170,7 +170,7 @@
     apr_status_t rv;
     domaininfo_t *ou = domain;
     if (domain->id)
-        s->storage->ap_slotmem_free(s->slotmem, domain->id, domain);
+        rv = s->storage->ap_slotmem_free(s->slotmem, domain->id, domain);
     else {
         /* XXX: for the moment January 2007 ap_slotmem_free only uses ident to remove */
         rv = s->storage->ap_slotmem_do(s->slotmem, loc_read_domain, &ou, s->p);
diff -Naur mod_cluster-1.1.1.Final-src-ssl.orig/srclib/mod_cluster/native/mod_manager/host.c mod_cluster-1.1.1.Final-src-ssl.new/srclib/mod_cluster/native/mod_manager/host.c
--- mod_cluster-1.1.1.Final-src-ssl.orig/srclib/mod_cluster/native/mod_manager/host.c	2009-08-05 21:35:44.000000000 +0200
+++ mod_cluster-1.1.1.Final-src-ssl.new/srclib/mod_cluster/native/mod_manager/host.c	2011-03-11 14:12:37.371428175 +0100
@@ -170,7 +170,7 @@
     apr_status_t rv;
     hostinfo_t *ou = host;
     if (host->id)
-        s->storage->ap_slotmem_free(s->slotmem, host->id, host);
+        rv = s->storage->ap_slotmem_free(s->slotmem, host->id, host);
     else {
         /* XXX: for the moment January 2007 ap_slotmem_free only uses ident to remove */
         rv = s->storage->ap_slotmem_do(s->slotmem, loc_read_host, &ou, s->p);
diff -Naur mod_cluster-1.1.1.Final-src-ssl.orig/srclib/mod_cluster/native/mod_manager/mod_manager.c mod_cluster-1.1.1.Final-src-ssl.new/srclib/mod_cluster/native/mod_manager/mod_manager.c
--- mod_cluster-1.1.1.Final-src-ssl.orig/srclib/mod_cluster/native/mod_manager/mod_manager.c	2011-01-24 21:25:34.000000000 +0100
+++ mod_cluster-1.1.1.Final-src-ssl.new/srclib/mod_cluster/native/mod_manager/mod_manager.c	2011-03-11 14:12:14.580363591 +0100
@@ -650,44 +650,6 @@
     /* All other fields can be modified without causing problems */
     return -1;
 }
-/*
- * Remove host and context belonging to the node
- */
-static void remove_host_context(request_rec *r, int node)
-{
-    /* for read the hosts */
-    int i;
-    int size = loc_get_max_size_host();
-    int *id;
-    int sizecontext = loc_get_max_size_context();
-    int *idcontext;
-
-
-    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
-                "remove_host_context processing node: %d", node);
-    if (size == 0)
-        return;
-    id = apr_palloc(r->pool, sizeof(int) * size);
-    idcontext = apr_palloc(r->pool, sizeof(int) * sizecontext);
-    size = get_ids_used_host(hoststatsmem, id);
-    for (i=0; i<size; i++) {
-        hostinfo_t *ou;
-
-        if (get_host(hoststatsmem, &ou, id[i]) != APR_SUCCESS)
-            continue;
-        if (ou->node == node)
-            remove_host(hoststatsmem, ou);
-    }
-
-    sizecontext = get_ids_used_context(contextstatsmem, idcontext);
-    for (i=0; i<sizecontext; i++) {
-        contextinfo_t *context;
-        if (get_context(contextstatsmem, &context, idcontext[i]) != APR_SUCCESS)
-            continue;
-        if (context->node == node)
-            remove_context(contextstatsmem, context);
-    }
-}
 
 /*
  * Process a CONFIG message
diff -Naur mod_cluster-1.1.1.Final-src-ssl.orig/srclib/mod_cluster/native/mod_manager/node.c mod_cluster-1.1.1.Final-src-ssl.new/srclib/mod_cluster/native/mod_manager/node.c
--- mod_cluster-1.1.1.Final-src-ssl.orig/srclib/mod_cluster/native/mod_manager/node.c	2010-03-23 16:22:23.000000000 +0100
+++ mod_cluster-1.1.1.Final-src-ssl.new/srclib/mod_cluster/native/mod_manager/node.c	2011-03-11 14:11:10.043844005 +0100
@@ -189,7 +189,7 @@
     apr_status_t rv;
     nodeinfo_t *ou = node;
     if (node->mess.id)
-        s->storage->ap_slotmem_free(s->slotmem, node->mess.id, node);
+        rv = s->storage->ap_slotmem_free(s->slotmem, node->mess.id, node);
     else {
         /* XXX: for the moment January 2007 ap_slotmem_free only uses ident to remove */
         rv = s->storage->ap_slotmem_do(s->slotmem, loc_read_node, &ou, s->p);
diff -Naur mod_cluster-1.1.1.Final-src-ssl.orig/srclib/mod_cluster/native/mod_manager/sessionid.c mod_cluster-1.1.1.Final-src-ssl.new/srclib/mod_cluster/native/mod_manager/sessionid.c
--- mod_cluster-1.1.1.Final-src-ssl.orig/srclib/mod_cluster/native/mod_manager/sessionid.c	2009-08-05 21:35:44.000000000 +0200
+++ mod_cluster-1.1.1.Final-src-ssl.new/srclib/mod_cluster/native/mod_manager/sessionid.c	2011-03-11 14:09:56.043128059 +0100
@@ -170,7 +170,7 @@
     apr_status_t rv;
     sessionidinfo_t *ou = sessionid;
     if (sessionid->id)
-        s->storage->ap_slotmem_free(s->slotmem, sessionid->id, sessionid);
+        rv = s->storage->ap_slotmem_free(s->slotmem, sessionid->id, sessionid);
     else {
         /* XXX: for the moment January 2007 ap_slotmem_free only uses ident to remove */
         rv = s->storage->ap_slotmem_do(s->slotmem, loc_read_sessionid, &ou, s->p);
diff -Naur mod_cluster-1.1.1.Final-src-ssl.orig/srclib/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c mod_cluster-1.1.1.Final-src-ssl.new/srclib/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c
--- mod_cluster-1.1.1.Final-src-ssl.orig/srclib/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c	2011-01-24 21:58:01.000000000 +0100
+++ mod_cluster-1.1.1.Final-src-ssl.new/srclib/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c	2011-03-11 14:18:29.962485616 +0100
@@ -496,7 +496,7 @@
         proxy_balancer *balancer = ap_proxy_get_balancer(pool, conf, name);
 
         if (!balancer && (creat_bal == CREAT_NONE ||
-            creat_bal == CREAT_ROOT && s!=main_server)) {
+            (creat_bal == CREAT_ROOT && s!=main_server))) {
             s = s->next;
             continue;
         }
@@ -718,8 +718,8 @@
 {
     apr_status_t status;
     apr_interval_time_t timeout;
-    apr_interval_time_t savetimeout;
-    char savetimeout_set;
+    apr_interval_time_t savetimeout = 0;
+    char savetimeout_set = 0;
 #if AP_MODULE_MAGIC_AT_LEAST(20051115,4)
 #else
     proxy_cluster_helper *helperping;
@@ -1189,7 +1189,6 @@
         /* keep only the contexts corresponding to our balancer */
         if (balancer != NULL) {
             nodeinfo_t *node;
-            char *name;
             if (node_storage->read_node(context->node, &node) != APR_SUCCESS)
                 continue;
             if (strlen(balancer->name) > 11 && strcasecmp(&balancer->name[11], node->mess.balancer) != 0)
@@ -1264,7 +1263,6 @@
         return NULL;
     while (*nodes != -1) {
         nodeinfo_t *node;
-        char *ret;
         if (node_storage->read_node(*nodes, &node) != APR_SUCCESS)
             continue;
         if (node->mess.balancer) {