[jadmin] Re: Jabberd-2.0.11 DNS issues (fwd)

Florian Echtler floe at butterbrot.org
Tue Nov 7 08:28:38 CST 2006


>> That went quicker than I thought, here's the patch - in dns.c, the
>> function _srv_rr had a value argument in a place where only a pointer
>> argument could make sense,
> The function does not return via the argument, so passing structure as
> a value copy or pointer doesn't matter.
> Your patch doesn't really change anything.
I rest my case: it works now, as opposed to before.

Reason: the other two arguments to the _srv_rr function, eom and scan,
are pointers into packet->buf. If you do a value copy, the address of
the entire packet structure changes, so the pointers eom and scan become
meaningless (and dn_expand duly complains). Therefore, pass-by-reference
_does_ make a difference here.

Yours, Florian



More information about the JAdmin mailing list