Diffstat (limited to 'noncore/settings/aqpkg/datamgr.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/aqpkg/datamgr.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/noncore/settings/aqpkg/datamgr.cpp b/noncore/settings/aqpkg/datamgr.cpp index 089c3e3..f342aff 100644 --- a/noncore/settings/aqpkg/datamgr.cpp +++ b/noncore/settings/aqpkg/datamgr.cpp | |||
@@ -132,32 +132,32 @@ void DataManager :: loadServers() | |||
132 | destList.push_back( d ); | 132 | destList.push_back( d ); |
133 | } | 133 | } |
134 | } | 134 | } |
135 | } | 135 | } |
136 | fclose( fp ); | 136 | fclose( fp ); |
137 | 137 | ||
138 | vector<Server>::iterator it; | 138 | reloadServerData( ); |
139 | for ( it = serverList.begin() ; it != serverList.end() ; ++it ) | ||
140 | reloadServerData( it->getServerName() ); | ||
141 | } | 139 | } |
142 | 140 | ||
143 | void DataManager :: reloadServerData( const char *serverName ) | 141 | void DataManager :: reloadServerData( ) |
144 | { | 142 | { |
145 | Server *s = getServer( serverName ); | 143 | vector<Server>::iterator it = serverList.begin(); |
146 | // Now we've read the config file in we need to read the servers | 144 | for ( it = serverList.begin() ; it != serverList.end() ; ++it ) |
147 | // The local server is a special case. This holds the contents of the | 145 | { |
148 | // status files the number of which depends on how many destinations | 146 | // Now we've read the config file in we need to read the servers |
149 | // we've set up | 147 | // The local server is a special case. This holds the contents of the |
150 | // The other servers files hold the contents of the server package list | 148 | // status files the number of which depends on how many destinations |
151 | if ( s->getServerName() == LOCAL_SERVER ) | 149 | // we've set up |
152 | s->readStatusFile( destList ); | 150 | // The other servers files hold the contents of the server package list |
153 | else if ( s->getServerName() == LOCAL_IPKGS ) | 151 | if ( it->getServerName() == LOCAL_SERVER ) |
154 | s->readLocalIpks( getServer( LOCAL_SERVER ) ); | 152 | it->readStatusFile( destList ); |
155 | else | 153 | else if ( it->getServerName() == LOCAL_IPKGS ) |
156 | s->readPackageFile( getServer( LOCAL_SERVER ) ); | 154 | it->readLocalIpks( getServer( LOCAL_SERVER ) ); |
157 | 155 | else | |
156 | it->readPackageFile( getServer( LOCAL_SERVER ) ); | ||
157 | } | ||
158 | } | 158 | } |
159 | 159 | ||
160 | void DataManager :: writeOutIpkgConf() | 160 | void DataManager :: writeOutIpkgConf() |
161 | { | 161 | { |
162 | QString ipkg_conf = IPKG_CONF; | 162 | QString ipkg_conf = IPKG_CONF; |
163 | ofstream out( ipkg_conf ); | 163 | ofstream out( ipkg_conf ); |