On Tue, Mar 05, 2013 at 09:57:36AM +0100, Sumit Bose wrote:
On Tue, Mar 05, 2013 at 12:20:12AM +0100, Jakub Hrozek wrote:
> I don't think there is a reason to ignore error codes while storing
> subdomains.
I see it the other way round, there is no reason to return an error if
storing a subdomain fails, because we cannot do anything about it. If an
error is returned here, the operation which triggered to subdomain
lookup, e.g. getpwnam() with a fully qualified name, will fail. But the
needed subdomain for this request might already be stored by a previous
sysdb_subdomain_store() call, so if we return EOK the request might
finish successfully.
For this reasons I prefer to ignore the error. But if you think it would
be better that the original request fails so that the error is not
unnoticed I wouldn't be against it.
bye,
Sumit
Hm, you're probably right. I would still prefer to at least report an
error with a DEBUG message and then return EOK or explicitly ignore the
return code in the caller. But I think the code has to explicitly say
that the error is being ignored on purpose, otherwise it's confusing.
Thank you for the review, I will prepare another patch.