summaryrefslogtreecommitdiff
path: root/protocols/IcqOscarJ/src/icq_direct.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/IcqOscarJ/src/icq_direct.cpp')
-rw-r--r--protocols/IcqOscarJ/src/icq_direct.cpp30
1 files changed, 9 insertions, 21 deletions
diff --git a/protocols/IcqOscarJ/src/icq_direct.cpp b/protocols/IcqOscarJ/src/icq_direct.cpp
index 0369bdd8b9..fb4a57ea66 100644
--- a/protocols/IcqOscarJ/src/icq_direct.cpp
+++ b/protocols/IcqOscarJ/src/icq_direct.cpp
@@ -20,13 +20,8 @@
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// -----------------------------------------------------------------------------
-// DESCRIPTION:
-//
-// Describe me here please...
-//
// -----------------------------------------------------------------------------
+
#include "icqoscar.h"
struct directthreadstartinfo
@@ -52,10 +47,8 @@ void CIcqProto::CloseContactDirectConns(MCONTACT hContact)
{
icq_lock l(directConnListMutex);
- for ( int i = 0; i < directConns.getCount(); i++)
- {
- if (!hContact || directConns[i]->hContact == hContact)
- {
+ for (int i = 0; i < directConns.getCount(); i++) {
+ if (!hContact || directConns[i]->hContact == hContact) {
HANDLE hConnection = directConns[i]->hConnection;
directConns[i]->hConnection = NULL; // do not allow reuse
@@ -481,16 +474,13 @@ void __cdecl CIcqProto::icq_directThread( directthreadstartinfo *dtsi )
}
// End of packet receiving loop
-
NetLib_SafeCloseHandle(&hPacketRecver);
CloseDirectConnection(&dc);
- if (dc.ft)
- {
- if (dc.ft->fileId != -1)
- {
+ if (dc.ft) {
+ if (dc.ft->fileId != -1) {
_close(dc.ft->fileId);
- ProtoBroadcastAck(dc.ft->hContact, ACKTYPE_FILE, dc.ft->dwBytesDone==dc.ft->dwTotalSize ? ACKRESULT_SUCCESS : ACKRESULT_FAILED, dc.ft, 0);
+ ProtoBroadcastAck(dc.ft->hContact, ACKTYPE_FILE, dc.ft->dwBytesDone == dc.ft->dwTotalSize ? ACKRESULT_SUCCESS : ACKRESULT_FAILED, dc.ft, 0);
}
else if (dc.ft->hConnection)
ProtoBroadcastAck(dc.ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, dc.ft, 0);
@@ -500,13 +490,11 @@ void __cdecl CIcqProto::icq_directThread( directthreadstartinfo *dtsi )
}
LBL_Exit:
- { // remove from DC connection list
- icq_lock l(directConnListMutex);
- directConns.remove( &dc );
- }
+ // remove from DC connection list
+ icq_lock l(directConnListMutex);
+ directConns.remove(&dc);
}
-
void CIcqProto::handleDirectPacket(directconnect* dc, PBYTE buf, WORD wLen)
{
if (wLen < 1)