[getdns-users] Transaction Identifier Strangeness
Hollenbeck, Scott
shollenbeck at verisign.com
Mon Apr 27 13:22:24 UTC 2015
I'm seeing some strange transaction identifier behavior when calling getdns_address() and getdns_context_run(). Am I doing something wrong or is this expected behavior?
First, please note that PHP doesn't do unsigned 64-bit integers. I'm using printf to display values. Hopefully the display format I'm using isn't the problem.
I'm passing a NULL to getdns_address(). The API documentation says that "This pointer can be NULL, in which case it is ignored and no value is assigned" and "If the function fails, transaction_id is set to 0".
First question: I don't see anything in the getdns_general_ns() function in general.c that actually sets the value of the transaction identifier to zero on error. Is the documentation correct?
So, I call getdns_address() and the function returns without error. I then call getdns_context_run() to get things going. I have this print statement in the general.c, function priv_getdns_call_user_callback(), just before it calls my callback function:
printf("TransID in getdns: %016llX\n", trans_id);
It produces this: "TransID in getdns: E082EBCE57E01192"
This is the value I see in my callback function.
Second question: is this to be expected if I originally passed NULL to getdns_address()?
Thanks,
Scott
More information about the Users
mailing list