167 dav_hash_final(sha256, hash); |
167 dav_hash_final(sha256, hash); |
168 xattr->hash = util_hexstr(hash, DAV_SHA256_DIGEST_LENGTH); |
168 xattr->hash = util_hexstr(hash, DAV_SHA256_DIGEST_LENGTH); |
169 |
169 |
170 free(attributes); |
170 free(attributes); |
171 |
171 |
172 return xattr; |
172 if(nattr > 0) { |
|
173 return xattr; |
|
174 } else { |
|
175 xattributes_free(xattr); |
|
176 return NULL; |
|
177 } |
173 } |
178 } |
174 |
179 |
175 int resource_set_xattr(DavResource *res, XAttributes *xattr) { |
180 int resource_set_xattr(DavResource *res, XAttributes *xattr) { |
176 if(!xattr || xattr->nattr == 0) { |
181 if(!xattr || xattr->nattr == 0) { |
177 return 0; |
182 return 0; |