Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Apr 2010 22:23:29 +0000 (UTC)
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r207343 - head/sbin/hastd
Message-ID:  <201004282223.o3SMNTQ4074221@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pjd
Date: Wed Apr 28 22:23:29 2010
New Revision: 207343
URL: http://svn.freebsd.org/changeset/base/207343

Log:
  Don't assume that "resource" property is in metadata.
  
  Reported by:	Mikolaj Golub <to.my.trociny@gmail.com>
  MFC after:	3 days

Modified:
  head/sbin/hastd/metadata.c

Modified: head/sbin/hastd/metadata.c
==============================================================================
--- head/sbin/hastd/metadata.c	Wed Apr 28 22:06:22 2010	(r207342)
+++ head/sbin/hastd/metadata.c	Wed Apr 28 22:23:29 2010	(r207343)
@@ -117,7 +117,7 @@ metadata_read(struct hast_resource *res,
 	}
 
 	str = nv_get_string(nv, "resource");
-	if (strcmp(str, res->hr_name) != 0) {
+	if (str != NULL && strcmp(str, res->hr_name) != 0) {
 		pjdlog_error("Provider %s is not part of resource %s.",
 		    res->hr_localpath, res->hr_name);
 		nv_free(nv);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201004282223.o3SMNTQ4074221>