diff --git a/MSNRedirector/dllmain.cpp b/MSNRedirector/dllmain.cpp index c0415b6..375d99d 100644 --- a/MSNRedirector/dllmain.cpp +++ b/MSNRedirector/dllmain.cpp @@ -17,10 +17,20 @@ INT(WSAAPI * Real_getaddrinfo) (PCSTR pNodeName, PCSTR pServiceName, const ADDRI BOOL ServerNeedsPatching(const char* server) { return ( + /* msn live domains, commonly used */ strcmp(server, "nexus.passport.com") == 0 || strcmp(server, "messenger.hotmail.com") == 0 || strcmp(server, "loginnet.passport.com") == 0 || - strcmp(server, "config.messenger.msn.com") == 0 + strcmp(server, "config.messenger.msn.com") == 0 || + /* msn internal domains, rarely used, common in betas */ + strcmp(server, "nexus.passport-int.com") == 0 || + strcmp(server, "messenger.hotmail-int.com") == 0 || + strcmp(server, "config.messenger.msn-int.com") == 0 /* || */ + /* msn pre-production environment domains, very rarely used */ + /*strcmp(server, "nexus.passport-ppe.com") == 0 || + strcmp(server, "nexus.passporttest.com") == 0 || + strcmp(server, "messenger.hotmail-ppe.com") == 0 || + strcmp(server, "config.messenger.msn-ppe.com") == 0*/ ); } @@ -39,7 +49,8 @@ HINTERNET WINAPI Patched_InternetConnectW(HINTERNET hInternet, LPCWSTR lpszServe } hostent *WSAAPI Patched_gethostbyname(const char* name) { - if (ServerNeedsPatching(name)) { + // somehow things (winmsgr6) can call this with a null pointer and ws2 is fine with it + if (name != NULL && ServerNeedsPatching(name)) { name = MESSENGERSERVICE; } return Real_gethostbyname(name);