diff --git a/daemon/remote.c b/daemon/remote.c index 74c5d4262..94613c5b0 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -233,6 +233,12 @@ add_open(char* ip, int nr, struct listen_port** list, int noproto_is_err) hints.ai_socktype = SOCK_STREAM; hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST; if((r = getaddrinfo(ip, port, &hints, &res)) != 0 || !res) { +#ifdef USE_WINSOCK + if(!noproto_is_err && r == EAI_NONAME) { + /* tried to lookup the address as name */ + return 1; /* return success, but do nothing */ + } +#endif /* USE_WINSOCK */ log_err("control interface %s:%s getaddrinfo: %s %s", ip?ip:"default", port, gai_strerror(r), #ifdef EAI_SYSTEM @@ -1207,6 +1213,11 @@ handle_req(struct daemon_remote* rc, struct rc_state* s, SSL* ssl) int r; char magic[5]; char buf[1024]; +#ifdef USE_WINSOCK + /* makes it possible to set the socket blocking again. */ + /* basically removes it from winsock_event ... */ + WSAEventSelect(s->c->fd, NULL, 0); +#endif fd_set_block(s->c->fd); /* try to read magic UBCT string */ diff --git a/doc/Changelog b/doc/Changelog index 5fed53902..c32a9c387 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,6 +1,9 @@ 21 October 2008: Wouter - fix update-anchors.sh, so it does not report different RR order as an update. Sorts the keys in the file. Updated copyright. + - fixup testbound on windows, the command control pipe doesn't exist. + - skip 08hostlib test on windows, no fork() available. + - made unbound-remote work on windows. 20 October 2008: Wouter - quench a log message that is debug only. diff --git a/testdata/08-host-lib.tpkg b/testdata/08-host-lib.tpkg index b41384315..b5a6628cf 100644 Binary files a/testdata/08-host-lib.tpkg and b/testdata/08-host-lib.tpkg differ diff --git a/testdata/09-unbound-control.tpkg b/testdata/09-unbound-control.tpkg index 17278312f..b45828ed8 100644 Binary files a/testdata/09-unbound-control.tpkg and b/testdata/09-unbound-control.tpkg differ diff --git a/util/tube.c b/util/tube.c index 3b430d7b4..74fe936f1 100644 --- a/util/tube.c +++ b/util/tube.c @@ -647,6 +647,8 @@ int tube_setup_bg_listen(struct tube* tube, struct comm_base* base, { tube->listen_cb = cb; tube->listen_arg = arg; + if(!comm_base_internal(base)) + return 1; /* ignore when no comm base - testing */ return winsock_register_wsaevent(comm_base_internal(base), &tube->ev_listen, tube->event, &tube_handle_signal, tube); }