From patchwork Sun May 11 21:30:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 347831 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from userp1040.oracle.com (userp1040.oracle.com [156.151.31.81]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 6D212140087 for ; Mon, 12 May 2014 07:30:13 +1000 (EST) Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s4BLUAZY028564 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 11 May 2014 21:30:11 GMT Received: from oss.oracle.com (oss-external.oracle.com [137.254.96.51]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s4BLU9ae003536 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 11 May 2014 21:30:10 GMT Received: from localhost ([127.0.0.1] helo=oss.oracle.com) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1WjbJx-0004Fe-NP; Sun, 11 May 2014 14:30:09 -0700 Received: from acsinet22.oracle.com ([141.146.126.238]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1WjbJt-0004FN-Lr for fedfs-utils-devel@oss.oracle.com; Sun, 11 May 2014 14:30:05 -0700 Received: from aserp1030.oracle.com (aserp1030.oracle.com [141.146.126.68]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s4BLU5JE015749 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 11 May 2014 21:30:05 GMT Received: from mail-ig0-f182.google.com (mail-ig0-f182.google.com [209.85.213.182]) by aserp1030.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s4BLU4Od027335 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Sun, 11 May 2014 21:30:04 GMT Authentication-Results: aserp1030.oracle.com; dkim=pass reason="2048-bit key" header.d=gmail.com header.i=@gmail.com header.b=s5YHIpaV Received: by mail-ig0-f182.google.com with SMTP id uy17so3090841igb.3 for ; Sun, 11 May 2014 14:30:04 -0700 (PDT) X-Received: by 10.50.143.107 with SMTP id sd11mr36545313igb.39.1399843804285; Sun, 11 May 2014 14:30:04 -0700 (PDT) Received: from seurat.1015granger.net ([2604:8800:100:81fc:20c:29ff:fe44:ec31]) by mx.google.com with ESMTPSA id p11sm16917389igw.2.2014.05.11.14.30.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 May 2014 14:30:03 -0700 (PDT) To: fedfs-utils-devel@oss.oracle.com From: Chuck Lever Date: Sun, 11 May 2014 17:30:02 -0400 Message-ID: <20140511213002.13852.47283.stgit@seurat.1015granger.net> In-Reply-To: <20140511212416.13852.92639.stgit@seurat.1015granger.net> References: <20140511212416.13852.92639.stgit@seurat.1015granger.net> User-Agent: StGit/0.16 MIME-Version: 1.0 X-Flow-Control-Info: class=Pass-to-MM reputation=ipRisk-All ip=209.85.213.182 ct-class=R5 ct-vol1=-97 ct-vol2=8 ct-vol3=7 ct-risk=50 ct-spam1=79 ct-spam2=7 ct-bulk=6 rcpts=1 size=684 X-Sendmail-CM-Score: 0.00% X-Sendmail-CM-Analysis: v=2.1 cv=IYq+Bwaa c=1 sm=1 tr=0 a=5XyxPnPcVxl2z+jysL/WtQ==:117 a=dzsqy3y4QnMA:10 a=LiamB4IsMkYA:10 a=dPGociXpb70A:10 a=IkcTkHD0fZMA:10 a=xqWC_Br6kY4A:10 a=yPCof4ZbAAAA:8 a=Lb1rMZzfAAAA:8 a=1XWaLZrsAAAA:8 a=VNtwAIBVC6Q-SOVta10A:9 a=QEXdDO 2ut3YA:10 a=7DSvI1NPTFQA:10 X-Sendmail-CT-RefID: str=0001.0A090208.536FEBDD.0023, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-Sendmail-CT-Classification: not spam Subject: [fedfs-utils] [PATCH 14/17] libnsdb: nsdb_get_fsn_s() could return FEDFS_OK without setting "fsn" X-BeenThere: fedfs-utils-devel@oss.oracle.com X-Mailman-Version: 2.1.9 Precedence: list Reply-To: fedfs-utils Developers List-Id: fedfs-utils Developers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: fedfs-utils-devel-bounces@oss.oracle.com Errors-To: fedfs-utils-devel-bounces@oss.oracle.com X-Source-IP: acsinet21.oracle.com [141.146.126.237] Fixes: c02e77704bd2f64020001fdbf46134d94d4c716f Signed-off-by: Chuck Lever --- src/libnsdb/fileserver.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libnsdb/fileserver.c b/src/libnsdb/fileserver.c index 087c846..cffea59 100644 --- a/src/libnsdb/fileserver.c +++ b/src/libnsdb/fileserver.c @@ -1589,8 +1589,10 @@ nsdb_get_fsn_s(nsdb_t host, const char *nce, const char *fsn_uuid, if (retval == FEDFS_OK) j++; } - if (j == 0) + if (j == 0) { + retval = FEDFS_ERR_NSDB_NONCE; goto out; + } for (j = 0; nce_list[j] != NULL; j++) { retval = nsdb_get_fsn_find_entry_s(host, nce_list[j],