author | llornkcor <llornkcor> | 2002-07-18 03:11:17 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-07-18 03:11:17 (UTC) |
commit | 7fba4ce72b9201e3a04214c75a1031958090a618 (patch) (unidiff) | |
tree | 77f7ea331fd38707f3c74dc5a67b47940ea36038 | |
parent | 786393948f3cd5f67a48f44a7a40422636f4b46e (diff) | |
download | opie-7fba4ce72b9201e3a04214c75a1031958090a618.zip opie-7fba4ce72b9201e3a04214c75a1031958090a618.tar.gz opie-7fba4ce72b9201e3a04214c75a1031958090a618.tar.bz2 |
attempt for change ip back to hex range from string
-rw-r--r-- | core/launcher/transferserver.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/core/launcher/transferserver.cpp b/core/launcher/transferserver.cpp index a6dab07..ed3e2c6 100644 --- a/core/launcher/transferserver.cpp +++ b/core/launcher/transferserver.cpp | |||
@@ -113,10 +113,12 @@ int SyncAuthentication::isAuthorized(QHostAddress peeraddress) | |||
113 | { | 113 | { |
114 | Config cfg("Security"); | 114 | Config cfg("Security"); |
115 | cfg.setGroup("Sync"); | 115 | cfg.setGroup("Sync"); |
116 | QString allowedstr = cfg.readEntry("auth_peer","192.168.1.0"); | 116 | // QString allowedstr = cfg.readEntry("auth_peer","192.168.1.0"); |
117 | QHostAddress allowed; | 117 | uint auth_peer = cfg.readNumEntry("auth_peer",0xc0a80100); |
118 | allowed.setAddress(allowedstr); | 118 | |
119 | uint auth_peer = allowed.ip4Addr(); | 119 | // QHostAddress allowed; |
120 | // allowed.setAddress(allowedstr); | ||
121 | // uint auth_peer = allowed.ip4Addr(); | ||
120 | uint auth_peer_bits = cfg.readNumEntry("auth_peer_bits",24); | 122 | uint auth_peer_bits = cfg.readNumEntry("auth_peer_bits",24); |
121 | uint mask = auth_peer_bits >= 32 // shifting by 32 is not defined | 123 | uint mask = auth_peer_bits >= 32 // shifting by 32 is not defined |
122 | ? 0xffffffff : (((1<<auth_peer_bits)-1)<<(32-auth_peer_bits)); | 124 | ? 0xffffffff : (((1<<auth_peer_bits)-1)<<(32-auth_peer_bits)); |
@@ -199,7 +201,6 @@ bool SyncAuthentication::checkPassword( const QString& password ) | |||
199 | return FALSE; | 201 | return FALSE; |
200 | } | 202 | } |
201 | 203 | ||
202 | |||
203 | ServerPI::ServerPI( int socket, QObject *parent , const char* name ) | 204 | ServerPI::ServerPI( int socket, QObject *parent , const char* name ) |
204 | : QSocket( parent, name ) , dtp( 0 ), serversocket( 0 ), waitsocket( 0 ) | 205 | : QSocket( parent, name ) , dtp( 0 ), serversocket( 0 ), waitsocket( 0 ) |
205 | { | 206 | { |