Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 42883 invoked from network); 15 May 2009 19:27:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 May 2009 19:27:20 -0000 Received: (qmail 57828 invoked by uid 500); 15 May 2009 19:27:20 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 57753 invoked by uid 500); 15 May 2009 19:27:20 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 57745 invoked by uid 99); 15 May 2009 19:27:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 May 2009 19:27:19 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of trawick@gmail.com designates 209.85.220.216 as permitted sender) Received: from [209.85.220.216] (HELO mail-fx0-f216.google.com) (209.85.220.216) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 May 2009 19:27:10 +0000 Received: by fxm12 with SMTP id 12so2113951fxm.43 for ; Fri, 15 May 2009 12:26:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=mJ614nesBTb1QOYghe176HdW+yjq3JZ+D+kmezfvqq4=; b=mAHX1zlah+pk4dZ2AqEmkgfRrfxCUSWSIhY/OzXOipgpMUgmdjsSYo03NgX709UvIX j6jaE+jn6foBkkk+iFX5GSVM2mTXs+82VU2VuKuXggVCXvmSaFUOzb6flmDDPQ1l6uvT l3pfWlaOJJsedyV4cTToIwT6kfm5xz/O5eB6Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=BIYQ/lfPtOdQIwEzX1nK4SXuyeXlXh33D5xbPvs9b55tqbYss1oevUnSKkJGQcE/pm 4TIyoGVWiwsb+dLhnMNFOKB+k3fh7DJT5p71nTcm5qeqxGAKpYi66t0NF8Aze6mmnJ2U +dkDvWt7YkiTUkd0L8xUKTjmt/mx2atsopJpY= MIME-Version: 1.0 Received: by 10.86.91.3 with SMTP id o3mr4054717fgb.40.1242415609556; Fri, 15 May 2009 12:26:49 -0700 (PDT) Date: Fri, 15 May 2009 15:26:49 -0400 Message-ID: Subject: [PATCH] handling hook predecessors when predecessor has hooked more than once From: Jeff Trawick To: dev@apr.apache.org Content-Type: multipart/mixed; boundary=000e0cd29778122e550469f86d7e X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd29778122e550469f86d7e Content-Type: multipart/alternative; boundary=000e0cd29778122e480469f86d7c --000e0cd29778122e480469f86d7c Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit mod_p hooks the post_config more than once, including really_last. mod_s's post_config has to run after mod_p's post_config (both of them) for one of its features to work. I tried adding "mod_p.c" to the predecessor list in mod_s, but it wasn't effective, as predecessor processing doesn't account for the possibility that the predecessor may have hooked more than once. No claims here to understand all the hook sorting; I found some code that I was expecting, changed it, was happy, changed the LoadModule order, was still happy, but noted that there's some other, less obvious code that touches predecessors too (tsort()). Any thoughts before I test in more detail? --000e0cd29778122e480469f86d7c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable mod_p hooks the post_config more than once, including really_last.=A0 mod_s= 's post_config has to run after mod_p's post_config (both of them) = for one of its features to work.=A0 I tried adding "mod_p.c" to t= he predecessor list in mod_s, but it wasn't effective, as predecessor p= rocessing doesn't account for the possibility that the predecessor may = have hooked more than once.

No claims here to understand all the hook sorting; I found some code th= at I was expecting, changed it, was happy, changed the LoadModule order, wa= s still happy, but noted that there's some other, less obvious code tha= t touches predecessors too (tsort()).

Any thoughts before I test in more detail?


--000e0cd29778122e480469f86d7c-- --000e0cd29778122e550469f86d7e Content-Type: text/plain; charset=US-ASCII; name="hook_order.txt" Content-Disposition: attachment; filename="hook_order.txt" Content-Transfer-Encoding: base64 X-Attachment-Id: f_fur9wx0f0 SW5kZXg6IGhvb2tzL2Fwcl9ob29rcy5jCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIGhvb2tzL2Fwcl9ob29rcy5j CShyZXZpc2lvbiA3NzM1MjIpCisrKyBob29rcy9hcHJfaG9va3MuYwkod29ya2luZyBjb3B5KQpA QCAtOTYsOCArOTYsOSBAQAogICAgIGZvcihuPTAgOyBuIDwgbkl0ZW1zIDsgKytuKSB7CiAJaW50 IGksazsKIAorICAgICAgICAvKiBzdG9wIGF0IGxhc3QgaW5zdGFuY2Ugb2YgYSBwcmVkZWNlc3Nv ciBpZiBwcmVzZW50IG11bHRpcGxlIHRpbWVzICovCiAJZm9yKGk9MCA7IHBJdGVtc1tuXS5hc3pQ cmVkZWNlc3NvcnMgJiYgcEl0ZW1zW25dLmFzelByZWRlY2Vzc29yc1tpXSA7ICsraSkKLQkgICAg Zm9yKGs9MCA7IGsgPCBuSXRlbXMgOyArK2spCisJICAgIGZvcihrPW5JdGVtcy0xIDsgayA+PSAw IDsgLS1rKQogCQlpZighc3RyY21wKHBJdGVtc1trXS5zek5hbWUscEl0ZW1zW25dLmFzelByZWRl Y2Vzc29yc1tpXSkpIHsKIAkJICAgIGludCBsOwogCkBAIC0xMDksNiArMTEwLDcgQEAKIAkJZ290 X2l0OgogCQkgICAgYnJlYWs7CiAJCX0KKyAgICAgICAgLyogc3RvcCBhdCBmaXJzdCBpbnN0YW5j ZSBvZiBhIHN1Y2Nlc3NvciBpZiBwcmVzZW50IG11bHRpcGxlIHRpbWVzICovCiAJZm9yKGk9MCA7 IHBJdGVtc1tuXS5hc3pTdWNjZXNzb3JzICYmIHBJdGVtc1tuXS5hc3pTdWNjZXNzb3JzW2ldIDsg KytpKQogCSAgICBmb3Ioaz0wIDsgayA8IG5JdGVtcyA7ICsraykKIAkJaWYoIXN0cmNtcChwSXRl bXNba10uc3pOYW1lLHBJdGVtc1tuXS5hc3pTdWNjZXNzb3JzW2ldKSkgewo= --000e0cd29778122e550469f86d7e--