summaryrefslogtreecommitdiff
authorandyq <andyq>2002-12-13 13:49:02 (UTC)
committer andyq <andyq>2002-12-13 13:49:02 (UTC)
commit8b1c25e608e7255199dc97ad8269ac66d40beede (patch) (unidiff)
treef17e7e897e1f872e035c004af8479430c45bc640
parent9b65e55ce70837695b319ef7049674e9c3daba98 (diff)
downloadopie-8b1c25e608e7255199dc97ad8269ac66d40beede.zip
opie-8b1c25e608e7255199dc97ad8269ac66d40beede.tar.gz
opie-8b1c25e608e7255199dc97ad8269ac66d40beede.tar.bz2
Only enable the username and password if one of the proxies is enabled
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/datamgr.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/settings/aqpkg/datamgr.cpp b/noncore/settings/aqpkg/datamgr.cpp
index 3933a22..0159a79 100644
--- a/noncore/settings/aqpkg/datamgr.cpp
+++ b/noncore/settings/aqpkg/datamgr.cpp
@@ -221,55 +221,55 @@ void DataManager :: writeOutIpkgConf()
221 } 221 }
222 222
223 out << endl; 223 out << endl;
224 224
225 // Write out destinations 225 // Write out destinations
226 vector<Destination>::iterator it2 = destList.begin(); 226 vector<Destination>::iterator it2 = destList.begin();
227 while ( it2 != destList.end() ) 227 while ( it2 != destList.end() )
228 { 228 {
229 out << "dest " << it2->getDestinationName() << " " << it2->getDestinationPath() << endl; 229 out << "dest " << it2->getDestinationName() << " " << it2->getDestinationPath() << endl;
230 it2++; 230 it2++;
231 } 231 }
232 232
233 out << endl; 233 out << endl;
234 out << "# Proxy Support" << endl; 234 out << "# Proxy Support" << endl;
235 235
236 if ( !httpProxyEnabled && httpProxy == "" ) 236 if ( !httpProxyEnabled && httpProxy == "" )
237 out << "#option http_proxy http://proxy.tld:3128" << endl; 237 out << "#option http_proxy http://proxy.tld:3128" << endl;
238 else 238 else
239 { 239 {
240 if ( !httpProxyEnabled ) 240 if ( !httpProxyEnabled )
241 out << "#"; 241 out << "#";
242 out << "option http_proxy " << httpProxy << endl; 242 out << "option http_proxy " << httpProxy << endl;
243 } 243 }
244 244
245 if ( !ftpProxyEnabled && ftpProxy == "" ) 245 if ( !ftpProxyEnabled && ftpProxy == "" )
246 out << "#option ftp_proxy http://proxy.tld:3128" << endl; 246 out << "#option ftp_proxy http://proxy.tld:3128" << endl;
247 else 247 else
248 { 248 {
249 if ( !ftpProxyEnabled ) 249 if ( !ftpProxyEnabled )
250 out << "#"; 250 out << "#";
251 out << "option ftp_proxy " << ftpProxy << endl; 251 out << "option ftp_proxy " << ftpProxy << endl;
252 } 252 }
253 if ( proxyUsername == "" ) 253 if ( proxyUsername == "" || (!httpProxyEnabled && !ftpProxyEnabled) )
254 out << "#option proxy_username <username>" << endl; 254 out << "#option proxy_username <username>" << endl;
255 else 255 else
256 out << "option proxy_username " << proxyUsername << endl; 256 out << "option proxy_username " << proxyUsername << endl;
257 if ( proxyPassword == "" ) 257 if ( proxyPassword == "" || (!httpProxyEnabled && !ftpProxyEnabled) )
258 out << "#option proxy_password <password>" << endl << endl; 258 out << "#option proxy_password <password>" << endl << endl;
259 else 259 else
260 out << "option proxy_password " << proxyPassword << endl<< endl; 260 out << "option proxy_password " << proxyPassword << endl<< endl;
261 261
262 out << "# Offline mode (for use in constructing flash images offline)" << endl; 262 out << "# Offline mode (for use in constructing flash images offline)" << endl;
263 out << "#option offline_root target" << endl; 263 out << "#option offline_root target" << endl;
264 264
265 265
266 out.close(); 266 out.close();
267} 267}
268 268
269 269
270void DataManager :: setAvailableCategories( QString section ) 270void DataManager :: setAvailableCategories( QString section )
271{ 271{
272 section = section.lower(); 272 section = section.lower();
273 if ( availableCategories.find( "#" + section + "#" ) == -1 ) 273 if ( availableCategories.find( "#" + section + "#" ) == -1 )
274 availableCategories += section + "#"; 274 availableCategories += section + "#";
275} 275}