Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
99f80efe
...
99f80efee8fdde2502b31bf913d2e4b679c7f0bb
authored
2003-10-11 12:09:12 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(builtin_formataddr): Fixed checking for duplicate addresses.
1 parent
d4d27428
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
23 deletions
mh/mh_format.c
mh/mh_format.c
View file @
99f80ef
...
...
@@ -1723,6 +1723,9 @@ builtin_formataddr (struct mh_machine *mach)
{
address_t
addr
,
dest
;
size_t
size
;
int
i
;
size_t
num
;
char
*
buf
;
if
(
strobj_len
(
&
mach
->
reg_str
)
==
0
)
dest
=
NULL
;
...
...
@@ -1735,38 +1738,27 @@ builtin_formataddr (struct mh_machine *mach)
return
;
}
if
(
addrlist_lookup
(
mach
->
addrlist
,
addr
))
address_get_count
(
addr
,
&
num
);
for
(
i
=
1
;
i
<=
num
;
i
++
)
{
address_destroy
(
&
dest
);
address_destroy
(
&
addr
);
return
;
}
if
(
rcpt_mask
&
RCPT_ME
)
address_union
(
&
dest
,
addr
);
else
{
int
i
;
size_t
num
;
char
*
buf
;
address_get_count
(
addr
,
&
num
);
for
(
i
=
1
;
i
<=
num
;
i
++
)
if
(
address_aget_email
(
addr
,
i
,
&
buf
)
==
0
)
{
if
(
address_aget_email
(
addr
,
i
,
&
buf
)
==
0
)
if
(
(
rcpt_mask
&
RCPT_ME
)
||
!
mh_is_my_name
(
buf
)
)
{
if
(
!
mh_is_my_name
(
buf
))
address_t
subaddr
;
address_get_nth
(
addr
,
i
,
&
subaddr
);
if
(
!
addrlist_lookup
(
mach
->
addrlist
,
subaddr
))
{
address_t
subaddr
;
address_get_nth
(
addr
,
i
,
&
subaddr
);
list_append
(
mach
->
addrlist
,
subaddr
);
address_union
(
&
dest
,
subaddr
);
address_destroy
(
&
subaddr
);
}
free
(
buf
);
else
address_destroy
(
&
subaddr
);
}
free
(
buf
);
}
}
list_append
(
mach
->
addrlist
,
addr
);
if
(
address_to_string
(
dest
,
NULL
,
0
,
&
size
)
==
0
)
{
strobj_realloc
(
&
mach
->
reg_str
,
size
+
1
);
...
...
Please
register
or
sign in
to post a comment