EXPORT void plugin_setup(void) { static int i=0; MARK(); printf("plugin_setup: %d\n", i); host_callback(i); i++; }
/* For builds without ARES/USE_IPV6, create a resolver thread and wait on it. */ static DWORD WINAPI gethostbyname_thread (void *arg) { struct connectdata *conn = (struct connectdata*) arg; struct hostent *he; int rc; WSASetLastError (conn->async.status = NO_DATA); /* pending status */ he = gethostbyname (conn->async.hostname); if (he) { host_callback(conn, ARES_SUCCESS, he); rc = 1; } else { host_callback(conn, (int)WSAGetLastError(), NULL); rc = 0; } TRACE(("Winsock-error %d, addr %s\n", conn->async.status, he ? inet_ntoa(*(struct in_addr*)he->h_addr) : "unknown")); return (rc); /* An implicit ExitThread() here */ }