From c0a2f93e8ccdc2f4d03fbc1ec31bd7f22d355a61 Mon Sep 17 00:00:00 2001 From: Alex Borisov Date: Sun, 20 Nov 2011 16:04:24 +0200 Subject: Add upload and delete requests. Docs update --- client/UpdatedConfig.cpp | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'client/UpdatedConfig.cpp') diff --git a/client/UpdatedConfig.cpp b/client/UpdatedConfig.cpp index 04b8a86..e999d7e 100644 --- a/client/UpdatedConfig.cpp +++ b/client/UpdatedConfig.cpp @@ -70,6 +70,14 @@ void UpdatedConfig::update() { client->SendRequest(SslClient::FirewallList); } + else if (! (updateStatus & (1 << SslClient::UploadList))) + { + client->SendRequest(SslClient::UploadList); + } + else if (! (updateStatus & (1 << SslClient::DeleteList))) + { + client->SendRequest(SslClient::DeleteList); + } else { Logger::Warn("Unknown config update status: %x\n", updateStatus); @@ -107,27 +115,30 @@ void UpdatedConfig::gotServerReply(SslClient::RequestType &type, QByteArray &con { case SslClient::Config: ParseConfig(confdata.constData()); - updateStatus |= (1 << type); break; case SslClient::GenericProxyList: ParseGenericProxies(confdata.constData()); - updateStatus |= (1 << type); break; case SslClient::StaticProxyList: ParseStaticPorxies(confdata.constData()); - updateStatus |= (1 << type); break; case SslClient::FirewallList: ParseFirewalls(confdata.constData()); - updateStatus |= (1 << type); + break; + case SslClient::UploadList: + Logger::Debug("UploadList: %s\n", confdata.constData()); + break; + case SslClient::DeleteList: + Logger::Debug("DeleteList: %s\n", confdata.constData()); break; default: Logger::Warn("Unknown reply type: %x\n", type); break; } + updateStatus |= (1 << type); end: - if (updateStatus != 0x1E) + if (updateStatus != 0x7E) { Logger::Trace("Still need to update other config parts. Update status: %x\n", updateStatus); update(); -- cgit v1.2.3