Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 1990 invoked from network); 8 Oct 2008 19:56:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Oct 2008 19:56:45 -0000 Received: (qmail 15579 invoked by uid 500); 8 Oct 2008 19:56:37 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 15515 invoked by uid 500); 8 Oct 2008 19:56:37 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Delivered-To: moderator for dev@httpd.apache.org Received: (qmail 15051 invoked by uid 99); 8 Oct 2008 19:55:10 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=DNS_FROM_SECURITYSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of vpetrucci@gmail.com designates 74.125.44.152 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=q9d95vt4rzKZdmPBam0gf8YEyrYuOEOM5qkR7edmvfI=; b=jEPpvgpAuu8sFvdeakr+EFSsnwzifEMTNglTePdJ2aceooGSBa8TZM3MkLw5f7flYw GRjaoYjJj4DsuKbfeYT+czz8bVu3scMQ52f58PA/latTSoMVYHxAk0KFPg2W04cRWlB4 qurTAfZob61P/9q0PZbgC98X99nwIpgeITtF4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=uLDarc1mDxalIplvyKBmsek/MDPIevMsuxcuuAoIDYFdCaAR667XYo/yJQwHmH88H5 wbSMuUpG+duzUcZLnVuhQMMnjJk9XFqOswTedt5Kshaka62T4KX8ncvIzDpzkEupPEmN +QzQYuSE76Y3XABpoDyQlWS6Si8o7KItu3qW0= Message-ID: <14ee094e0810081254u452891feq66f264b8f11902dc@mail.gmail.com> Date: Wed, 8 Oct 2008 16:54:25 -0300 From: "Vinicius Petrucci" To: dev@httpd.apache.org Subject: load balancer workers MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Checked: Checked by ClamAV on apache.org hi, I'm writing a module that needs to modify the elements (workers) of load balancers. That is, to move workers between different balancers. for example, suppose we have two balancers b1 and b2. also, we have a worker "w" to be moved from "b1" to "b2" basically, I do a push in "b2->workers" array: new_worker = apr_array_push(b2->workers); memcpy(new_worker, w, sizeof(proxy_worker)); then, I decrement by one the elements from "b1" --- we still need to guarantee that the positions of "b1->workers" array are fixed (shifted): proxy_worker *tmp_w = w++; for (j = i; j < b1->workers->nelts-1; j++, tmp_w = w, w++) { memcpy(tmp_w, w, sizeof(proxy_worker)); } b1->workers->nelts--; the problem is that in my module these changes are made. but when I use the balancer-manager interface to list the balancer and respective workers' settings, nothing has changed. this information isn't shared between the modules? I'm using the following piece of code to get the configuration so that I can get balancer and worker data structures references to be modified: conf = (proxy_server_conf *) ap_get_module_config(frontend_info->s->module_config, &proxy_module); balancer = (proxy_balancer *) conf->balancers->elts; thanks in advance, Vinicius