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
26c0e2e0
...
26c0e2e0321fe1205815b0c820cbc60b0623c210
authored
2004-01-14 12:55:50 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Check for error return from mailbox_append_message
1 parent
6f398b61
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
9 deletions
mail/copy.c
mail/quit.c
mail/send.c
mail/copy.c
View file @
26c0e2e
...
...
@@ -37,6 +37,7 @@ mail_copy0 (int argc, char **argv, int mark)
msgset_t
*
msglist
=
NULL
,
*
mp
;
int
sender
=
0
;
size_t
total_size
=
0
,
total_lines
=
0
,
size
;
int
status
;
if
(
isupper
(
argv
[
0
][
0
]))
sender
=
1
;
...
...
@@ -72,14 +73,17 @@ mail_copy0 (int argc, char **argv, int mark)
for
(
mp
=
msglist
;
mp
;
mp
=
mp
->
next
)
{
int
status
;
status
=
util_get_message
(
mbox
,
mp
->
msg_part
[
0
],
&
msg
);
if
(
status
)
break
;
mailbox_append_message
(
mbx
,
msg
);
status
=
mailbox_append_message
(
mbx
,
msg
);
if
(
status
)
{
util_error
(
_
(
"can't append message: %s"
),
mu_strerror
(
status
));
break
;
}
message_size
(
msg
,
&
size
);
total_size
+=
size
;
message_lines
(
msg
,
&
size
);
...
...
@@ -93,7 +97,8 @@ mail_copy0 (int argc, char **argv, int mark)
}
}
fprintf
(
ofile
,
"
\"
%s
\"
%3d/%-5d
\n
"
,
filename
,
total_lines
,
total_size
);
if
(
status
==
0
)
fprintf
(
ofile
,
"
\"
%s
\"
%3d/%-5d
\n
"
,
filename
,
total_lines
,
total_size
);
mailbox_close
(
mbx
);
mailbox_destroy
(
&
mbx
);
...
...
mail/quit.c
View file @
26c0e2e
...
...
@@ -98,6 +98,8 @@ mail_mbox_commit ()
&&
(
attribute_is_userflag
(
attr
,
MAIL_ATTRIBUTE_MBOXED
)
||
(
!
hold
&&
attribute_is_read
(
attr
))))
{
int
status
;
if
(
!
dest_mbox
)
{
char
*
name
=
getenv
(
"MBOX"
);
...
...
@@ -111,9 +113,14 @@ mail_mbox_commit ()
}
}
mailbox_append_message
(
dest_mbox
,
msg
);
attribute_set_deleted
(
attr
);
saved_count
++
;
status
=
mailbox_append_message
(
dest_mbox
,
msg
);
if
(
status
)
util_error
(
_
(
"can't append message: %s"
),
mu_strerror
(
status
));
else
{
attribute_set_deleted
(
attr
);
saved_count
++
;
}
}
else
if
(
!
keepsave
&&
attribute_is_userflag
(
attr
,
MAIL_ATTRIBUTE_SAVED
))
attribute_set_deleted
(
attr
);
...
...
mail/send.c
View file @
26c0e2e
...
...
@@ -521,7 +521,10 @@ mail_send0 (compose_env_t * env, int save_to)
|
MU_STREAM_CREAT
);
if
(
status
==
0
)
{
mailbox_append_message
(
mbx
,
msg
);
status
=
mailbox_append_message
(
mbx
,
msg
);
if
(
status
)
util_error
(
_
(
"can't append message: %s"
),
mu_strerror
(
status
));
mailbox_close
(
mbx
);
}
mailbox_destroy
(
&
mbx
);
...
...
Please
register
or
sign in
to post a comment