|
@@ -260,7 +260,12 @@ bool NewsKlient::verbinde()
|
|
|
InitDatei *dat = new InitDatei( "data/optionen.ini" );
|
|
|
dat->laden();
|
|
|
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();
|
|
|
int län = ipT->getLength();
|
|
|
char *msIp = new char[ län + 1 ];
|
|
@@ -277,7 +282,7 @@ bool NewsKlient::verbinde()
|
|
|
Keys::getServerKey( &key, l, Keys::MAIN, Keys::SENDEN );
|
|
|
klient->setEmpfangKey( key, l );
|
|
|
delete[] key;
|
|
|
- if( !klient->verbinde( msPort, msIp ) )
|
|
|
+ if( !klient->verbinde( port, msIp ) )
|
|
|
{
|
|
|
klient = klient->release();
|
|
|
delete[]msIp;
|