~jlukas79/+junk/mysql-server

« back to all changes in this revision

Viewing changes to storage/falcon/Socket.cpp

manual merge 6.0-main --> 6.0-bka-review

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
#include <errno.h>
33
33
#include "Log.h"
34
34
 
35
 
#ifdef ENGINE
 
35
#ifdef FALCONDB
36
36
#include "SyncObject.h"
37
37
#include "Sync.h"
38
38
#endif
71
71
 
72
72
static int foo = Socket::initialize();
73
73
 
74
 
#ifdef ENGINE
 
74
#ifdef FALCONDB
75
75
SyncObject      hostSyncObject;
76
76
#endif
77
77
 
121
121
 
122
122
void Socket::bind(int ipAddress, int port)
123
123
{
124
 
#ifdef ENGINE
 
124
#ifdef FALCONDB
125
125
        ASSERT (INADDR_ANY == 0);
126
126
#endif
127
127
        create();
139
139
 
140
140
}
141
141
 
142
 
#ifndef ENGINE
 
142
#ifndef FALCONDB
143
143
Socket* Socket::acceptSocket()
144
144
{
145
145
        struct sockaddr_in      address;
343
343
        address.sin_family = AF_INET;
344
344
        address.sin_port = htons (portNumber);
345
345
 
346
 
#ifdef ENGINE
 
346
#ifdef FALCONDB
347
347
        Sync sync (&hostSyncObject, "Socket::connect");
348
348
#endif
349
349
 
350
350
        if (host)
351
351
                {
352
 
#ifdef ENGINE
 
352
#ifdef FALCONDB
353
353
                sync.lock (Exclusive);
354
354
#endif
355
355
                struct hostent  *hp = gethostbyname (hostname);
608
608
 
609
609
JString Socket::getLocalName()
610
610
{
611
 
#ifdef ENGINE
 
611
#ifdef FALCONDB
612
612
        Sync sync (&hostSyncObject, "Socket::getLocalName");
613
613
        sync.lock (Exclusive);
614
614
#endif
635
635
 
636
636
int32 Socket::translateAddress(const char *hostname)
637
637
{
638
 
#ifdef ENGINE
 
638
#ifdef FALCONDB
639
639
        Sync sync (&hostSyncObject, "Socket::translateAddress");
640
640
        sync.lock (Exclusive);
641
641
#endif