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
3ef2ebb6
...
3ef2ebb634a2d2d8c55423cc7ba371b3f6f8768b
authored
2000-11-18 02:16:57 +0000
by
Alain Magloire
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
some variables were not initialize, correct a bug in expunging.
1 parent
7941a5d4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
13 deletions
mailbox/attachment.c
mailbox/bio.c
mailbox/file_stream.c
mailbox/mailer.c
mailbox/mbx_mbox.c
mailbox/attachment.c
View file @
3ef2ebb
...
...
@@ -127,7 +127,7 @@ int message_save_attachment(message_t msg, const char *filename, void **data)
stream_t
stream
;
header_t
hdr
;
struct
_msg_info
*
info
=
NULL
;
int
ret
;
int
ret
=
0
;
size_t
size
;
char
*
content_encoding
;
...
...
mailbox/bio.c
View file @
3ef2ebb
...
...
@@ -159,7 +159,7 @@ int
bio_write
(
bio_t
bio
,
const
char
*
ptr
,
size_t
n
,
size_t
*
pnwriten
)
{
int
nleft
;
int
err
;
int
err
=
0
;
size_t
nwriten
=
0
;
size_t
total
=
0
;
...
...
mailbox/file_stream.c
View file @
3ef2ebb
...
...
@@ -121,7 +121,7 @@ _file_write (stream_t stream, const char *iptr, size_t isize,
{
struct
_file_stream
*
fs
=
stream_get_owner
(
stream
);
size_t
n
;
int
err
;
int
err
=
0
;
if
(
fs
==
NULL
)
return
EINVAL
;
...
...
mailbox/mailer.c
View file @
3ef2ebb
...
...
@@ -40,7 +40,7 @@ mailer_create (mailer_t *pmailer, const char *name, int id)
mailer_entry_t
entry
=
NULL
;
list_t
list
=
NULL
;
iterator_t
iterator
;
int
found
;
int
found
=
0
;
(
void
)
id
;
if
(
pmailer
==
NULL
)
...
...
mailbox/mbx_mbox.c
View file @
3ef2ebb
...
...
@@ -749,15 +749,24 @@ mbox_expunge (mailbox_t mailbox)
mum
=
mud
->
umessages
[
j
];
if
(
mum
->
new_flags
&&
ATTRIBUTE_IS_DELETED
(
mum
->
new_flags
))
{
memmove
(
mud
->
umessages
+
j
,
mud
->
umessages
+
j
+
1
,
(
dlast
-
dirty
)
*
sizeof
(
mum
));
mum
->
header_from
=
mum
->
header_from_end
=
0
;
mum
->
header_status
=
mum
->
header_status_end
=
0
;
mum
->
body
=
mum
->
body_end
=
0
;
mum
->
header_lines
=
mum
->
body_lines
=
0
;
mud
->
umessages
[
dlast
]
=
mum
;
dlast
--
;
mum
=
mud
->
umessages
[
j
];
if
((
j
+
1
)
>=
mud
->
messages_count
)
{
/* Move all the pointers up. So the message pointer
part of mum will be at the right position. */
memmove
(
mud
->
umessages
+
j
,
mud
->
umessages
+
j
+
1
,
(
dlast
-
dirty
)
*
sizeof
(
mum
));
mum
->
header_from
=
mum
->
header_from_end
=
0
;
mum
->
header_status
=
mum
->
header_status_end
=
0
;
mum
->
body
=
mum
->
body_end
=
0
;
mum
->
header_lines
=
mum
->
body_lines
=
0
;
/* We are not free()ing the useless mum, but instead
we put it back in the pool, to be reuse. */
mud
->
umessages
[
dlast
]
=
mum
;
dlast
--
;
/* Set mum to the new value after the memmove so it
gets cleared to. */
mum
=
mud
->
umessages
[
j
];
}
}
mum
->
header_from
=
mum
->
header_from_end
=
0
;
mum
->
header_status
=
mum
->
header_status_end
=
0
;
...
...
Please
register
or
sign in
to post a comment