[Commits] [SCM] claws branch, master, updated. 3.9.0-177-gb5633df

holger at claws-mail.org holger at claws-mail.org
Mon Apr 8 01:02:06 CEST 2013


The branch master of project "claws" (Claws Mail) has been updated
       via  b5633df1b51c8a1251bae7af87b8472d3fb65ef8 (commit)
      from  c664620845dd076976e7cae1a6a01e76b724eaae (commit)


- Log -----------------------------------------------------------------
commit b5633df1b51c8a1251bae7af87b8472d3fb65ef8
Author: Holger Berndt <hb at claws-mail.org>
Date:   Sun Apr 7 16:29:40 2013 +0200

    Python plugin: const fix
    
    It seems a bit strange for procheader_get_header_from_msginfo()
    to require a non-const header string argument, though.

diff --git a/src/plugins/python/messageinfotype.c b/src/plugins/python/messageinfotype.c
index a46c631..766b29a 100644
--- a/src/plugins/python/messageinfotype.c
+++ b/src/plugins/python/messageinfotype.c
@@ -216,6 +216,7 @@ static PyObject* get_header(PyObject *self, PyObject *args)
 {
   int retval;
   const char *header_str;
+  char *header_str_dup;
   MsgInfo *msginfo;
   gchar header_content[HEADER_CONTENT_SIZE];
 
@@ -225,7 +226,10 @@ static PyObject* get_header(PyObject *self, PyObject *args)
 
   msginfo = ((clawsmail_MessageInfoObject*)self)->msginfo;
 
-  if(procheader_get_header_from_msginfo(msginfo, header_content, HEADER_CONTENT_SIZE, header_str) == 0) {
+  header_str_dup = g_strdup(header_str);
+  retval = procheader_get_header_from_msginfo(msginfo, header_content, HEADER_CONTENT_SIZE, header_str);
+  g_free(header_str_dup);
+  if(retval == 0) {
     PyObject *header_content_object;
     gchar *content_start;
 

-----------------------------------------------------------------------

Summary of changes:
 src/plugins/python/messageinfotype.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list