diff options
| author | Tobias Weimer <wishmaster51@googlemail.com> | 2015-03-01 20:50:59 +0000 |
|---|---|---|
| committer | Tobias Weimer <wishmaster51@googlemail.com> | 2015-03-01 20:50:59 +0000 |
| commit | d6331b6e7bbef9facc7e6c8bdc42ed4e7b58668d (patch) | |
| tree | 44032474a6abe389fcc2c5302743c019f95d7074 /protocols/Xfire/src/tools.cpp | |
| parent | cbf1506b70dfa0e5e6a7ef9107b6e0f127d7724e (diff) | |
XFire:
- Major cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@12294 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Xfire/src/tools.cpp')
| -rw-r--r-- | protocols/Xfire/src/tools.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/protocols/Xfire/src/tools.cpp b/protocols/Xfire/src/tools.cpp index 791b1d2be8..7675e55762 100644 --- a/protocols/Xfire/src/tools.cpp +++ b/protocols/Xfire/src/tools.cpp @@ -211,7 +211,7 @@ char* GetLaunchPath(char*launch) if (launch == NULL) return temp; - strcpy(temp, launch); + strncpy(temp, launch, XFIRE_MAX_STATIC_STRING_LEN -1); while (*p != 0 && *f != 0) { @@ -473,7 +473,11 @@ BOOL GetServerIPPort(DWORD pid, char*localaddrr, unsigned long localaddr, char*i for (int I = 0; I < maxuppackets; I++) //maximal 4 packete, das reicht { int msize = recv(s, (char*)&temp, sizeof(mpacket), 0); - if (msize) //empfangen + if (msize == SOCKET_ERROR) + { + XFireLog("recv() error %d", WSAGetLastError()); + } + else if (msize) //empfangen { /*DUMP("Packet empfangen",""); DUMP("Dump Full packet##############",""); @@ -532,10 +536,6 @@ BOOL GetServerIPPort(DWORD pid, char*localaddrr, unsigned long localaddr, char*i }*/ } } - else if (msize == SOCKET_ERROR) - { - XFireLog("recv() error %d", WSAGetLastError()); - } } closesocket(s); //socket zumachn lastip = 0; |
