svn commit: r207343 - head/sbin/hastd
Pawel Jakub Dawidek
pjd at FreeBSD.org
Wed Apr 28 22:23:30 UTC 2010
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 at 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);
More information about the svn-src-all
mailing list