]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
ported 1.1 to windows.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 21 Oct 2008 13:00:07 +0000 (13:00 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 21 Oct 2008 13:00:07 +0000 (13:00 +0000)
git-svn-id: file:///svn/unbound/trunk@1316 be551aaa-1e26-0410-a405-d3ace91eadb9

daemon/remote.c
doc/Changelog
testdata/08-host-lib.tpkg
testdata/09-unbound-control.tpkg
util/tube.c

index 74c5d4262f9c66d4d2b7ff4e2ce6cb27843ada60..94613c5b0ad3346e2127abbc73d59ff9a600c504 100644 (file)
@@ -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 */
index 5fed53902d97f6d6c7708a4e4df2c73e53c2aafe..c32a9c3876b711c391fbdfba8044ee8474de38c6 100644 (file)
@@ -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.
index b41384315cb10a7f10cfa2f2d7090b8c6a885a95..b5a6628cf6aa57e978e82ee066d50856e009398f 100644 (file)
Binary files a/testdata/08-host-lib.tpkg and b/testdata/08-host-lib.tpkg differ
index 17278312f69d40478190f16bcd6403e6f6aa6b4f..b45828ed8c9b34fbe509a8caa86c60f0e7c35a89 100644 (file)
Binary files a/testdata/09-unbound-control.tpkg and b/testdata/09-unbound-control.tpkg differ
index 3b430d7b410962e67fd3ca49d780c57e6b3930c0..74fe936f1585ef0ee42ff0c8f905d545ca2d3243 100644 (file)
@@ -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);
 }