Message ID | 1519581723-24089-1-git-send-email-sbabic@denx.de |
---|---|
State | Accepted |
Headers | show
Return-Path: <swupdate+bncBCXPLOXJ6IKRBIXUZPKAKGQEKCATMAI@googlegroups.com> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:400c:c0c::237; helo=mail-wr0-x237.google.com; envelope-from=swupdate+bncbcxploxj6ikrbixuzpkakgqekcatmai@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.b="RGqUzwzy"; dkim-atps=neutral Received: from mail-wr0-x237.google.com (mail-wr0-x237.google.com [IPv6:2a00:1450:400c:c0c::237]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zqCTd539Vz9s1b for <incoming@patchwork.ozlabs.org>; Mon, 26 Feb 2018 05:02:13 +1100 (AEDT) Received: by mail-wr0-x237.google.com with SMTP id j4sf9489528wrg.11 for <incoming@patchwork.ozlabs.org>; Sun, 25 Feb 2018 10:02:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1519581731; cv=pass; d=google.com; s=arc-20160816; b=LZTwer5hmyyHfknboRR7Sdrz50O6s+Nt1rGjLywJXCQi/MkBAVnGLh818ptix0aUTk ZrnrbEMOjQhl0912sRQ6q4n2aHvBBwSACojqBHumBADshBAXGxUyCqtlcGCs8h9erjQP CLWxguFtKrj31KTMG4GXMsPRXgBF9u00Tz3gdNvQ/z3CmgN4SVywQ9VPSTzUTa1Kc8X1 duhoK/JuKDgjGJcO0sMm1a86FUYf80mps01OxejVkNAttEf+FagFGX0rkpKmGwddQ60Y n0cPFBqalnqro/flFVLEBo6mCUQ45R1Xy0n3clnrdDOEm+eMpsJlTePwbAFxKKxhRsoX Or9w== 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 :arc-authentication-results:arc-message-signature:mime-version :sender:dkim-signature:arc-authentication-results; bh=mERVrBvZWhuBQA+OoWGUdTRvL8VRCkDFghl7XAjaCq0=; b=KDLlArgWtoXhUymysVTRyNJY2R/hTEaKrO+f/Fdnj7yUBV1S4o1iseFGqQwjGuSnb1 AxykSVev/RPC4iJr2jfu+Hm8ziOJgwRJxtYxgawtvLOfA3fs8It7T1gAYYCg/MsgInKO s25xLY4NjehqG/5+YeNszzwGq8XUZa/IwINi3DzxCegBTZIuvVYCBv65KYsfWqfv0McA v41ccTk2Q7tWtK7aI0xC2R7NIINAs8/b4hsVaG7ZC1RMDh7WTPGhG5wWb778u/j2jq6e 7iVHfWY2ZaKvAj3A0vS/J8j3AELgqsR7xNdiltRKR54ymrdhiqKVfyhTC9fL+1E+QoIG C2oQ== 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=mERVrBvZWhuBQA+OoWGUdTRvL8VRCkDFghl7XAjaCq0=; b=RGqUzwzyqb+XkFYMwwd3UjY3qE+Ck4Ai+owB3/GjZurOdQKxKvD2y+3oHd+6P/tQgQ fnyACrHDsXhgn+cOyzuCroMRSoLGh52Kj0EveePEjhfuMxFuBGfHMpUdhl+gaSg8mZPs f7qOs/DNYo6pdOdBhFlex3TWcr00X/U61aoMPKpmt0Dwq006lNMAJIykrB7IZJ+1Jv9b ANeHaynW0Hl+wRVwtUHx60vWjZIDf2E9kw/sYQkZcl2wEnQ0PVF9hZFcmlcFJEeizSim pRZHhKir80+6tdWSTW9f9nhN6oawp93W03ZfTDPI2g+lYgUdEJ3IulFMWU5CYqKgEJCu kh/g== 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=mERVrBvZWhuBQA+OoWGUdTRvL8VRCkDFghl7XAjaCq0=; b=nxU1DiZDo6hkV+X1lKQ0fE+RZtjrkaNI7NSwv+iNLtMO3K0pMQp4NY21L7YeP9pit+ rccZJnPaz/h2LdYpcDA1Ki84eEco0S4dKdJ/TYnyS71/OsVSpHfOFTey/Fs+xgvJC0p5 RhaN/JTM2yLJtqsjvdfwe/ueto4r+pdSVpNw4aFmNUhR0HLyYUkyYxpW1Wzbl9Nl+P9G xLsmrUabYE7fGEhAib2Kf6FfaUhQSJmJ/ZXMXS4Z8nUgoWf1WLSaoV1mHAEyks2HeW2g Z/Xj/zhMUTvc20bqZiGsHw+o4s+YIrteSgM76L+BSZ9pOIswlR0lIA41FNCwHmNtmdGp qvnQ== Sender: swupdate@googlegroups.com X-Gm-Message-State: APf1xPAILjID4yQYGfFetOkHGVHo4AZbZeXq5XTNIjvDMynYGFxtAThI olDRf595R6kmyaNiFG+qVvQ= X-Google-Smtp-Source: AH8x226y2vWYDqaf53vFK/7uoaGmh8yYhkJSr7yLPcIr42qKIkqXaW+2Ytd3pKzkJOLTUxSG7V1eMw== X-Received: by 10.28.40.134 with SMTP id o128mr132891wmo.0.1519581731069; Sun, 25 Feb 2018 10:02:11 -0800 (PST) MIME-Version: 1.0 X-BeenThere: swupdate@googlegroups.com Received: by 10.28.130.70 with SMTP id e67ls505255wmd.11.gmail; Sun, 25 Feb 2018 10:02:10 -0800 (PST) X-Received: by 10.28.184.6 with SMTP id i6mr800663wmf.14.1519581730102; Sun, 25 Feb 2018 10:02:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519581730; cv=none; d=google.com; s=arc-20160816; b=AJBKdP/bXqJcflVnb5XSUDMkqvh+4OYvn0T8YDSuZyoF27PgsbyU8MzFyr63+wEbTb xxZhTEZzJ9Y5ks6qo6C3c+0Kv9E59440Loao2OjMqLZxzt3TEyUc41blOpEQGuDa2I+z geT14TreUQ4eooRaArnVlY+/k1PZgJAD2+MIIdpu7nFixCK83y3NDso3mBXY4qSR+xyW f2vynacJP+9O9rKzs8I9De7GsYz3FqWBG43JlPlxJ1jOkuThBi7Sd2HvbOLFINv2/rv2 ZCfHQhX+d5CuHYYwrVm53juZiNbqhtoIUo9+uoe1NNcuBrnctYPyGQdG6oPxcAZUrQOV Gvgw== 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:arc-authentication-results; bh=lCsopjnJZN7VnqmIclwoOWV3M6rPazepMvk2WHeyKuo=; b=BtFlnFOferXvkXOTnfshbSZ65ucs+q/9gdQ9FT12XKKsyc5dQRuoK5qSH5MBe43tTR ddM3EQr7YAyMV+jL9XDXDANCb09bkUTrRp3ySJZvMwJIhSvXjc2P2AnnFl3KXzqzQeXh jfa9d6Obkc7gHUlQJRj8oUonpOBX2AyVXYKm4u+vXOa+Re9KSbV9puTL6f+hPDABMdLr toddtAGi1m8AdIMUtiRMy9/nsCig99TS9IQX15SUFvim7R4HL0/2T5paGzb8HXSnINgg ea/mF1gdvoWkcZefzG0YTu4H+y38X6dtLGymGQBlqr6rPUuhn006k9F1JfMr/St9vmzK eGiA== 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 a72si314719wme.1.2018.02.25.10.02.10 for <swupdate@googlegroups.com> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 10:02:10 -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 3zqCTY6KCwz1qtdR; Sun, 25 Feb 2018 19:02:09 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 3zqCTY6C0Lz1qqkj; Sun, 25 Feb 2018 19:02:09 +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 KkyXPA-pHeDR; Sun, 25 Feb 2018 19:02:09 +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; Sun, 25 Feb 2018 19:02:09 +0100 (CET) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id E11DB45406FA; Sun, 25 Feb 2018 19:02:08 +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 mJ-Bumak_noh; Sun, 25 Feb 2018 19:02:06 +0100 (CET) Received: from papero.fritz.box (papero.fritz.box [192.168.178.132]) by babic.homelinux.org (Postfix) with ESMTP id 3D6A8454049A; Sun, 25 Feb 2018 19:02:06 +0100 (CET) From: Stefano Babic <sbabic@denx.de> To: swupdate@googlegroups.com Cc: Stefano Babic <sbabic@denx.de> Subject: [swupdate] [PATCH] downloader: fix parsing of configuration file Date: Sun, 25 Feb 2018 19:02:03 +0100 Message-Id: <1519581723-24089-1-git-send-email-sbabic@denx.de> X-Mailer: git-send-email 2.7.4 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 |
downloader: fix parsing of configuration file
|
expand
|
diff --git a/corelib/downloader.c b/corelib/downloader.c index 40a5553..108a6f6 100644 --- a/corelib/downloader.c +++ b/corelib/downloader.c @@ -305,12 +305,12 @@ static int download_settings(void *elem, void __attribute__ ((__unused__)) *dat struct dwl_options *opt = (struct dwl_options *)data; char tmp[128]; - GET_FIELD_STRING(LIBCFG_PARSER, elem, "url", tmp); + GET_FIELD_STRING_RESET(LIBCFG_PARSER, elem, "url", tmp); if (strlen(tmp)) { SETSTRING(opt->url, tmp); } - GET_FIELD_STRING(LIBCFG_PARSER, elem, "authentication", tmp); + GET_FIELD_STRING_RESET(LIBCFG_PARSER, elem, "authentication", tmp); if (strlen(tmp)) { SETSTRING(opt->auth, tmp); } else {
GET_FIELD_STRING_RESET() ensure that the returned string is empty after parsing an entry, else the string contains last parsed element. Signed-off-by: Stefano Babic <sbabic@denx.de> --- corelib/downloader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)