From 2185394da06d32a3655e71ec022da202477350e7 Mon Sep 17 00:00:00 2001 From: andyq Date: Thu, 21 Nov 2002 20:16:40 +0000 Subject: Re-applied patch for gcc3.2 --- (limited to 'noncore/settings/aqpkg/datamgr.cpp') diff --git a/noncore/settings/aqpkg/datamgr.cpp b/noncore/settings/aqpkg/datamgr.cpp index e7fb75a..96c28c0 100644 --- a/noncore/settings/aqpkg/datamgr.cpp +++ b/noncore/settings/aqpkg/datamgr.cpp @@ -39,34 +39,32 @@ DataManager::~DataManager() { } -Server *DataManager :: getServer( const char *name ) +vector::iterator DataManager :: getServer( const char *name ) { - Server *s = 0; - vector::iterator it = serverList.begin(); - while ( it != serverList.end() && s == 0 ) + vector::iterator it = serverList.begin(); + while ( it != serverList.end() ) { if ( it->getServerName() == name ) - s = &(*it); + return it; ++it; } - return s; + return serverList.end(); } -Destination *DataManager :: getDestination( const char *name ) +vector::iterator DataManager :: getDestination( const char *name ) { - Destination *d = 0; vector::iterator it = destList.begin(); - while ( it != destList.end() && d == 0 ) + while ( it != destList.end() ) { if ( it->getDestinationName() == name ) - d = &(*it); + return it; ++it; } - return d; + return destList.end(); } void DataManager :: loadServers() @@ -150,11 +148,6 @@ void DataManager :: loadServers() } fclose( fp ); - cout << "httpProxy = " << httpProxy << endl; - cout << "ftpProxy = " << ftpProxy << endl; - cout << "proxyUsername = " << proxyUsername << endl; - cout << "proxyPassword = " << proxyPassword << endl; - reloadServerData( ); } @@ -171,9 +164,9 @@ void DataManager :: reloadServerData( ) if ( it->getServerName() == LOCAL_SERVER ) it->readStatusFile( destList ); else if ( it->getServerName() == LOCAL_IPKGS ) - it->readLocalIpks( getServer( LOCAL_SERVER ) ); + it->readLocalIpks( &( *getServer( LOCAL_SERVER ) ) ); else - it->readPackageFile( getServer( LOCAL_SERVER ) ); + it->readPackageFile( &( *getServer( LOCAL_SERVER ) ) ); } } -- cgit v0.9.0.2