[pan2] fixed typo
- From: Heinrich MÃller <henmull src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pan2] fixed typo
- Date: Wed, 26 Dec 2012 08:24:11 +0000 (UTC)
commit 78a6f830c1f74a885663e9a45935e43cf7c202dc
Author: Heinrich MÃller <henmull src gnome org>
Date: Wed Dec 26 09:23:20 2012 +0100
fixed typo
pan/tasks/nntp.cc | 36 ++++++++++++++++--------------------
pan/tasks/nntp.h | 2 +-
pan/tasks/task-xover.cc | 2 +-
3 files changed, 18 insertions(+), 22 deletions(-)
---
diff --git a/pan/tasks/nntp.cc b/pan/tasks/nntp.cc
index d78ae0d..2cfab01 100644
--- a/pan/tasks/nntp.cc
+++ b/pan/tasks/nntp.cc
@@ -308,10 +308,13 @@ NNTP :: help (Listener * l)
}
void
-NNTP :: get_group (const Quark& group)
+NNTP :: enter_group (const Quark& group)
{
if (group != _group)
+ {
_commands.push_back (build_command ("GROUP %s\r\n",group.c_str()));
+ write_next_command();
+ }
}
@@ -323,10 +326,8 @@ NNTP :: xover (const Quark & group,
{
_listener = l;
- get_group(group);
-
+ enter_group(group);
_commands.push_back (build_command ("XOVER %"G_GUINT64_FORMAT"-%"G_GUINT64_FORMAT"\r\n", low, high));
-
write_next_command ();
}
@@ -338,11 +339,8 @@ NNTP :: xzver (const Quark & group,
{
_listener = l;
- if (group != _group)
- _commands.push_back (build_command ("GROUP %s\r\n", group.c_str()));
-
+ enter_group(group);
_commands.push_back (build_command ("XZVER %"G_GUINT64_FORMAT"-%"G_GUINT64_FORMAT"\r\n", low, high));
-
write_next_command ();
}
@@ -355,11 +353,11 @@ NNTP :: xfeat (const Quark & group,
_listener = l;
_commands.push_back ("XFEATURE COMPRESS GZIP");
- if (group != _group)
- _commands.push_back (build_command ("GROUP %s\r\n", group.c_str()));
+ write_next_command();
+ enter_group(group);
_commands.push_back (build_command ("XOVER %"G_GUINT64_FORMAT"-%"G_GUINT64_FORMAT"\r\n", low, high));
+ write_next_command();
- write_next_command ();
}
//TODO
@@ -369,10 +367,8 @@ NNTP :: xover_count_only (const Quark & group,
{
_listener = l;
- get_group(group);
-
+ enter_group(group);
_commands.push_back (build_command ("XOVER"));
-
write_next_command ();
}
@@ -399,7 +395,7 @@ NNTP :: article (const Quark & group,
{
_listener = l;
- get_group(group);
+ enter_group(group);
_commands.push_back (build_command ("ARTICLE %"G_GUINT64_FORMAT"\r\n", article_number));
@@ -413,7 +409,7 @@ NNTP :: article (const Quark & group,
{
_listener = l;
- get_group(group);
+ enter_group(group);
_commands.push_back (build_command ("ARTICLE %s\r\n", message_id));
@@ -427,7 +423,7 @@ NNTP :: get_headers (const Quark & group,
{
_listener = l;
- get_group(group);
+ enter_group(group);
_commands.push_back (build_command ("HEAD %s\r\n", message_id));
@@ -441,7 +437,7 @@ NNTP :: get_headers (const Quark & group,
{
_listener = l;
- get_group(group);
+ enter_group(group);
_commands.push_back (build_command ("HEAD %"G_GUINT64_FORMAT"\r\n", article_number));
@@ -455,7 +451,7 @@ NNTP :: get_body (const Quark & group,
{
_listener = l;
- get_group(group);
+ enter_group(group);
_commands.push_back (build_command ("BODY %s\r\n", message_id));
@@ -469,7 +465,7 @@ NNTP :: get_body (const Quark & group,
{
_listener = l;
- get_group(group);
+ enter_group(group);
_commands.push_back (build_command ("BODY %"G_GUINT64_FORMAT"\r\n", article_number));
diff --git a/pan/tasks/nntp.h b/pan/tasks/nntp.h
index c27cd66..c00f44c 100644
--- a/pan/tasks/nntp.h
+++ b/pan/tasks/nntp.h
@@ -166,7 +166,7 @@ namespace pan
public:
/* Internal only */
- void get_group (const Quark& group);
+ void enter_group (const Quark& group);
void get_headers (const Quark & group, const char * message_id, Listener * l);
void get_headers (const Quark & group, uint64_t article_number, Listener * l);
void get_body (const Quark & group, const char * message_id, Listener * l);
diff --git a/pan/tasks/task-xover.cc b/pan/tasks/task-xover.cc
index 985ab87..ac3804d 100644
--- a/pan/tasks/task-xover.cc
+++ b/pan/tasks/task-xover.cc
@@ -175,7 +175,7 @@ TaskXOver::use_nntp(NNTP* nntp)
_last_xover_number[nntp] = mt._low;
if (comp == HEADER_COMPRESS_XFEATURE)
nntp->xfeat(_group, mt._low, mt._high, this);
- else if (comp == HEADER_COMPRESS_XZVER || HEADER_COMPRESS_DIABLO)
+ else if (comp == HEADER_COMPRESS_XZVER || comp == HEADER_COMPRESS_DIABLO)
nntp->xzver(_group, mt._low, mt._high, this);
else
nntp->xover(_group, mt._low, mt._high, this);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]