From kde-commits Sat Jul 10 20:46:40 2004 From: Matthias Ettrich Date: Sat, 10 Jul 2004 20:46:40 +0000 To: kde-commits Subject: kdelibs/dcop Message-Id: <20040710204640.06D3D16B1B () office ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=108949241002812 CVS commit by ettrich: recommit the part of the previous patch that did not change the dummy major opcode (that's the part that fixes a mem leak) M +3 -41 dcopserver.cpp 1.170 --- kdelibs/dcop/dcopserver.cpp #1.169:1.170 @@ -881,28 +881,5 @@ static const IcePoVersionRec DUMMYVersio }; -typedef struct DCOPServerConnStruct *DCOPServerConn; - -struct DCOPServerConnStruct -{ - /* - * We use ICE to esablish a connection with the client. - */ - - IceConn iceConn; - - - /* - * Major and minor versions of the XSMP. - */ - - int proto_major_version; - int proto_minor_version; - - - QCString clientId; -}; - - -static Status DCOPServerProtocolSetupProc ( IceConn iceConn, +static Status DCOPServerProtocolSetupProc ( IceConn /*iceConn*/, int majorVersion, int minorVersion, char* vendor, char* release, @@ -910,6 +887,4 @@ static Status DCOPServerProtocolSetupPro char **/*failureReasonRet*/) { - DCOPServerConn serverConn; - /* * vendor/release are undefined for ProtocolSetup in DCOP @@ -921,20 +896,7 @@ static Status DCOPServerProtocolSetupPro free (release); + *clientDataRet = 0; - /* - * Allocate new DCOPServerConn. - */ - - serverConn = new DCOPServerConnStruct; - - serverConn->iceConn = iceConn; - serverConn->proto_major_version = majorVersion; - serverConn->proto_minor_version = minorVersion; - //serverConn->clientId already initialized - - *clientDataRet = static_cast(serverConn); - - - return 1; + return (majorVersion == DCOPVersionMajor && minorVersion == DCOPVersionMinor); }