Mercurial > emacs
changeset 73657:4b7e3d203c5c
(initialize_sockets): Don't initialize Winsock more than once.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Fri, 03 Nov 2006 16:24:53 +0000 |
parents | 1f2ec9976631 |
children | fbb93ddb037e |
files | lib-src/emacsclient.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lib-src/emacsclient.c Fri Nov 03 15:50:42 2006 +0000 +++ b/lib-src/emacsclient.c Fri Nov 03 16:24:53 2006 +0000 @@ -390,8 +390,11 @@ void initialize_sockets () { + static done = FALSE; WSADATA wsaData; + if (done) return; + /* Initialize the WinSock2 library. */ if (WSAStartup (MAKEWORD (2, 0), &wsaData)) { @@ -400,6 +403,7 @@ } atexit (close_winsock); + done = TRUE; } #endif /* WINDOWSNT */