aboutsummaryrefslogtreecommitdiff
path: root/src/procheader.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-03-29 04:40:26 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-03-29 04:40:26 +0000
commit877b16da4a494077b72a1e03c62a481151aa80c1 (patch)
tree5b943588242d3a48641b19d8207c27c0fd253302 /src/procheader.c
parent78ffc1ed2c6fbf42feabfb348d746b5a36be3db8 (diff)
modified message threading.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@191 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/procheader.c')
-rw-r--r--src/procheader.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/procheader.c b/src/procheader.c
index 62047aa5..eff43f48 100644
--- a/src/procheader.c
+++ b/src/procheader.c
@@ -503,7 +503,6 @@ MsgInfo *procheader_parse_stream(FILE *fp, MsgFlags flags, gboolean full)
MsgInfo *msginfo;
gchar buf[BUFFSIZE];
- gchar *reference = NULL;
gchar *p, *q;
gchar *hp;
HeaderEntry *hentry;
@@ -571,19 +570,17 @@ MsgInfo *procheader_parse_stream(FILE *fp, MsgFlags flags, gboolean full)
msginfo->references =
references_list_prepend(msginfo->references,
hp);
- if (msginfo->references && !reference)
- reference = g_strdup((gchar *)msginfo->references->data);
break;
case H_IN_REPLY_TO:
- if (!reference) {
- eliminate_parenthesis(hp, '(', ')');
- if ((p = strrchr(hp, '<')) != NULL &&
- strchr(p + 1, '>') != NULL) {
- extract_parenthesis(p, '<', '>');
- remove_space(p);
- if (*p != '\0')
- reference = g_strdup(p);
- }
+ if (msginfo->inreplyto) break;
+
+ eliminate_parenthesis(hp, '(', ')');
+ if ((p = strrchr(hp, '<')) != NULL &&
+ strchr(p + 1, '>') != NULL) {
+ extract_parenthesis(p, '<', '>');
+ remove_space(p);
+ if (*p != '\0')
+ msginfo->inreplyto = g_strdup(p);
}
break;
case H_CONTENT_TYPE:
@@ -633,7 +630,9 @@ MsgInfo *procheader_parse_stream(FILE *fp, MsgFlags flags, gboolean full)
g_free(cc);
}
- msginfo->inreplyto = reference;
+ if (!msginfo->inreplyto && msginfo->references)
+ msginfo->inreplyto =
+ g_strdup((gchar *)msginfo->references->data);
g_free(charset);