[pan2/testing: 155/279] debugging references headers ...
- From: Heinrich MÃller <henmull src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pan2/testing: 155/279] debugging references headers ...
- Date: Sat, 3 Dec 2011 22:35:12 +0000 (UTC)
commit 5837ff8bc55a734349ecad9dd4b18f27cdf0ae65
Author: Heinrich MÃller <sphemuel stud informatik uni-erlangen de>
Date: Wed Jul 6 19:45:50 2011 +0200
debugging references headers ...
pan/general/debug.cc | 2 +-
pan/gui/post-ui.cc | 8 ++++----
pan/tasks/task-upload.cc | 18 +++++++++++-------
3 files changed, 16 insertions(+), 12 deletions(-)
---
diff --git a/pan/general/debug.cc b/pan/general/debug.cc
index c6414eb..2e6cfb4 100644
--- a/pan/general/debug.cc
+++ b/pan/general/debug.cc
@@ -3,6 +3,6 @@
namespace pan
{
- bool _debug_flag = true;
+ bool _debug_flag = false;
bool _debug_verbose_flag = false;
}
diff --git a/pan/gui/post-ui.cc b/pan/gui/post-ui.cc
index 714fc78..0ebcc4b 100644
--- a/pan/gui/post-ui.cc
+++ b/pan/gui/post-ui.cc
@@ -1494,11 +1494,11 @@ PostUI :: new_message_from_ui (Mode mode)
GMimeDataWrapper * content_object = g_mime_data_wrapper_new_with_stream (stream, GMIME_CONTENT_ENCODING_DEFAULT);
g_object_unref (stream);
GMimePart * part = g_mime_part_new ();
- if (mode == POSTING || mode == DRAFTING)
+// if (mode == POSTING || mode == DRAFTING)
pch = g_strdup_printf ("text/plain; charset=%s", charset.c_str());
- else
- // http://tools.ietf.org/html/rfc2046#section-5.1.3
- pch = g_strdup_printf ("multipart/mixed; charset=%s", charset.c_str());
+// else
+// // http://tools.ietf.org/html/rfc2046#section-5.1.3
+// pch = g_strdup_printf ("multipart/mixed; charset=%s", charset.c_str());
GMimeContentType * type = g_mime_content_type_new_from_string (pch);
g_free (pch);
diff --git a/pan/tasks/task-upload.cc b/pan/tasks/task-upload.cc
index af19b55..d6e7296 100644
--- a/pan/tasks/task-upload.cc
+++ b/pan/tasks/task-upload.cc
@@ -36,6 +36,7 @@ extern "C" {
#include <pan/general/log.h>
#include <pan/general/macros.h>
#include <pan/usenet-utils/mime-utils.h>
+#include <pan/usenet-utils/gnksa.h>
#include <pan/data/encode-cache.h>
#include "encoder.h"
#include "task-upload.h"
@@ -159,11 +160,14 @@ void
TaskUpload :: add_reference_to_list(std::string s)
{
char buf[4096];
-// std::cerr<<"references old : "<<_references<<std::endl;
- g_snprintf(buf,sizeof(buf),"%s <%s>", _references.empty() ? "": _references.c_str() , s.c_str());
-// std::cerr<<"references new : "<<buf<<std::endl;
- g_mime_object_set_header ((GMimeObject *)_msg, "References", buf);
-// std::cerr<<"references msg : "<<g_mime_object_get_header((GMimeObject*)_msg,"References")<<std::endl;
+ std::cerr<<"references old : "<<_references<<std::endl;
+
+ std::string res = GNKSA::generate_references (StringView(_references), s);
+ GNKSA::trim_references(res);
+
+ std::cerr<<"references new : "<<buf<<std::endl;
+ g_mime_object_set_header ((GMimeObject *)_msg, "References", res.c_str());
+ std::cerr<<"references msg : "<<g_mime_object_get_header((GMimeObject*)_msg,"References")<<std::endl;
}
void
@@ -183,8 +187,8 @@ TaskUpload :: prepend_headers(GMimeMessage* msg, TaskUpload::Needed * n, std::st
n->partno, _total_parts);
g_mime_message_set_subject (msg, buf);
- if (!n->last_mid.empty())
- add_reference_to_list(n->last_mid);
+// if (!n->last_mid.empty())
+// add_reference_to_list(n->last_mid);
//extract body
char * body (g_mime_object_to_string ((GMimeObject *) msg));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]