|
@@ -5,18 +5,17 @@
|
|
|
|
|
|
// Inhalt der KartenServer Klasse aus KartenServer.h
|
|
|
// Konstruktor
|
|
|
-KartenServer::KartenServer( InitDatei *zIni )
|
|
|
+KartenServer::KartenServer( InitDatei* zIni )
|
|
|
: Thread()
|
|
|
{
|
|
|
Network::Start( 100 );
|
|
|
std::cout << "KS: Verbindung mit Datenbank wird hergestellt...\n";
|
|
|
db = new KSDatenbank( zIni );
|
|
|
- klientAnzahl = 0;
|
|
|
klients = new RCArray< KSKlient >();
|
|
|
empfangen = 0;
|
|
|
gesendet = 0;
|
|
|
fehler = new Text();
|
|
|
- ini = dynamic_cast<InitDatei *>( zIni->getThis() );
|
|
|
+ ini = dynamic_cast<InitDatei*>(zIni->getThis());
|
|
|
id = *zIni->zWert( "ServerId" );
|
|
|
server = new Server();
|
|
|
aServer = new SSLServer();
|
|
@@ -39,7 +38,7 @@ KartenServer::KartenServer( InitDatei *zIni )
|
|
|
serverStarten();
|
|
|
serverFortsetzen();
|
|
|
}
|
|
|
- updater = new Updater( dynamic_cast<KartenServer *>( getThis() ) );
|
|
|
+ updater = new Updater( dynamic_cast<KartenServer*>(getThis()) );
|
|
|
}
|
|
|
|
|
|
// Destruktor
|
|
@@ -63,18 +62,18 @@ void KartenServer::runn()
|
|
|
{
|
|
|
while( !end && aServer->isConnected() )
|
|
|
{
|
|
|
- SSLSKlient *klient;
|
|
|
+ SSLSKlient* klient;
|
|
|
klient = aServer->getKlient();
|
|
|
if( end && klient )
|
|
|
{
|
|
|
klient->trenne();
|
|
|
- klient = (SSLSKlient *)klient->release();
|
|
|
+ klient = (SSLSKlient*)klient->release();
|
|
|
Sleep( 1000 );
|
|
|
return;
|
|
|
}
|
|
|
if( !klient )
|
|
|
continue;
|
|
|
- KSAKlient *clHandle = new KSAKlient( klient, dynamic_cast<KartenServer *>( getThis() ) );
|
|
|
+ KSAKlient* clHandle = new KSAKlient( klient, dynamic_cast<KartenServer*>(getThis()) );
|
|
|
clHandle->start();
|
|
|
}
|
|
|
}
|
|
@@ -83,15 +82,14 @@ void KartenServer::thread()
|
|
|
{
|
|
|
while( server->isConnected() )
|
|
|
{
|
|
|
- SKlient *klient;
|
|
|
+ SKlient* klient;
|
|
|
klient = server->getKlient();
|
|
|
if( !klient )
|
|
|
continue;
|
|
|
Framework::getThreadRegister()->cleanUpClosedThreads();
|
|
|
- KSKlient *clHandle = new KSKlient( klient, dynamic_cast<KartenServer *>( getThis() ) );
|
|
|
+ KSKlient* clHandle = new KSKlient( klient, dynamic_cast<KartenServer*>(getThis()) );
|
|
|
EnterCriticalSection( &cs );
|
|
|
- klients->set( clHandle, klientAnzahl );
|
|
|
- klientAnzahl++;
|
|
|
+ klients->add( clHandle );
|
|
|
LeaveCriticalSection( &cs );
|
|
|
clHandle->start();
|
|
|
}
|
|
@@ -105,15 +103,14 @@ void KartenServer::close()
|
|
|
warteAufThread( 1000 );
|
|
|
#endif
|
|
|
EnterCriticalSection( &cs );
|
|
|
- for( int i = 0; i < klientAnzahl; i++ )
|
|
|
+ for( int i = 0; i < klients->getEintragAnzahl(); i++ )
|
|
|
klients->z( i )->absturz();
|
|
|
- klients = ( RCArray < KSKlient > * )klients->release();
|
|
|
- klientAnzahl = 0;
|
|
|
+ klients = (RCArray < KSKlient > *)klients->release();
|
|
|
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();
|
|
@@ -211,13 +208,12 @@ bool KartenServer::absturzKlient( int klientId )
|
|
|
{
|
|
|
bool gefunden = 0;
|
|
|
EnterCriticalSection( &cs );
|
|
|
- for( int i = 0; i < klientAnzahl; i++ )
|
|
|
+ for( int i = 0; i < klients->getEintragAnzahl(); i++ )
|
|
|
{
|
|
|
if( klients->z( i )->getKlientNummer() == klientId )
|
|
|
{
|
|
|
klients->z( i )->absturz();
|
|
|
klients->remove( i );
|
|
|
- klientAnzahl--;
|
|
|
gefunden = 1;
|
|
|
break;
|
|
|
}
|
|
@@ -226,16 +222,15 @@ bool KartenServer::absturzKlient( int klientId )
|
|
|
return gefunden;
|
|
|
}
|
|
|
|
|
|
-bool KartenServer::removeKlient( KSKlient *zKlient )
|
|
|
+bool KartenServer::removeKlient( KSKlient* zKlient )
|
|
|
{
|
|
|
bool gefunden = 0;
|
|
|
EnterCriticalSection( &cs );
|
|
|
- for( int i = 0; i < klientAnzahl; i++ )
|
|
|
+ for( int i = 0; i < klients->getEintragAnzahl(); i++ )
|
|
|
{
|
|
|
if( klients->z( i ) == zKlient )
|
|
|
{
|
|
|
klients->remove( i );
|
|
|
- klientAnzahl--;
|
|
|
gefunden = 1;
|
|
|
break;
|
|
|
}
|
|
@@ -270,24 +265,24 @@ bool KartenServer::istAn() const
|
|
|
return db->serverIstNichtPausiert( id );
|
|
|
}
|
|
|
|
|
|
-Server *KartenServer::zServer() const
|
|
|
+Server* KartenServer::zServer() const
|
|
|
{
|
|
|
return server;
|
|
|
}
|
|
|
|
|
|
-KSDatenbank *KartenServer::zDB() const
|
|
|
+KSDatenbank* KartenServer::zDB() const
|
|
|
{
|
|
|
return db;
|
|
|
}
|
|
|
|
|
|
-InitDatei *KartenServer::zIni() const
|
|
|
+InitDatei* KartenServer::zIni() const
|
|
|
{
|
|
|
return ini;
|
|
|
}
|
|
|
|
|
|
bool KartenServer::hatClients() const
|
|
|
{
|
|
|
- return klientAnzahl > 0;
|
|
|
+ return klients->hat( 0 );
|
|
|
}
|
|
|
|
|
|
int KartenServer::getId() const
|
|
@@ -295,7 +290,7 @@ int KartenServer::getId() const
|
|
|
return id;
|
|
|
}
|
|
|
|
|
|
-char *KartenServer::getLetzterFehler() const
|
|
|
+char* KartenServer::getLetzterFehler() const
|
|
|
{
|
|
|
return fehler->getText();
|
|
|
}
|
|
@@ -308,7 +303,7 @@ bool KartenServer::wirdKarteGeupdatet( int id ) const
|
|
|
|
|
|
// Inhalt der KSAKlient Klasse aus KartenServer.h
|
|
|
// Konstruktor
|
|
|
-KSAKlient::KSAKlient( SSLSKlient *klient, KartenServer *ks )
|
|
|
+KSAKlient::KSAKlient( SSLSKlient* klient, KartenServer* ks )
|
|
|
: Thread()
|
|
|
{
|
|
|
this->klient = klient;
|
|
@@ -346,14 +341,14 @@ void KSAKlient::thread()
|
|
|
{
|
|
|
klient->sende( "\1", 1 );
|
|
|
unsigned char nLen = 0;
|
|
|
- klient->getNachricht( (char *)&nLen, 1 );
|
|
|
- char *n = new 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 );
|
|
|
- char *p = new char[ pLen + 1 ];
|
|
|
+ klient->getNachricht( (char*)&pLen, 1 );
|
|
|
+ char* p = new char[ pLen + 1 ];
|
|
|
p[ (int)pLen ] = 0;
|
|
|
if( pLen )
|
|
|
klient->getNachricht( p, pLen );
|
|
@@ -390,7 +385,7 @@ void KSAKlient::thread()
|
|
|
{
|
|
|
if( !ks->serverStarten() )
|
|
|
{
|
|
|
- Text *err = new Text();
|
|
|
+ Text* err = new Text();
|
|
|
err->append( ks->getLetzterFehler() );
|
|
|
errorZuKlient( err->getText() );
|
|
|
err->release();
|
|
@@ -413,7 +408,7 @@ void KSAKlient::thread()
|
|
|
klient->sende( "\1", 1 );
|
|
|
else
|
|
|
{
|
|
|
- Text *err = new Text();
|
|
|
+ Text* err = new Text();
|
|
|
err->append( ks->getLetzterFehler() );
|
|
|
errorZuKlient( err->getText() );
|
|
|
err->release();
|
|
@@ -437,7 +432,7 @@ void KSAKlient::thread()
|
|
|
ok = 1;
|
|
|
else
|
|
|
{
|
|
|
- Text *err = new Text();
|
|
|
+ Text* err = new Text();
|
|
|
err->append( ks->getLetzterFehler() );
|
|
|
errorZuKlient( err->getText() );
|
|
|
err->release();
|
|
@@ -522,7 +517,7 @@ void KSAKlient::thread()
|
|
|
klient->sende( "\1", 1 );
|
|
|
else
|
|
|
{
|
|
|
- Text *err = new Text();
|
|
|
+ Text* err = new Text();
|
|
|
err->append( ks->getLetzterFehler() );
|
|
|
errorZuKlient( err->getText() );
|
|
|
err->release();
|
|
@@ -544,14 +539,14 @@ void KSAKlient::thread()
|
|
|
{
|
|
|
klient->sende( "\1", 1 );
|
|
|
int maxK = 0;
|
|
|
- klient->getNachricht( (char *)&maxK, 4 );
|
|
|
+ klient->getNachricht( (char*)&maxK, 4 );
|
|
|
if( ks->zDB()->adminHatRecht( adminId, Admin_Recht::KSMKChange ) )
|
|
|
{
|
|
|
if( ks->setMaxKarten( maxK ) )
|
|
|
klient->sende( "\1", 1 );
|
|
|
else
|
|
|
{
|
|
|
- Text *err = new Text();
|
|
|
+ Text* err = new Text();
|
|
|
err->append( ks->getLetzterFehler() );
|
|
|
errorZuKlient( err->getText() );
|
|
|
err->release();
|
|
@@ -566,7 +561,7 @@ void KSAKlient::thread()
|
|
|
{
|
|
|
klient->sende( "\1", 1 );
|
|
|
int klientId = 0;
|
|
|
- klient->getNachricht( (char *)&klientId, 4 );
|
|
|
+ klient->getNachricht( (char*)&klientId, 4 );
|
|
|
if( klientId && ks->absturzKlient( klientId ) )
|
|
|
klient->sende( "\1", 1 );
|
|
|
else
|
|
@@ -588,7 +583,7 @@ void KSAKlient::thread()
|
|
|
delete this;
|
|
|
}
|
|
|
|
|
|
-void KSAKlient::errorZuKlient( const char *nachricht ) const // sendet eine Fehlernachricht zum Klient
|
|
|
+void KSAKlient::errorZuKlient( const char* nachricht ) const // sendet eine Fehlernachricht zum Klient
|
|
|
{
|
|
|
klient->sende( "\3", 1 );
|
|
|
char len = (char)textLength( nachricht );
|
|
@@ -599,13 +594,13 @@ void KSAKlient::errorZuKlient( const char *nachricht ) const // sendet eine Fehl
|
|
|
|
|
|
// Inhalt der KSKlient aus KartenServer.h
|
|
|
// Konstruktor
|
|
|
-KSKlient::KSKlient( SKlient *klient, KartenServer *ks )
|
|
|
+KSKlient::KSKlient( SKlient* klient, KartenServer* ks )
|
|
|
: Thread()
|
|
|
{
|
|
|
this->klient = klient;
|
|
|
unsigned char key[ 20 ] = { 24, 15, 53, 87, 38, 73, 154, 38, 246, 90, 39, 133, 11, 199, 22, 80, 26, 132, 95, 54 };
|
|
|
- klient->setSendeKey( (char *)key, 20 );
|
|
|
- klient->setEmpfangKey( (char *)key, 20 );
|
|
|
+ klient->setSendeKey( (char*)key, 20 );
|
|
|
+ klient->setEmpfangKey( (char*)key, 20 );
|
|
|
klientNummer = 0;
|
|
|
this->ks = ks;
|
|
|
}
|
|
@@ -618,13 +613,13 @@ KSKlient::~KSKlient()
|
|
|
}
|
|
|
|
|
|
// privat
|
|
|
-void KSKlient::suchDateien( const char *pf, RCArray< Text > *zDL, const char *rem )
|
|
|
+void KSKlient::suchDateien( const char* pf, RCArray< Text >* zDL, const char* rem )
|
|
|
{
|
|
|
Datei d;
|
|
|
d.setDatei( pf );
|
|
|
if( d.istOrdner() )
|
|
|
{
|
|
|
- RCArray< Text > *list = d.getDateiListe();
|
|
|
+ RCArray< Text >* list = d.getDateiListe();
|
|
|
if( list )
|
|
|
{
|
|
|
int anz = list->getEintragAnzahl();
|
|
@@ -640,7 +635,7 @@ void KSKlient::suchDateien( const char *pf, RCArray< Text > *zDL, const char *re
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- Text *pfad = new Text( pf );
|
|
|
+ Text* pfad = new Text( pf );
|
|
|
pfad->remove( 0, textLength( rem ) );
|
|
|
zDL->add( pfad );
|
|
|
}
|
|
@@ -667,7 +662,7 @@ void KSKlient::thread()
|
|
|
switch( c )
|
|
|
{
|
|
|
case 1: // Klient identifikation
|
|
|
- klient->getNachrichtEncrypted( (char *)&klientNummer, 4 );
|
|
|
+ klient->getNachrichtEncrypted( (char*)&klientNummer, 4 );
|
|
|
if( !ks->zDB()->proveKlient( klientNummer, ks->getId() ) )
|
|
|
{
|
|
|
klientNummer = 0;
|
|
@@ -675,7 +670,7 @@ void KSKlient::thread()
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- Text *key = ks->zDB()->getKlientKey( klientNummer );
|
|
|
+ Text* key = ks->zDB()->getKlientKey( klientNummer );
|
|
|
if( !key )
|
|
|
errorZuKlient( "Es konnte kein Schlüssel ermittelt werden." );
|
|
|
else
|
|
@@ -698,7 +693,7 @@ void KSKlient::thread()
|
|
|
if( 1 )
|
|
|
{
|
|
|
int klientId = 0;
|
|
|
- klient->getNachrichtEncrypted( (char *)&klientId, 4 );
|
|
|
+ klient->getNachrichtEncrypted( (char*)&klientId, 4 );
|
|
|
if( klientId && ks->absturzKlient( klientId ) )
|
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
|
else
|
|
@@ -742,7 +737,7 @@ void KSKlient::thread()
|
|
|
{
|
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
|
int id = 0;
|
|
|
- klient->getNachrichtEncrypted( (char *)&id, 4 );
|
|
|
+ klient->getNachrichtEncrypted( (char*)&id, 4 );
|
|
|
if( !ks->zDB()->proveKarte( id, ks->getId() ) )
|
|
|
{
|
|
|
errorZuKlient( "Die Karte wurde nicht gefunden." );
|
|
@@ -759,16 +754,16 @@ void KSKlient::thread()
|
|
|
pfad += "/";
|
|
|
pfad += id;
|
|
|
pfad += "/client/map";
|
|
|
- RCArray< Text > *dList = new RCArray< Text >();
|
|
|
+ RCArray< Text >* dList = new RCArray< Text >();
|
|
|
suchDateien( pfad, dList, pfad );
|
|
|
int anz = dList->getEintragAnzahl();
|
|
|
- klient->sendeEncrypted( (char *)&anz, 4 );
|
|
|
+ klient->sendeEncrypted( (char*)&anz, 4 );
|
|
|
for( int i = 0; i < anz; i++ )
|
|
|
{
|
|
|
Text pf = dList->z( i )->getText();
|
|
|
unsigned char len = (unsigned char)pf.getLength();
|
|
|
Text dp = pf.getText();
|
|
|
- dp.insert( 0, (char *)pfad );
|
|
|
+ dp.insert( 0, (char*)pfad );
|
|
|
Datei d;
|
|
|
d.setDatei( dp );
|
|
|
if( !len || !d.open( Datei::Style::lesen ) )
|
|
@@ -776,11 +771,11 @@ void KSKlient::thread()
|
|
|
klient->sendeEncrypted( "\0", 1 );
|
|
|
continue;
|
|
|
}
|
|
|
- klient->sendeEncrypted( (char *)&len, 1 );
|
|
|
+ klient->sendeEncrypted( (char*)&len, 1 );
|
|
|
klient->sendeEncrypted( pf, len );
|
|
|
__int64 size = d.getSize();
|
|
|
- klient->sendeEncrypted( (char *)&size, 8 );
|
|
|
- char *buffer = new char[ 2048 ];
|
|
|
+ klient->sendeEncrypted( (char*)&size, 8 );
|
|
|
+ char* buffer = new char[ 2048 ];
|
|
|
while( size )
|
|
|
{
|
|
|
int l = size >= 2048 ? 2048 : (int)size;
|
|
@@ -804,7 +799,7 @@ void KSKlient::thread()
|
|
|
{
|
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
|
int id = 0;
|
|
|
- klient->getNachrichtEncrypted( (char *)&id, 4 );
|
|
|
+ klient->getNachrichtEncrypted( (char*)&id, 4 );
|
|
|
if( !ks->zDB()->proveKarte( id, ks->getId() ) )
|
|
|
{
|
|
|
errorZuKlient( "Die Karte wurde nicht gefunden." );
|
|
@@ -821,25 +816,25 @@ void KSKlient::thread()
|
|
|
pfad += "/";
|
|
|
pfad += id;
|
|
|
pfad += "/server";
|
|
|
- RCArray< Text > *dList = new RCArray< Text >();
|
|
|
+ RCArray< Text >* dList = new RCArray< Text >();
|
|
|
suchDateien( pfad, dList, pfad );
|
|
|
int anz = dList->getEintragAnzahl();
|
|
|
- klient->sendeEncrypted( (char *)&anz, 4 );
|
|
|
+ klient->sendeEncrypted( (char*)&anz, 4 );
|
|
|
for( int i = 0; i < anz; i++ )
|
|
|
{
|
|
|
Text pf = dList->z( i )->getText();
|
|
|
unsigned char len = (unsigned char)pf.getLength();
|
|
|
Text dp = pf.getText();
|
|
|
- dp.insert( 0, (char *)pfad );
|
|
|
+ dp.insert( 0, (char*)pfad );
|
|
|
Datei d;
|
|
|
d.setDatei( dp );
|
|
|
if( !len || !d.open( Datei::Style::lesen ) )
|
|
|
continue;
|
|
|
- klient->sendeEncrypted( (char *)&len, 1 );
|
|
|
+ klient->sendeEncrypted( (char*)&len, 1 );
|
|
|
klient->sendeEncrypted( pf, len );
|
|
|
__int64 size = d.getSize();
|
|
|
- klient->sendeEncrypted( (char *)&size, 8 );
|
|
|
- char *buffer = new char[ 2048 ];
|
|
|
+ klient->sendeEncrypted( (char*)&size, 8 );
|
|
|
+ char* buffer = new char[ 2048 ];
|
|
|
while( size )
|
|
|
{
|
|
|
int l = size >= 2048 ? 2048 : (int)size;
|
|
@@ -863,7 +858,7 @@ void KSKlient::thread()
|
|
|
{
|
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
|
int id = 0;
|
|
|
- klient->getNachrichtEncrypted( (char *)&id, 4 );
|
|
|
+ klient->getNachrichtEncrypted( (char*)&id, 4 );
|
|
|
if( !ks->zDB()->proveKarte( id, ks->getId() ) )
|
|
|
{
|
|
|
errorZuKlient( "Die Karte wurde nicht gefunden." );
|
|
@@ -886,8 +881,8 @@ void KSKlient::thread()
|
|
|
else
|
|
|
errorZuKlient( "Fehler beim lesen der Datei." );
|
|
|
__int64 size = d.getSize();
|
|
|
- klient->sendeEncrypted( (char *)&size, 8 );
|
|
|
- char *buffer = new char[ 2048 ];
|
|
|
+ klient->sendeEncrypted( (char*)&size, 8 );
|
|
|
+ char* buffer = new char[ 2048 ];
|
|
|
while( size )
|
|
|
{
|
|
|
int l = size >= 2048 ? 2048 : (int)size;
|
|
@@ -909,7 +904,7 @@ void KSKlient::thread()
|
|
|
{
|
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
|
int id = 0;
|
|
|
- klient->getNachrichtEncrypted( (char *)&id, 4 );
|
|
|
+ klient->getNachrichtEncrypted( (char*)&id, 4 );
|
|
|
if( !ks->zDB()->proveKarte( id, ks->getId() ) )
|
|
|
{
|
|
|
errorZuKlient( "Die Karte wurde nicht gefunden." );
|
|
@@ -932,8 +927,8 @@ void KSKlient::thread()
|
|
|
else
|
|
|
errorZuKlient( "Fehler beim lesen der Datei." );
|
|
|
__int64 size = d.getSize();
|
|
|
- klient->sendeEncrypted( (char *)&size, 8 );
|
|
|
- char *buffer = new char[ 2048 ];
|
|
|
+ klient->sendeEncrypted( (char*)&size, 8 );
|
|
|
+ char* buffer = new char[ 2048 ];
|
|
|
while( size )
|
|
|
{
|
|
|
int l = size >= 2048 ? 2048 : (int)size;
|
|
@@ -955,7 +950,7 @@ void KSKlient::thread()
|
|
|
{
|
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
|
int id = 0;
|
|
|
- klient->getNachrichtEncrypted( (char *)&id, 4 );
|
|
|
+ klient->getNachrichtEncrypted( (char*)&id, 4 );
|
|
|
if( !ks->zDB()->proveKarte( id, ks->getId() ) )
|
|
|
{
|
|
|
errorZuKlient( "Die Karte wurde nicht gefunden." );
|
|
@@ -978,8 +973,8 @@ void KSKlient::thread()
|
|
|
else
|
|
|
errorZuKlient( "Fehler beim lesen der Datei." );
|
|
|
__int64 size = d.getSize();
|
|
|
- klient->sendeEncrypted( (char *)&size, 8 );
|
|
|
- char *buffer = new char[ 2048 ];
|
|
|
+ klient->sendeEncrypted( (char*)&size, 8 );
|
|
|
+ char* buffer = new char[ 2048 ];
|
|
|
while( size )
|
|
|
{
|
|
|
int l = size >= 2048 ? 2048 : (int)size;
|
|
@@ -1001,7 +996,7 @@ void KSKlient::thread()
|
|
|
{
|
|
|
klient->sendeEncrypted( "\1", 1 );
|
|
|
int id = 0;
|
|
|
- klient->getNachrichtEncrypted( (char *)&id, 4 );
|
|
|
+ klient->getNachrichtEncrypted( (char*)&id, 4 );
|
|
|
if( !ks->zDB()->proveKarte( id, ks->getId() ) )
|
|
|
{
|
|
|
errorZuKlient( "Die Karte wurde nicht gefunden." );
|
|
@@ -1024,8 +1019,8 @@ void KSKlient::thread()
|
|
|
else
|
|
|
errorZuKlient( "Fehler beim lesen der Datei." );
|
|
|
__int64 size = d.getSize();
|
|
|
- klient->sendeEncrypted( (char *)&size, 8 );
|
|
|
- char *buffer = new char[ 2048 ];
|
|
|
+ klient->sendeEncrypted( (char*)&size, 8 );
|
|
|
+ char* buffer = new char[ 2048 ];
|
|
|
while( size )
|
|
|
{
|
|
|
int l = size >= 2048 ? 2048 : (int)size;
|
|
@@ -1053,7 +1048,7 @@ void KSKlient::thread()
|
|
|
}
|
|
|
|
|
|
// constant
|
|
|
-void KSKlient::errorZuKlient( const char *nachricht ) const // sendet eine Fehlernachricht zum Klient
|
|
|
+void KSKlient::errorZuKlient( const char* nachricht ) const // sendet eine Fehlernachricht zum Klient
|
|
|
{
|
|
|
klient->sendeEncrypted( "\3", 1 );
|
|
|
char len = (char)textLength( nachricht );
|