|
@@ -260,7 +260,12 @@ bool NewsKlient::verbinde()
|
|
InitDatei *dat = new InitDatei( "data/optionen.ini" );
|
|
InitDatei *dat = new InitDatei( "data/optionen.ini" );
|
|
dat->laden();
|
|
dat->laden();
|
|
Text *ipT = dat->getWert( "ServerIP" );
|
|
Text *ipT = dat->getWert( "ServerIP" );
|
|
- unsigned short msPort = (unsigned short)TextZuInt( dat->zWert( "ServerPort" )->getText(), 10 );
|
|
|
|
|
|
+ Datei d;
|
|
|
|
+ d.setDatei( "data/tmp/m.port" );
|
|
|
|
+ d.open( Datei::Style::lesen );
|
|
|
|
+ int port = 0;
|
|
|
|
+ d.lese( (char*)&port, 4 );
|
|
|
|
+ d.close();
|
|
dat->release();
|
|
dat->release();
|
|
int län = ipT->getLength();
|
|
int län = ipT->getLength();
|
|
char *msIp = new char[ län + 1 ];
|
|
char *msIp = new char[ län + 1 ];
|
|
@@ -277,7 +282,7 @@ bool NewsKlient::verbinde()
|
|
Keys::getServerKey( &key, l, Keys::MAIN, Keys::SENDEN );
|
|
Keys::getServerKey( &key, l, Keys::MAIN, Keys::SENDEN );
|
|
klient->setEmpfangKey( key, l );
|
|
klient->setEmpfangKey( key, l );
|
|
delete[] key;
|
|
delete[] key;
|
|
- if( !klient->verbinde( msPort, msIp ) )
|
|
|
|
|
|
+ if( !klient->verbinde( port, msIp ) )
|
|
{
|
|
{
|
|
klient = klient->release();
|
|
klient = klient->release();
|
|
delete[]msIp;
|
|
delete[]msIp;
|