Message ID | 20200115151137.4434-1-sbabic@denx.de |
---|---|
State | Accepted |
Headers | show
Return-Path: <swupdate+bncBCXPLOXJ6IKRBL6X7TYAKGQENINRCFI@googlegroups.com> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::240; helo=mail-lj1-x240.google.com; envelope-from=swupdate+bncbcxploxj6ikrbl6x7tyakgqeninrcfi@googlegroups.com; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20161025 header.b=b9RHset4; dkim-atps=neutral Received: from mail-lj1-x240.google.com (mail-lj1-x240.google.com [IPv6:2a00:1450:4864:20::240]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47yW7L3bSKz9sSZ for <incoming@patchwork.ozlabs.org>; Thu, 16 Jan 2020 02:11:48 +1100 (AEDT) Received: by mail-lj1-x240.google.com with SMTP id y24sf4237055ljc.19 for <incoming@patchwork.ozlabs.org>; Wed, 15 Jan 2020 07:11:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1579101103; cv=pass; d=google.com; s=arc-20160816; b=E84Z+T6D74aZfIe+GsKa00AHb94Gfw4hu8HM1+j6X+sIk52Ho4aBszotJADRPhUr1j uM6xV9VWmKVjRqRTCf5ryUw3nS0aOa7WKyI1sUiABXPkfF1+eRXpdbt2Vpn4frAPG3F+ /vOydBnNJIjOST5/GFoazqOQNh7m9CS4yK2gfQlWk/hqJI6pUsKE0NXwKfsm9DxWVOWz WISMUF6wbNJk/iJamlBLQBp2sPCOcFZgqdcrDsPb0HRAGr20Ncmblt6ay3zjOijOZMN8 mtXUeZWkxVGgaR4tSvQBlbZsq8xYAtntsvOm539Skzrp3J0hAzwqY2ZK/QVtv7aSLQ+H RqoQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:message-id:date:subject:cc:to:from :mime-version:sender:dkim-signature; bh=JVIxkePeCtmiVeqyhzGZnVxa2HUSUfhcjOgW/XCXn2M=; b=xH69sxn3WGk7BVQT7PAtdgOXSgqg8/OwDMCLnez3ay9mUfRwGXCA7snCYQ0rAU7Ewr FZ/oFVszY4nR2bkzrECqk9Nu+wOir4JLUawcsc5/sp3c9joMbBq+Ly9Pwo01RC9WPaTy 6zrhfE+PS60UXwxzumMk7E4XbvXB3wbQTpHNDLbwYvKM87rN7mxyafDkC0EhwR7cYH8h BKvUiIePx/lQ+vxDRO361Bwphafhr0H8fKQwDPJVbE+NA6wZWNKKkHFDMgbrYuy+wDRt lNhwlnNJDLh9dM/H1Dy6ZHRweP+ian8xDQRyIfjei9D/9C3LjH/LHmAn+Hwy/yIenfo2 cRuw== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:mime-version:from:to:cc:subject:date:message-id :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=JVIxkePeCtmiVeqyhzGZnVxa2HUSUfhcjOgW/XCXn2M=; b=b9RHset4ya4oOKXmDIfeL4l+1LOxnQ5TLmLFLavQgoezoaeFXNzwritV0i2sFuDAMH AIgw7UFDYKb2yMp4akKSTeUnTmwc4eBJmethWigtsgeuk/XP8EOzmYzU+NVt0EPerz4s 5QUcofUmfBs4rIqcgEsLyy/WnLc+A6rc0I/yj1dyy2K527AK9XwzQ7kofd9NoldoktD2 x+CzVRrneqW6mjGySRg97pr27LdFgc1QFL5a4PxjelPOZ2YWSCBpqpgmj2Ceb8i5DVWB wr5YzWMM2/6UgD6ebbqLYQTR4JNbflVrk3fAUOCbUwLSK0ZvZekG8gC6vltX9e8BWimw RVfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:mime-version:from:to:cc:subject:date :message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=JVIxkePeCtmiVeqyhzGZnVxa2HUSUfhcjOgW/XCXn2M=; b=CdNfvO2BF5xeWY61HJpxnG65Y2t/jJOit4g5ywXNrguI/uj7sN4R+BH+T7afee93YE ZdldFfQd9PAR9Ly1TvoebzTmKRgM7wM54i0Dp3Y3PRN+yLSR9vmB8PN4njW2wPBCQiuP 4FnRqc9NRXDIRreU1HI1A2EZzfyIqHLEY3SATB9uteUz1hdk9fDzzhTbcK2WzhTjLvBQ OdP7jJPtLcAf3ObbkVL71WS+DKV++tK3bH5D66Tu1e0CwapPF9RvjRTG9zqQ11LowDVT qOHCK1NcXeINryyGWUz0qw106RZGIxk36aJkirgYMr7uSTzTbUARYJtpklRe/XZ7Asg8 k7YA== Sender: swupdate@googlegroups.com X-Gm-Message-State: APjAAAWpOeHe35xNZUSFGdf++AiVrRJv+5lwQ4TtpZmQrvz0tV2hJO/w GsI1RKA9+tE4Ikw6FN1W2Go= X-Google-Smtp-Source: APXvYqyh+IoOxMYBmit5XchZD9SuFrbwIBAAJXCPUhZYIRql2pIR1nwULMwFPtASeF93el0ZikRiMw== X-Received: by 2002:ac2:5f59:: with SMTP id 25mr5049474lfz.193.1579101103362; Wed, 15 Jan 2020 07:11:43 -0800 (PST) MIME-Version: 1.0 X-BeenThere: swupdate@googlegroups.com Received: by 2002:a2e:9709:: with SMTP id r9ls2689072lji.14.gmail; Wed, 15 Jan 2020 07:11:42 -0800 (PST) X-Received: by 2002:a2e:83d5:: with SMTP id s21mr2061801ljh.95.1579101102770; Wed, 15 Jan 2020 07:11:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579101102; cv=none; d=google.com; s=arc-20160816; b=XKMS/3/Q/gn3fSzREjCfPFgX83bKUMEW+tR9kuH3fzhDglA2egpVcyVbrDsfRb0jxe wb+/vIWH1Uwk/5NFkpEt5icK9sP7LiZ3SNH+foQJ93F0Nu+j47gUZn+tP0nRady+B2Fl aewXDYUs6Ks7VNkOoDMp0TXYk4OorlxDomIyhc95FGu3KrNW5Au9EzTbzAxI7QcI4x9z QiSCyzlTb5FaCZS6VsCUnEIqXvurBHeI1DwknUJW2QWXFK7FMQSXZR17/+e6ERt2Sxgt qzxoD6A498l6b4ikdRLTkuF+HOOFc2ZwuB6BOzN77ITChJ9WMy9mv6bcbil/yrOpQOXY h+VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from; bh=d76g7NfeW7eMn5ZAPHTqCSBUWoYCGvnfCFmgP5QqECw=; b=Jp8ehi4T1ZXJtqk7EZ+38CGPlUgs/0T1n61Kx/29IMDnrIVSvM2t1wYKcki18LrhiN UpPH+3UOejxpEKIJkohndyMgAwgdHuF5yIVBcds+f/kdzIDyE2XJeLLW+1CqFTqMsgIY BSBS+CM8RI7pJs9td/kWe3s6mfEu+MNLxwuKwdgCc0MSKNMMsAZPgw690nt8I/MxglFi ncTTg5dg8MfsgOERLUbIJ4CTHYxrgUxQQluIzirTebRJmTHldo99s/cBd/xNU4lZkpfO nUnr2E3l+BJYEYnQenhuoUAL+MfHam0k9f2LMVf/InTf5vv/oOKuNo+PH5vfSSzMvJAR IU3A== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.9]) by gmr-mx.google.com with ESMTPS id z16si696631ljk.0.2020.01.15.07.11.42 for <swupdate@googlegroups.com> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Jan 2020 07:11:42 -0800 (PST) Received-SPF: neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) client-ip=212.18.0.9; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 47yW4t1xThz1qrHw; Wed, 15 Jan 2020 16:11:42 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 47yW4t1jcnz1qtdw; Wed, 15 Jan 2020 16:11:42 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id yUqj-Ck_0iBb; Wed, 15 Jan 2020 16:11:41 +0100 (CET) Received: from babic.homelinux.org (host-88-217-136-221.customer.m-online.net [88.217.136.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Wed, 15 Jan 2020 16:11:41 +0100 (CET) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id A2E154540494; Wed, 15 Jan 2020 16:11:41 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([127.0.0.1]) by localhost (mail.babic.homelinux.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kUQGQoUfZhLF; Wed, 15 Jan 2020 16:11:39 +0100 (CET) Received: from papero.fritz.box (papero.fritz.box [192.168.178.132]) by babic.homelinux.org (Postfix) with ESMTP id F2B6145404A3; Wed, 15 Jan 2020 16:11:38 +0100 (CET) From: Stefano Babic <sbabic@denx.de> To: swupdate@googlegroups.com Cc: Stefano Babic <sbabic@denx.de> Subject: [swupdate] [PATCH] webserver: do not flood with ERROR when IPC ic closed Date: Wed, 15 Jan 2020 16:11:37 +0100 Message-Id: <20200115151137.4434-1-sbabic@denx.de> X-Mailer: git-send-email 2.17.1 X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: <swupdate.googlegroups.com> X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: <https://groups.google.com/group/swupdate/post>, <mailto:swupdate@googlegroups.com> List-Help: <https://groups.google.com/support/>, <mailto:swupdate+help@googlegroups.com> List-Archive: <https://groups.google.com/group/swupdate List-Subscribe: <https://groups.google.com/group/swupdate/subscribe>, <mailto:swupdate+subscribe@googlegroups.com> List-Unsubscribe: <mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>, <https://groups.google.com/group/swupdate/subscribe> |
Series |
webserver: do not flood with ERROR when IPC ic closed
|
expand
|
diff --git a/mongoose/mongoose_interface.c b/mongoose/mongoose_interface.c index 1d95556..55ebad2 100644 --- a/mongoose/mongoose_interface.c +++ b/mongoose/mongoose_interface.c @@ -58,6 +58,7 @@ struct mongoose_options { struct file_upload_state { size_t len; int fd; + bool error_report; /* if set, stop to flood with errors */ }; static bool run_postupdate; @@ -344,7 +345,10 @@ static void upload_handler(struct mg_connection *nc, int ev, void *p) */ if (written != mp->data.len) { if (errno != EAGAIN && errno != EWOULDBLOCK) { - ERROR("Writing to IPC fails due to %s", strerror(errno)); + if (!fus->error_report) { + ERROR("Writing to IPC fails due to %s", strerror(errno)); + fus->error_report = true; + } } usleep(100);
Stop to write ERROR message after the first one. Signed-off-by: Stefano Babic <sbabic@denx.de> --- mongoose/mongoose_interface.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)