From patchwork Wed Sep 26 17:53:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Willoughby X-Patchwork-Id: 975314 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=spacemonkey.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="MFFgjiy6"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=spacemonkey-com.20150623.gappssmtp.com header.i=@spacemonkey-com.20150623.gappssmtp.com header.b="uFSg5+EU"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42L5Jm5D0cz9s55 for ; Thu, 27 Sep 2018 03:58:16 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:Message-Id: Date:To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=MQ5B+WagSQ9VWB2icNrvyk8ZwYTPggt/6oMV8hNtZzI=; b=MFFgjiy6UwgHOD 9UeUcIwK7POSPbdcsmZaLLcS/cukKCvK/ewsFV2xJ32dxWp3lMIVgprQ5xLJ9jAkcgwdKBoKOZybV 1+zIstesS9Vwo6w0bHn3WOrlXD3aMi4lmhwbrNjpEWlDPsWICeaJVPPs4AYTOgo2z7Ck6nP5sT4+K /LRtdUV3lJZRiv5Frn8guPvuXxDZhzLI9/SnsquoVhEh3p+fgAxSbU6o7Q55I8FjYUFKhrUqf2h81 VHciQgCAaODAl7Hs95fX5jAhQYumbTehk34OIDP57JqukdN3UP6okZLToPT8DqhjfPA1Lm6e+4y1K GK714aO+rSQIwRgb04xw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5E4h-0005K9-8I; Wed, 26 Sep 2018 17:58:11 +0000 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5E0Q-0002uL-KS for openwrt-devel@lists.openwrt.org; Wed, 26 Sep 2018 17:53:49 +0000 Received: by mail-pf1-x442.google.com with SMTP id k21-v6so13802945pff.11 for ; Wed, 26 Sep 2018 10:53:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spacemonkey-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=YzgqfTc0uplnM94APBUV9+mnJBb8jr7bVgzRZKNfBl0=; b=uFSg5+EUmF5KCuK4wDiArpseY3qSmsrSfqTjED0ZK2PNqRM4dUVQ3rPpWVGqgmSPxk Aog1sCoZ+GR4hc6ruR9/hYFYMUAFZONpG2VT4b2pA6FdS4VfEA5p1kORjlRDIYrwC+K8 0ihi/f5ch9PE/U90DErqcbwcmnpWJZwUSE9T2STnGIr7dwzGshObvLhtB/2vCtjWpB4X SZchgQyAASYWkfZkXeieAl0RuIBGpuYO75CENxBEiljZKe1k93kBKxkHM7UeMCxsWs3t s49+aanXmXzn2UsCqITObPS0UCpamMtNLrOHARHSqI9+SkhwkdAzxH6yQLAu5JjsmJ3V y4Nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=YzgqfTc0uplnM94APBUV9+mnJBb8jr7bVgzRZKNfBl0=; b=EUUE7IqghHP9tqezwJh/pZ4CQToFPm3ekHYLBIctxPp/MNnoQYViOoKbYlqhendicc uhsIa7bXha6mXzOFQGiO+sqQY7fnKnYK2JNxnzI7s9Z2kx/USX9dyEK1dNbxrLO3j/xT +RIL028A2B7FuWVL17+vkW3x23KFQSD2MzNiG2bHb3k1lreeIt7pVbrn6yDzmBH0Os8f D8vGC9zWbgdt9lH74AmvJ49DnGqwMh6qvzH6pNQ/UM2rRZoBktuNPShR9rIpR94/EOIU oi97hamftsTeUsu6+wDZ20oXzoLVxp+m51nEjEjYfsa6iO5VuKzk0UobGC4mas+4PFvC /LhA== X-Gm-Message-State: ABuFfoiKv6mM6V/+smAYOOPwrqhLaqDPdj/PGiWYxN56FcSJrRdXfimi zUaTH4oBwqO275CP/dheXB1ofpbXMCA= X-Google-Smtp-Source: ACcGV63fuuSoyvqBph2MNdftUiIhhe44DLxo1Kh1IFp9t1fIV2BNCG6AawFXPPYgGmfcA+pvHUVKMg== X-Received: by 2002:a62:e70a:: with SMTP id s10-v6mr7476168pfh.124.1537984401922; Wed, 26 Sep 2018 10:53:21 -0700 (PDT) Received: from jasmine.apex.local (69-58-94-166.ut.vivintwireless.net. [69.58.94.166]) by smtp.gmail.com with ESMTPSA id l3-v6sm7448095pff.8.2018.09.26.10.53.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Sep 2018 10:53:20 -0700 (PDT) From: Paul Willoughby To: openwrt-devel@lists.openwrt.org Date: Wed, 26 Sep 2018 11:53:14 -0600 Message-Id: <20180926175314.6902-1-paulw@spacemonkey.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180926_105346_710682_66943E67 X-CRM114-Status: UNSURE ( 8.20 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:442 listed in] [list.dnswl.org] 0.0 T_SPF_PERMERROR SPF: test of record failed (permerror) -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.0 DKIMWL_WL_MED DKIMwl.org - Whitelisted Medium sender Subject: [OpenWrt-Devel] [PATCH] uhttpd: fix building without TLS and Lua support X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paul Willoughby MIME-Version: 1.0 Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Adds ifdefs to fix building without TLS and Lua support Signed-off-by: Paul Willoughby --- client.c | 2 ++ main.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/client.c b/client.c index 3c1aa9d..5913553 100644 --- a/client.c +++ b/client.c @@ -557,11 +557,13 @@ void uh_client_notify_state(struct client *cl) if (!s->eof || s->w.data_bytes) return; +#ifdef HAVE_TLS if (cl->tls && cl->ssl.conn && cl->ssl.conn->w.data_bytes) { cl->ssl.conn->eof = s->eof; if (!ustream_write_pending(cl->ssl.conn)) return; } +#endif } return client_close(cl); diff --git a/main.c b/main.c index 219e37e..0b74231 100644 --- a/main.c +++ b/main.c @@ -219,6 +219,7 @@ static void fixup_prefix(char *str) str[len + 1] = 0; } +#ifdef HAVE_LUA static void add_lua_prefix(const char *prefix, const char *handler) { struct lua_prefix *p; char *pprefix, *phandler; @@ -235,6 +236,7 @@ static void add_lua_prefix(const char *prefix, const char *handler) { list_add_tail(&p->list, &conf.lua_prefix); } +#endif int main(int argc, char **argv) {