|
@@ -16,7 +16,7 @@ ShopServer::ShopServer( InitDatei *zIni )
|
|
|
empfangen = 0;
|
|
|
gesendet = 0;
|
|
|
fehler = new Text();
|
|
|
- ini = zIni->getThis();
|
|
|
+ ini = dynamic_cast<InitDatei *>( zIni->getThis() );
|
|
|
id = *zIni->zWert( "ServerId" );
|
|
|
server = new Server();
|
|
|
aServer = new SSLServer();
|
|
@@ -33,13 +33,12 @@ ShopServer::ShopServer( InitDatei *zIni )
|
|
|
end = 0;
|
|
|
nichtPausiert = 0;
|
|
|
InitializeCriticalSection( &cs );
|
|
|
- ref = 1;
|
|
|
if( zIni->zWert( "Aktiv" )->istGleich( "TRUE" ) )
|
|
|
{
|
|
|
serverStarten();
|
|
|
serverFortsetzen();
|
|
|
}
|
|
|
- updater = new Updater( (ShopServer *)getThis() );
|
|
|
+ updater = new Updater( dynamic_cast<ShopServer *>( getThis() ) );
|
|
|
}
|
|
|
|
|
|
// Destruktor
|
|
@@ -68,13 +67,13 @@ void ShopServer::runn()
|
|
|
if( end && klient )
|
|
|
{
|
|
|
klient->trenne();
|
|
|
- klient = klient->release();
|
|
|
+ klient = (SSLSKlient *)klient->release();
|
|
|
Sleep( 1000 );
|
|
|
return;
|
|
|
}
|
|
|
if( !klient )
|
|
|
continue;
|
|
|
- ShSAKlient * clHandle = new ShSAKlient( klient, (ShopServer *)getThis() );
|
|
|
+ ShSAKlient *clHandle = new ShSAKlient( klient, dynamic_cast<ShopServer *>( getThis() ) );
|
|
|
clHandle->start();
|
|
|
}
|
|
|
}
|
|
@@ -88,7 +87,7 @@ void ShopServer::thread()
|
|
|
if( !klient )
|
|
|
continue;
|
|
|
Framework::getThreadRegister()->cleanUpClosedThreads();
|
|
|
- ShSKlient * clHandle = new ShSKlient( klient, (ShopServer *)getThis() );
|
|
|
+ ShSKlient *clHandle = new ShSKlient( klient, dynamic_cast<ShopServer *>( getThis() ) );
|
|
|
EnterCriticalSection( &cs );
|
|
|
klients->set( clHandle, klientAnzahl );
|
|
|
klientAnzahl++;
|
|
@@ -107,13 +106,13 @@ void ShopServer::close()
|
|
|
EnterCriticalSection( &cs );
|
|
|
for( int i = 0; i < klientAnzahl; i++ )
|
|
|
klients->z( i )->absturz();
|
|
|
- klients = klients->release();
|
|
|
+ klients = ( RCArray<ShSKlient>* ) klients->release();
|
|
|
klientAnzahl = 0;
|
|
|
LeaveCriticalSection( &cs );
|
|
|
ende();
|
|
|
run = 0;
|
|
|
end = 1;
|
|
|
- Klient * klient = new Klient();
|
|
|
+ Klient *klient = new Klient();
|
|
|
klient->verbinde( aServer->getPort(), "127.0.0.1" );
|
|
|
Sleep( 500 );
|
|
|
aServer->trenne();
|
|
@@ -226,7 +225,7 @@ bool ShopServer::absturzKlient( int klientId )
|
|
|
return gefunden;
|
|
|
}
|
|
|
|
|
|
-bool ShopServer::removeKlient( ShSKlient * zKlient )
|
|
|
+bool ShopServer::removeKlient( ShSKlient *zKlient )
|
|
|
{
|
|
|
bool gefunden = 0;
|
|
|
EnterCriticalSection( &cs );
|
|
@@ -293,7 +292,7 @@ char *ShopServer::getLetzterFehler() const
|
|
|
|
|
|
// Inhalt der ShSAKlient Klasse aus ShopServer.h
|
|
|
// Konstruktor
|
|
|
-ShSAKlient::ShSAKlient( SSLSKlient * klient, ShopServer * shs )
|
|
|
+ShSAKlient::ShSAKlient( SSLSKlient *klient, ShopServer *shs )
|
|
|
: Thread()
|
|
|
{
|
|
|
this->klient = klient;
|
|
@@ -331,13 +330,13 @@ void ShSAKlient::thread()
|
|
|
{
|
|
|
klient->sende( "\1", 1 );
|
|
|
unsigned char nLen = 0;
|
|
|
- klient->getNachricht( (char *)& nLen, 1 );
|
|
|
+ klient->getNachricht( (char *)&nLen, 1 );
|
|
|
char *n = new char[ nLen + 1 ];
|
|
|
n[ (int)nLen ] = 0;
|
|
|
if( nLen )
|
|
|
klient->getNachricht( n, nLen );
|
|
|
unsigned char pLen = 0;
|
|
|
- klient->getNachricht( (char *)& pLen, 1 );
|
|
|
+ klient->getNachricht( (char *)&pLen, 1 );
|
|
|
char *p = new char[ pLen + 1 ];
|
|
|
p[ (int)pLen ] = 0;
|
|
|
if( pLen )
|
|
@@ -433,7 +432,7 @@ void ShSAKlient::thread()
|
|
|
}
|
|
|
else
|
|
|
ok = 1;
|
|
|
- if( ok &&shs->hatClients() )
|
|
|
+ if( ok && shs->hatClients() )
|
|
|
{
|
|
|
errorZuKlient( "Es sind noch Klients Online. Bitte versuche es später erneut." );
|
|
|
break;
|
|
@@ -529,7 +528,7 @@ void ShSAKlient::thread()
|
|
|
{
|
|
|
klient->sende( "\1", 1 );
|
|
|
int maxK = 0;
|
|
|
- klient->getNachricht( (char *)& maxK, 4 );
|
|
|
+ klient->getNachricht( (char *)&maxK, 4 );
|
|
|
if( shs->zDB()->adminHatRecht( adminId, Admin_Recht::ShSMKChange ) )
|
|
|
{
|
|
|
if( shs->setMaxKarten( maxK ) )
|
|
@@ -551,8 +550,8 @@ void ShSAKlient::thread()
|
|
|
{
|
|
|
klient->sende( "\1", 1 );
|
|
|
int klientId = 0;
|
|
|
- klient->getNachricht( (char *)& klientId, 4 );
|
|
|
- if( klientId &&shs->absturzKlient( klientId ) )
|
|
|
+ klient->getNachricht( (char *)&klientId, 4 );
|
|
|
+ if( klientId && shs->absturzKlient( klientId ) )
|
|
|
klient->sende( "\1", 1 );
|
|
|
else
|
|
|
klient->sende( "\0", 1 );
|
|
@@ -584,7 +583,7 @@ void ShSAKlient::errorZuKlient( const char *nachricht ) const // sendet eine Feh
|
|
|
|
|
|
// Inhalt der ShSKlient aus ShopServer.h
|
|
|
// Konstruktor
|
|
|
-ShSKlient::ShSKlient( SKlient * klient, ShopServer * shs )
|
|
|
+ShSKlient::ShSKlient( SKlient *klient, ShopServer *shs )
|
|
|
: Thread()
|
|
|
{
|
|
|
this->klient = klient;
|
|
@@ -623,7 +622,7 @@ void ShSKlient::thread()
|
|
|
switch( c )
|
|
|
{
|
|
|
case 1: // Klient identifikation
|
|
|
- klient->getNachrichtEncrypted( (char *)& klientNummer, 4 );
|
|
|
+ klient->getNachrichtEncrypted( (char *)&klientNummer, 4 );
|
|
|
if( !shs->zDB()->proveKlient( klientNummer, shs->getId() ) )
|
|
|
{
|
|
|
klientNummer = 0;
|
|
@@ -654,8 +653,8 @@ void ShSKlient::thread()
|
|
|
if( 1 )
|
|
|
{
|
|
|
int klientId = 0;
|
|
|
- klient->getNachrichtEncrypted( (char *)& klientId, 4 );
|
|
|
- if( klientId &&shs->absturzKlient( klientId ) )
|
|
|
+ klient->getNachrichtEncrypted( (char *)&klientId, 4 );
|
|
|
+ if( klientId && shs->absturzKlient( klientId ) )
|
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
|
else
|
|
|
klient->sendeEncrypted( "\0", 1 );
|
|
@@ -685,23 +684,23 @@ void ShSKlient::thread()
|
|
|
{
|
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
|
unsigned char len = 0;
|
|
|
- klient->getNachrichtEncrypted( (char *)& len, 1 );
|
|
|
+ klient->getNachrichtEncrypted( (char *)&len, 1 );
|
|
|
char *suche = new char[ len + 1 ];
|
|
|
suche[ (int)len ] = 0;
|
|
|
if( len )
|
|
|
klient->getNachrichtEncrypted( suche, len );
|
|
|
- Array< int > * list = new Array< int >();
|
|
|
+ Array< int > *list = new Array< int >();
|
|
|
if( shs->zDB()->getSpielArtListe( klientNummer, suche, list ) )
|
|
|
{
|
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
|
int anz = list->getEintragAnzahl();
|
|
|
- klient->sendeEncrypted( (char *)& anz, 4 );
|
|
|
+ klient->sendeEncrypted( (char *)&anz, 4 );
|
|
|
if( anz )
|
|
|
{
|
|
|
for( int i = 0; i < anz; i++ )
|
|
|
{
|
|
|
int w = list->get( i );
|
|
|
- klient->sendeEncrypted( (char *)& w, 4 );
|
|
|
+ klient->sendeEncrypted( (char *)&w, 4 );
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -718,7 +717,7 @@ void ShSKlient::thread()
|
|
|
{
|
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
|
int spielId = 0;
|
|
|
- klient->getNachrichtEncrypted( (char *)& spielId, 4 );
|
|
|
+ klient->getNachrichtEncrypted( (char *)&spielId, 4 );
|
|
|
if( !shs->zDB()->proveSpiel( shs->getId(), spielId ) )
|
|
|
{
|
|
|
Text ip = "";
|
|
@@ -728,7 +727,7 @@ void ShSKlient::thread()
|
|
|
else
|
|
|
{
|
|
|
klient->sendeEncrypted( "\2", 1 );
|
|
|
- klient->sendeEncrypted( (char *)& port, 4 );
|
|
|
+ klient->sendeEncrypted( (char *)&port, 4 );
|
|
|
char len = (char)ip.getLength();
|
|
|
klient->sendeEncrypted( &len, 1 );
|
|
|
klient->sendeEncrypted( ip.getText(), len );
|
|
@@ -751,7 +750,7 @@ void ShSKlient::thread()
|
|
|
dat->setDatei( pfad );
|
|
|
dat->open( Datei::Style::lesen );
|
|
|
__int64 gr = dat->getSize();
|
|
|
- klient->sendeEncrypted( (char *)& gr, 8 );
|
|
|
+ klient->sendeEncrypted( (char *)&gr, 8 );
|
|
|
char *bytes = new char[ 2048 ];
|
|
|
while( gr > 0 )
|
|
|
{
|
|
@@ -772,7 +771,7 @@ void ShSKlient::thread()
|
|
|
{
|
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
|
int spielId = 0;
|
|
|
- klient->getNachrichtEncrypted( (char *)& spielId, 4 );
|
|
|
+ klient->getNachrichtEncrypted( (char *)&spielId, 4 );
|
|
|
if( !shs->zDB()->proveSpiel( shs->getId(), spielId ) )
|
|
|
{
|
|
|
Text ip = "";
|
|
@@ -782,7 +781,7 @@ void ShSKlient::thread()
|
|
|
else
|
|
|
{
|
|
|
klient->sendeEncrypted( "\2", 1 );
|
|
|
- klient->sendeEncrypted( (char *)& port, 4 );
|
|
|
+ klient->sendeEncrypted( (char *)&port, 4 );
|
|
|
char len = (char)ip.getLength();
|
|
|
klient->sendeEncrypted( &len, 1 );
|
|
|
klient->sendeEncrypted( ip.getText(), len );
|
|
@@ -814,7 +813,7 @@ void ShSKlient::thread()
|
|
|
i--;
|
|
|
}
|
|
|
}
|
|
|
- klient->sendeEncrypted( (char *)& dAnz, 4 );
|
|
|
+ klient->sendeEncrypted( (char *)&dAnz, 4 );
|
|
|
for( int i = 0; i < dAnz; i++ )
|
|
|
{
|
|
|
Text *pf = new Text( dat->zPfad()->getText() );
|
|
@@ -827,7 +826,7 @@ void ShSKlient::thread()
|
|
|
klient->sendeEncrypted( &nl, 1 );
|
|
|
klient->sendeEncrypted( list->z( i )->getText(), nl );
|
|
|
__int64 gr = d->getSize();
|
|
|
- klient->sendeEncrypted( (char *)& gr, 8 );
|
|
|
+ klient->sendeEncrypted( (char *)&gr, 8 );
|
|
|
char *bytes = new char[ 2048 ];
|
|
|
while( gr > 0 )
|
|
|
{
|
|
@@ -851,9 +850,9 @@ void ShSKlient::thread()
|
|
|
{
|
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
|
int spielId = 0;
|
|
|
- klient->getNachrichtEncrypted( (char *)& spielId, 4 );
|
|
|
+ klient->getNachrichtEncrypted( (char *)&spielId, 4 );
|
|
|
int status = shs->zDB()->getSpielBesitzStatus( klientNummer, spielId );
|
|
|
- klient->sendeEncrypted( (char *)& status, 4 );
|
|
|
+ klient->sendeEncrypted( (char *)&status, 4 );
|
|
|
}
|
|
|
else
|
|
|
errorZuKlient( "Du bist nicht Identifiziert." );
|
|
@@ -863,9 +862,9 @@ void ShSKlient::thread()
|
|
|
{
|
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
|
int spielId = 0;
|
|
|
- klient->getNachrichtEncrypted( (char *)& spielId, 4 );
|
|
|
+ klient->getNachrichtEncrypted( (char *)&spielId, 4 );
|
|
|
int status = shs->zDB()->getSpielTestversionStatus( klientNummer, spielId );
|
|
|
- klient->sendeEncrypted( (char *)& status, 4 );
|
|
|
+ klient->sendeEncrypted( (char *)&status, 4 );
|
|
|
}
|
|
|
else
|
|
|
errorZuKlient( "Du bist nicht Identifiziert." );
|
|
@@ -875,9 +874,9 @@ void ShSKlient::thread()
|
|
|
{
|
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
|
int spielId = 0;
|
|
|
- klient->getNachrichtEncrypted( (char *)& spielId, 4 );
|
|
|
+ klient->getNachrichtEncrypted( (char *)&spielId, 4 );
|
|
|
int status = shs->zDB()->getSpielErwerbbarStatus( klientNummer, spielId );
|
|
|
- klient->sendeEncrypted( (char *)& status, 4 );
|
|
|
+ klient->sendeEncrypted( (char *)&status, 4 );
|
|
|
}
|
|
|
else
|
|
|
errorZuKlient( "Du bist nicht Identifiziert." );
|
|
@@ -887,11 +886,11 @@ void ShSKlient::thread()
|
|
|
{
|
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
|
int spielId = 0;
|
|
|
- klient->getNachrichtEncrypted( (char *)& spielId, 4 );
|
|
|
+ klient->getNachrichtEncrypted( (char *)&spielId, 4 );
|
|
|
char testVersion = 0;
|
|
|
klient->getNachrichtEncrypted( &testVersion, 1 );
|
|
|
int status = shs->zDB()->getSpielPreis( spielId, testVersion == 1 );
|
|
|
- klient->sendeEncrypted( (char *)& status, 4 );
|
|
|
+ klient->sendeEncrypted( (char *)&status, 4 );
|
|
|
}
|
|
|
else
|
|
|
errorZuKlient( "Du bist nicht Identifiziert." );
|
|
@@ -901,7 +900,7 @@ void ShSKlient::thread()
|
|
|
{
|
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
|
int spielId = 0;
|
|
|
- klient->getNachrichtEncrypted( (char *)& spielId, 4 );
|
|
|
+ klient->getNachrichtEncrypted( (char *)&spielId, 4 );
|
|
|
char testVersion = 0;
|
|
|
klient->getNachrichtEncrypted( &testVersion, 1 );
|
|
|
bool ok = shs->zDB()->spielKaufen( klientNummer, spielId, testVersion == 1 );
|
|
@@ -918,25 +917,25 @@ void ShSKlient::thread()
|
|
|
{
|
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
|
int spielId = 0;
|
|
|
- klient->getNachrichtEncrypted( (char *)& spielId, 4 );
|
|
|
+ klient->getNachrichtEncrypted( (char *)&spielId, 4 );
|
|
|
unsigned char len = 0;
|
|
|
- klient->getNachrichtEncrypted( (char *)& len, 1 );
|
|
|
+ klient->getNachrichtEncrypted( (char *)&len, 1 );
|
|
|
char *suche = new char[ len + 1 ];
|
|
|
suche[ (int)len ] = 0;
|
|
|
if( len )
|
|
|
klient->getNachrichtEncrypted( suche, len );
|
|
|
- Array< int > * list = new Array< int >();
|
|
|
+ Array< int > *list = new Array< int >();
|
|
|
if( shs->zDB()->getKarteListe( klientNummer, spielId, suche, list ) )
|
|
|
{
|
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
|
int anz = list->getEintragAnzahl();
|
|
|
- klient->sendeEncrypted( (char *)& anz, 4 );
|
|
|
+ klient->sendeEncrypted( (char *)&anz, 4 );
|
|
|
if( anz )
|
|
|
{
|
|
|
for( int i = 0; i < anz; i++ )
|
|
|
{
|
|
|
int w = list->get( i );
|
|
|
- klient->sendeEncrypted( (char *)& w, 4 );
|
|
|
+ klient->sendeEncrypted( (char *)&w, 4 );
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -953,7 +952,7 @@ void ShSKlient::thread()
|
|
|
{
|
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
|
int karteId = 0;
|
|
|
- klient->getNachrichtEncrypted( (char *)& karteId, 4 );
|
|
|
+ klient->getNachrichtEncrypted( (char *)&karteId, 4 );
|
|
|
if( !shs->zDB()->proveKarte( shs->getId(), karteId ) )
|
|
|
{
|
|
|
Text ip = "";
|
|
@@ -963,7 +962,7 @@ void ShSKlient::thread()
|
|
|
else
|
|
|
{
|
|
|
klient->sendeEncrypted( "\2", 1 );
|
|
|
- klient->sendeEncrypted( (char *)& port, 4 );
|
|
|
+ klient->sendeEncrypted( (char *)&port, 4 );
|
|
|
char len = (char)ip.getLength();
|
|
|
klient->sendeEncrypted( &len, 1 );
|
|
|
klient->sendeEncrypted( ip.getText(), len );
|
|
@@ -986,7 +985,7 @@ void ShSKlient::thread()
|
|
|
dat->setDatei( pfad );
|
|
|
dat->open( Datei::Style::lesen );
|
|
|
__int64 gr = dat->getSize();
|
|
|
- klient->sendeEncrypted( (char *)& gr, 8 );
|
|
|
+ klient->sendeEncrypted( (char *)&gr, 8 );
|
|
|
char *bytes = new char[ 2048 ];
|
|
|
while( gr > 0 )
|
|
|
{
|
|
@@ -1007,7 +1006,7 @@ void ShSKlient::thread()
|
|
|
{
|
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
|
int karteId = 0;
|
|
|
- klient->getNachrichtEncrypted( (char *)& karteId, 4 );
|
|
|
+ klient->getNachrichtEncrypted( (char *)&karteId, 4 );
|
|
|
if( !shs->zDB()->proveKarte( shs->getId(), karteId ) )
|
|
|
{
|
|
|
Text ip = "";
|
|
@@ -1017,7 +1016,7 @@ void ShSKlient::thread()
|
|
|
else
|
|
|
{
|
|
|
klient->sendeEncrypted( "\2", 1 );
|
|
|
- klient->sendeEncrypted( (char *)& port, 4 );
|
|
|
+ klient->sendeEncrypted( (char *)&port, 4 );
|
|
|
char len = (char)ip.getLength();
|
|
|
klient->sendeEncrypted( &len, 1 );
|
|
|
klient->sendeEncrypted( ip.getText(), len );
|
|
@@ -1049,7 +1048,7 @@ void ShSKlient::thread()
|
|
|
i--;
|
|
|
}
|
|
|
}
|
|
|
- klient->sendeEncrypted( (char *)& dAnz, 4 );
|
|
|
+ klient->sendeEncrypted( (char *)&dAnz, 4 );
|
|
|
for( int i = 0; i < dAnz; i++ )
|
|
|
{
|
|
|
Text *pf = new Text( dat->zPfad()->getText() );
|
|
@@ -1062,7 +1061,7 @@ void ShSKlient::thread()
|
|
|
klient->sendeEncrypted( &nl, 1 );
|
|
|
klient->sendeEncrypted( list->z( i )->getText(), nl );
|
|
|
__int64 gr = d->getSize();
|
|
|
- klient->sendeEncrypted( (char *)& gr, 8 );
|
|
|
+ klient->sendeEncrypted( (char *)&gr, 8 );
|
|
|
char *bytes = new char[ 2048 ];
|
|
|
while( gr > 0 )
|
|
|
{
|
|
@@ -1086,9 +1085,9 @@ void ShSKlient::thread()
|
|
|
{
|
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
|
int karteId = 0;
|
|
|
- klient->getNachrichtEncrypted( (char *)& karteId, 4 );
|
|
|
+ klient->getNachrichtEncrypted( (char *)&karteId, 4 );
|
|
|
int status = shs->zDB()->getKarteBesitzStatus( klientNummer, karteId );
|
|
|
- klient->sendeEncrypted( (char *)& status, 4 );
|
|
|
+ klient->sendeEncrypted( (char *)&status, 4 );
|
|
|
}
|
|
|
else
|
|
|
errorZuKlient( "Du bist nicht Identifiziert." );
|
|
@@ -1098,9 +1097,9 @@ void ShSKlient::thread()
|
|
|
{
|
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
|
int karteId = 0;
|
|
|
- klient->getNachrichtEncrypted( (char *)& karteId, 4 );
|
|
|
+ klient->getNachrichtEncrypted( (char *)&karteId, 4 );
|
|
|
int status = shs->zDB()->getKarteTestversionStatus( klientNummer, karteId );
|
|
|
- klient->sendeEncrypted( (char *)& status, 4 );
|
|
|
+ klient->sendeEncrypted( (char *)&status, 4 );
|
|
|
}
|
|
|
else
|
|
|
errorZuKlient( "Du bist nicht Identifiziert." );
|
|
@@ -1110,9 +1109,9 @@ void ShSKlient::thread()
|
|
|
{
|
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
|
int karteId = 0;
|
|
|
- klient->getNachrichtEncrypted( (char *)& karteId, 4 );
|
|
|
+ klient->getNachrichtEncrypted( (char *)&karteId, 4 );
|
|
|
int status = shs->zDB()->getKarteErwerbbarStatus( klientNummer, karteId );
|
|
|
- klient->sendeEncrypted( (char *)& status, 4 );
|
|
|
+ klient->sendeEncrypted( (char *)&status, 4 );
|
|
|
}
|
|
|
else
|
|
|
errorZuKlient( "Du bist nicht Identifiziert." );
|
|
@@ -1122,11 +1121,11 @@ void ShSKlient::thread()
|
|
|
{
|
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
|
int karteId = 0;
|
|
|
- klient->getNachrichtEncrypted( (char *)& karteId, 4 );
|
|
|
+ klient->getNachrichtEncrypted( (char *)&karteId, 4 );
|
|
|
char testVersion = 0;
|
|
|
klient->getNachrichtEncrypted( &testVersion, 1 );
|
|
|
int status = shs->zDB()->getKartePreis( karteId, testVersion == 1 );
|
|
|
- klient->sendeEncrypted( (char *)& status, 4 );
|
|
|
+ klient->sendeEncrypted( (char *)&status, 4 );
|
|
|
}
|
|
|
else
|
|
|
errorZuKlient( "Du bist nicht Identifiziert." );
|
|
@@ -1136,7 +1135,7 @@ void ShSKlient::thread()
|
|
|
{
|
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
|
int karteId = 0;
|
|
|
- klient->getNachrichtEncrypted( (char *)& karteId, 4 );
|
|
|
+ klient->getNachrichtEncrypted( (char *)&karteId, 4 );
|
|
|
char testVersion = 0;
|
|
|
klient->getNachrichtEncrypted( &testVersion, 1 );
|
|
|
bool ok = shs->zDB()->karteKaufen( klientNummer, karteId, testVersion == 1 );
|