[pan2/testing: 62/279] bla
- From: Heinrich MÃller <henmull src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pan2/testing: 62/279] bla
- Date: Sat, 3 Dec 2011 22:28:49 +0000 (UTC)
commit d09ec0326d1504d851e562553e13b65c4ea87000
Author: Heinrich Mueller <sphemuel stud informatik uni-erlangen de>
Date: Fri May 27 20:37:43 2011 +0200
bla
pan/data/file-queue.cc | 15 ++++++++++-----
pan/gui/post-ui.cc | 5 +++--
pan/tasks/task-upload.cc | 46 +++++++++++++++++++++++-----------------------
3 files changed, 36 insertions(+), 30 deletions(-)
---
diff --git a/pan/data/file-queue.cc b/pan/data/file-queue.cc
index 18a4277..872e807 100644
--- a/pan/data/file-queue.cc
+++ b/pan/data/file-queue.cc
@@ -71,13 +71,18 @@ namespace
void
FileQueue :: remove(const articles_v& no)
{
+ std::cerr<<"delete len "<<no.size()<<std::endl;
+
articles_const_it it = no.begin();
- articles_it vit = _articles_v.begin();
- for ( ; it != no.end(); ++it)
- for ( ; vit != _articles_v.end(); ++vit)
- if (vit->filename == it->filename)
+ articles_it vit;
+ for ( ; it != no.end(); ++it) {
+ for ( vit = _articles_v.begin() ; vit != _articles_v.end(); ++vit) {
+ if (vit->filename == it->filename) {
+ std::cerr<<"deleting "<<it->filename<<std::endl;
vit = _articles_v.erase(vit);
-
+ }
+ }
+ }
}
void
diff --git a/pan/gui/post-ui.cc b/pan/gui/post-ui.cc
index 5fa21cd..a8c65ee 100644
--- a/pan/gui/post-ui.cc
+++ b/pan/gui/post-ui.cc
@@ -643,8 +643,9 @@ PostUI :: maybe_post_message (GMimeMessage * message)
*** Make sure the message is OK...
**/
- if (!_file_queue_empty && !check_message (server, message))
- return false;
+ if (_file_queue_empty)
+ if (!check_message (server, message))
+ return false;
/**
*** If this is email only, skip the rest of the posting...
diff --git a/pan/tasks/task-upload.cc b/pan/tasks/task-upload.cc
index 7347d9d..29234b7 100644
--- a/pan/tasks/task-upload.cc
+++ b/pan/tasks/task-upload.cc
@@ -143,37 +143,37 @@ TaskUpload :: on_nntp_done (NNTP * nntp,
const StringView & response)
{
- switch (atoi(response.str))
- {
- case NO_POSTING:
- Log :: add_err(_("Posting failed: No Posts allowed by server."));
- this->stop();
- break;
- case POSTING_FAILED:
- Log :: add_err_va (_("Posting failed: %s"), response.str);
- break;
- case ARTICLE_POSTED_OK:
+// switch (atoi(response.str))
+// {
+// case NO_POSTING:
+// Log :: add_err(_("Posting failed: No Posts allowed by server."));
+// this->stop();
+// break;
+// case POSTING_FAILED:
+// Log :: add_err_va (_("Posting failed: %s"), response.str);
+// break;
+// case ARTICLE_POSTED_OK:
if (_needed.empty())
Log :: add_info_va(_("Posting of file %s succesful: %s"),
_file_data.basename.c_str(), response.str);
else
_needed.pop_front();
- break;
- case TOO_MANY_CONNECTIONS: //todo
- break;
- }
-
- switch (health)
- {
- case OK:
+// break;
+// case TOO_MANY_CONNECTIONS: //todo
+// break;
+// }
+
+// switch (health)
+// {
+// case OK:
check_in (nntp, health);
increment_step(1);
- break;
+// break;
- case ERR_NETWORK:
- _state.set_need_nntp(nntp->_server);
- break;
- }
+// case ERR_NETWORK:
+// _state.set_need_nntp(nntp->_server);
+// break;
+// }
update_work();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]