[pan2/testing: 122/279] revert some stuff
- From: Heinrich MÃller <henmull src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pan2/testing: 122/279] revert some stuff
- Date: Sat, 3 Dec 2011 22:32:26 +0000 (UTC)
commit 36a320ebe89a9b7626dcc8b619befe42fbebcb26
Author: Heinrich MÃller <sphemuel stud informatik uni-erlangen de>
Date: Tue Jun 28 11:29:22 2011 +0200
revert some stuff
pan/tasks/task-xover.cc | 92 +++++++++++++++++++++++-----------------------
1 files changed, 46 insertions(+), 46 deletions(-)
---
diff --git a/pan/tasks/task-xover.cc b/pan/tasks/task-xover.cc
index 1cbb2bd..b195c7b 100644
--- a/pan/tasks/task-xover.cc
+++ b/pan/tasks/task-xover.cc
@@ -84,13 +84,13 @@ namespace
}
}
-namespace
-{
- void create_cachename(char* in, size_t len, const char* add)
- {
- g_snprintf(in, len, "%s%c%s",file::get_pan_home().c_str(), G_DIR_SEPARATOR , add);
- }
-}
+//namespace
+//{
+// void create_cachename(char* in, size_t len, const char* add)
+// {
+// g_snprintf(in, len, "%s%c%s",file::get_pan_home().c_str(), G_DIR_SEPARATOR , add);
+// }
+//}
TaskXOver :: TaskXOver (Data & data,
const Quark & group,
@@ -114,9 +114,9 @@ TaskXOver :: TaskXOver (Data & data,
debug ("ctor for " << group);
- char buf[2048];
- create_cachename (buf,sizeof(buf), "headers");
- _headers.open(buf, std::ios::out | std::ios::trunc);
+// char buf[2048];
+// create_cachename (buf,sizeof(buf), "headers");
+// _headers.open(buf, std::ios::out | std::ios::trunc);
// add a ``GROUP'' MiniTask for each server that has this group
// initialize the _high lookup table to boundaries
@@ -246,7 +246,7 @@ TaskXOver :: on_nntp_group (NNTP * nntp,
//std::cerr << LINE_ID << " nothing new here..." << std::endl;
_high[nntp->_server] = high;
}
- _working = _total_minitasks;
+// _working = _total_minitasks;
}
namespace
@@ -289,27 +289,27 @@ namespace
void
TaskXOver :: on_nntp_line (NNTP * nntp,
const StringView & line)
-{
- _headers<<line<<"\r\n";
- increment_step(1);
- ++_lines_so_far;
- _bytes_so_far += line.len;
-
- if (!(_lines_so_far % 500))
- set_status_va (_("%s (%lu Header Lines)"), _short_group_name.c_str(), _lines_so_far);
-
-}
-
-void
-TaskXOver :: on_nntp_line_process (NNTP * nntp,
- const StringView & line)
+//{
+// _headers<<line<<"\r\n";
+// increment_step(1);
+// ++_lines_so_far;
+// _bytes_so_far += line.len;
+//
+// if (!(_lines_so_far % 500))
+// set_status_va (_("%s (%lu Header Lines)"), _short_group_name.c_str(), _lines_so_far);
+//
+//}
+//
+//void
+//TaskXOver :: on_nntp_line_process (NNTP * nntp,
+// const StringView & line)
{
pan_return_if_fail (nntp != 0);
pan_return_if_fail (!nntp->_server.empty());
pan_return_if_fail (!nntp->_group.empty());
-// _bytes_so_far += line.len;
+ _bytes_so_far += line.len;
unsigned int lines=0u;
unsigned long bytes=0ul;
@@ -361,7 +361,7 @@ TaskXOver :: on_nntp_line_process (NNTP * nntp,
return;
}
-// ++_parts_so_far;
+ ++_parts_so_far;
const Article * article = _data.xover_add (
nntp->_server, nntp->_group,
@@ -369,15 +369,15 @@ TaskXOver :: on_nntp_line_process (NNTP * nntp,
(header_is_nonencoded_utf8(author) ? author : header_to_utf8(author,fallback_charset).c_str()),
time_posted, mid, ref, bytes, lines, xref);
-// if (article)
-// ++_articles_so_far;
+ if (article)
+ ++_articles_so_far;
- // emit a status update
-// uint64_t& prev = _last_xover_number[nntp];
-// increment_step (number - prev);
-// prev = number;
-// if (!(_parts_so_far % 500))
-// set_status_va (_("%s (%lu parts, %lu articles)"), _short_group_name.c_str(), _parts_so_far, _articles_so_far);
+// emit a status update
+ uint64_t& prev = _last_xover_number[nntp];
+ increment_step (number - prev);
+ prev = number;
+ if (!(_parts_so_far % 500))
+ set_status_va (_("%s (%lu parts, %lu articles)"), _short_group_name.c_str(), _parts_so_far, _articles_so_far);
// cleanup
g_free (buf);
@@ -391,17 +391,17 @@ TaskXOver :: on_nntp_done (NNTP * nntp,
update_work (true);
check_in (nntp, health);
- --_working;
-
- if (_working == 0)
- {
- char buf[2048];
- create_cachename(buf,2048,"headers");
- _headers.close();
- _headers.open(buf, std::ifstream::in);
- while (_headers.getline(buf,2048))
- on_nntp_line_process(nntp,StringView(buf));
- }
+// --_working;
+//
+// if (_working == 0)
+// {
+// char buf[2048];
+// create_cachename(buf,2048,"headers");
+// _headers.close();
+// _headers.open(buf, std::ifstream::in);
+// while (_headers.getline(buf,2048))
+// on_nntp_line_process(nntp,StringView(buf));
+// }
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]