Diffstat (limited to 'noncore/settings/aqpkg/datamgr.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/aqpkg/datamgr.cpp | 29 |
1 files changed, 11 insertions, 18 deletions
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 | |||
@@ -41,10 +41,9 @@ DataManager::~DataManager() | |||
41 | 41 | ||
42 | Server *DataManager :: getServer( const char *name ) | 42 | vector<Server>::iterator DataManager :: getServer( const char *name ) |
43 | { | 43 | { |
44 | Server *s = 0; | 44 | vector<Server>::iterator it = serverList.begin(); |
45 | vector<Server>::iterator it = serverList.begin(); | 45 | while ( it != serverList.end() ) |
46 | while ( it != serverList.end() && s == 0 ) | ||
47 | { | 46 | { |
48 | if ( it->getServerName() == name ) | 47 | if ( it->getServerName() == name ) |
49 | s = &(*it); | 48 | return it; |
50 | 49 | ||
@@ -53,13 +52,12 @@ Server *DataManager :: getServer( const char *name ) | |||
53 | 52 | ||
54 | return s; | 53 | return serverList.end(); |
55 | } | 54 | } |
56 | 55 | ||
57 | Destination *DataManager :: getDestination( const char *name ) | 56 | vector<Destination>::iterator DataManager :: getDestination( const char *name ) |
58 | { | 57 | { |
59 | Destination *d = 0; | ||
60 | vector<Destination>::iterator it = destList.begin(); | 58 | vector<Destination>::iterator it = destList.begin(); |
61 | while ( it != destList.end() && d == 0 ) | 59 | while ( it != destList.end() ) |
62 | { | 60 | { |
63 | if ( it->getDestinationName() == name ) | 61 | if ( it->getDestinationName() == name ) |
64 | d = &(*it); | 62 | return it; |
65 | 63 | ||
@@ -68,3 +66,3 @@ Destination *DataManager :: getDestination( const char *name ) | |||
68 | 66 | ||
69 | return d; | 67 | return destList.end(); |
70 | } | 68 | } |
@@ -152,7 +150,2 @@ void DataManager :: loadServers() | |||
152 | 150 | ||
153 | cout << "httpProxy = " << httpProxy << endl; | ||
154 | cout << "ftpProxy = " << ftpProxy << endl; | ||
155 | cout << "proxyUsername = " << proxyUsername << endl; | ||
156 | cout << "proxyPassword = " << proxyPassword << endl; | ||
157 | |||
158 | reloadServerData( ); | 151 | reloadServerData( ); |
@@ -173,5 +166,5 @@ void DataManager :: reloadServerData( ) | |||
173 | else if ( it->getServerName() == LOCAL_IPKGS ) | 166 | else if ( it->getServerName() == LOCAL_IPKGS ) |
174 | it->readLocalIpks( getServer( LOCAL_SERVER ) ); | 167 | it->readLocalIpks( &( *getServer( LOCAL_SERVER ) ) ); |
175 | else | 168 | else |
176 | it->readPackageFile( getServer( LOCAL_SERVER ) ); | 169 | it->readPackageFile( &( *getServer( LOCAL_SERVER ) ) ); |
177 | } | 170 | } |