chiark
/
gitweb
/
~mdw
/
adns
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
adnshost compiles again, and submits.
[adns]
/
client
/
adh-query.c
diff --git
a/client/adh-query.c
b/client/adh-query.c
index fa8577977f7aacb5bf138daf64adb4a56f8ba768..5c023a686a740b22a55593f1b6e816196604f1c4 100644
(file)
--- a/
client/adh-query.c
+++ b/
client/adh-query.c
@@
-26,6
+26,10
@@
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+#include "adnshost.h"
+
+adns_state ads;
+
struct query_node {
struct query_node *next, *back;
struct perqueryflags_remember pqfr;
struct query_node {
struct query_node *next, *back;
struct perqueryflags_remember pqfr;
@@
-33,20
+37,20
@@
struct query_node {
adns_query qu;
};
adns_query qu;
};
-static adns_state ads;
static struct { struct query_node *head, *tail; } outstanding;
static unsigned long idcounter;
static struct { struct query_node *head, *tail; } outstanding;
static unsigned long idcounter;
-
static
void domain_do(const char *domain) {
+void domain_do(const char *domain) {
struct query_node *qun;
char idbuf[20];
struct query_node *qun;
char idbuf[20];
+ int r;
if (!ads) {
if (!ads) {
- if (signal(SIGPIPE,SIG_IGN) == SIG_ERR) sysfail("ignore SIGPIPE");
+ if (signal(SIGPIPE,SIG_IGN) == SIG_ERR) sysfail("ignore SIGPIPE"
,errno
);
r= adns_init(&ads,
adns_if_noautosys|adns_if_nosigpipe |
r= adns_init(&ads,
adns_if_noautosys|adns_if_nosigpipe |
- (ov_env ? 0 : adns_ifnoenv) |
+ (ov_env ? 0 : adns_if
_
noenv) |
ov_verbose,
0);
if (r) sysfail("adns_init",r);
ov_verbose,
0);
if (r) sysfail("adns_init",r);
@@
-62,7
+66,8
@@
static void domain_do(const char *domain) {
qun->id= xstrsave(idbuf);
}
qun->id= xstrsave(idbuf);
}
- r= adns_submit(ads, domain, type,
+ r= adns_submit(ads, domain,
+ ov_type == adns_r_none ? adns_r_addr : ov_type,
(ov_search ? adns_qf_search : 0) |
(ov_tcp ? adns_qf_usevc : 0) |
(ov_pqfr.show_owner ? adns_qf_owner : 0) |
(ov_search ? adns_qf_search : 0) |
(ov_tcp ? adns_qf_usevc : 0) |
(ov_pqfr.show_owner ? adns_qf_owner : 0) |
@@
-74,5
+79,8
@@
static void domain_do(const char *domain) {
&qun->qu);
if (r) sysfail("adns_submit",r);
&qun->qu);
if (r) sysfail("adns_submit",r);
-
D
LIST_LINK_TAIL(outstanding,qun);
+ LIST_LINK_TAIL(outstanding,qun);
}
}
+
+void of_asynch_id(const struct optioninfo *oi, const char *arg) { abort(); }
+void of_cancel_id(const struct optioninfo *oi, const char *arg) { abort(); }