mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
use new stack-based lock
This commit is contained in:
parent
a85716e8d5
commit
97323636a9
1 changed files with 2 additions and 0 deletions
|
@ -51,6 +51,7 @@
|
|||
#include "xwrelay.h"
|
||||
#include "cref.h"
|
||||
#include "ctrl.h"
|
||||
#include "mlock.h"
|
||||
|
||||
void
|
||||
logf( const char* format, ... )
|
||||
|
@ -146,6 +147,7 @@ killSocket( int socket, char* why )
|
|||
static void
|
||||
send_with_length( int socket, unsigned char* buf, int bufLen )
|
||||
{
|
||||
SocketWriteLock slock( socket );
|
||||
int ok = 0;
|
||||
unsigned short len = htons( bufLen );
|
||||
ssize_t nSent = send( socket, &len, 2, 0 );
|
||||
|
|
Loading…
Reference in a new issue