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
5a85de93
...
5a85de932fc2c86dc3adc5bb671018af311fd3dd
authored
2005-11-29 17:40:15 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(amd_msg_lookup): Bugfix. Use msg_count == 0 to determine if the msg_array is empty.
1 parent
34d108f4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
mailbox/amd.c
mailbox/amd.c
View file @
5a85de9
...
...
@@ -165,7 +165,7 @@ amd_msg_lookup (struct _amd_data *amd, struct _amd_message *msg,
int
rc
;
mu_off_t
i
;
if
(
!
amd
->
msg_array
)
if
(
amd
->
msg_count
==
0
)
{
*
pret
=
0
;
return
1
;
...
...
@@ -549,12 +549,14 @@ _amd_message_save (struct _amd_data *amd, struct _amd_message *mhm, int expunge)
char
buffer
[
512
];
mu_envelope_t
env
=
NULL
;
status
=
mu_message_size
(
msg
,
&
bsize
);
if
(
status
)
return
status
;
fp
=
_amd_tempfile
(
mhm
->
amd
,
&
name
);
if
(
!
fp
)
return
errno
;
mu_message_size
(
msg
,
&
bsize
);
/* Try to allocate large buffer */
for
(;
bsize
>
1
;
bsize
/=
2
)
if
((
buf
=
malloc
(
bsize
)))
...
...
Please
register
or
sign in
to post a comment