[tin-dev] allow FWS (RFC 5536 3.1.4.) in get_group_from_list() used in 'L' (lookup_msgid())
Urs Janßen
urs at tin.org
Thu Nov 22 16:36:19 CET 2018
I didn't warp this into #ifdef FOLLOW_USEFOR_DRAFT (which should be
renamed to ALLOW_FWS_IN_NEWSGROUPLIST or the like) as it does no
harm.
=== modified file 'src/select.c'
--- src/select.c 2018-11-07 12:47:33 +0000
+++ src/select.c 2018-11-22 14:38:45 +0000
@@ -1469,7 +1469,6 @@
if (ret == OK_HDR) { /* RFC 3977 ("0 %s", grp) */
if (*ptr == '0' && (*(ptr + 1) == ' ' || *(ptr + 1) == '\t'))
r = ptr + 2;
-
}
if (r)
@@ -1664,7 +1663,7 @@
get_group_from_list(
char *newsgroups)
{
- char *ptr;
+ char *ptr, *tr;
t_bool found = FALSE;
struct t_group *group = NULL;
@@ -1673,7 +1672,8 @@
/* find first available group of type news */
do {
- group = group_find(ptr, TRUE);
+ tr = str_trim(ptr);
+ group = group_find(tr, TRUE);
if (group && group->type == GROUP_TYPE_NEWS)
found = TRUE;
} while (!found && (ptr = strtok(NULL, ",")) != NULL);
More information about the tin-dev
mailing list