Nsd-xfer returning 1 on success?

Hi,

Why is nxd-xfer returning 1 instead of 0 on success?

Paul

These particular lines where last touched 5 years ago, but my guess is
that a way to differentiate between "zone up to date" (0) and "transfer
succeeded" (1) was needed. Since both are not errors (but not both
return the same value), more success return codes are needed.

Do you think it make more sense to switch these two numbers?

Matthijs

Paul Wouters wrote:

I think it would make more sense to switch them. However, I'm not sure
what the effects vs gain will be for the community that has implement
things who would be in for a surprise. I'll leave that up to the nsd
team. But I was quite surprised to find a non-zero return code in the
simple case of using nsd-xfer to obtain a single zone.

Paul

Matthijs Mekking writes:

These particular lines where last touched 5 years ago, but my guess is that a way to differentiate between "zone up to date" (0) and "transfer succeeded" (1) was needed. Since both are not errors (but not both return the same value), more success return codes are needed.

Do you think it make more sense to switch these two numbers?

IMNSHO this is a case where the users' needs do vary, so the default could be to return 0 for all varieties of success, and return extra error-like success codes if a command-line option like --return-different-success-codes is specified.

Awful little problem.

Arnt