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
03237b3a
...
03237b3a2709ccf219afca2c8fdc1e6952ce1dfc
authored
2005-11-29 17:40:27 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(mu_mime_get_part): Set stream_size function.
1 parent
5a85de93
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
mailbox/mime.c
mailbox/mime.c
View file @
03237b3
...
...
@@ -406,7 +406,18 @@ _mime_parse_mpart_message (mu_mime_t mime)
/*------ Mime message functions for READING a multipart message -----*/
static
int
_mimepart_body_read
(
mu_stream_t
stream
,
char
*
buf
,
size_t
buflen
,
mu_off_t
off
,
_mimepart_body_stream_size
(
mu_stream_t
stream
,
mu_off_t
*
psize
)
{
size_t
s
;
mu_body_t
body
=
mu_stream_get_owner
(
stream
);
int
rc
=
mu_body_size
(
body
,
&
s
);
*
psize
=
s
;
return
rc
;
}
static
int
_mimepart_body_read
(
mu_stream_t
stream
,
char
*
buf
,
size_t
buflen
,
mu_off_t
off
,
size_t
*
nbytes
)
{
mu_body_t
body
=
mu_stream_get_owner
(
stream
);
...
...
@@ -874,7 +885,10 @@ mu_mime_get_part (mu_mime_t mime, size_t part, mu_message_t * msg)
body
))
==
0
)
{
mu_stream_set_read
(
stream
,
_mimepart_body_read
,
body
);
mu_stream_set_get_transport2
(
stream
,
_mimepart_body_transport
,
mu_stream_set_get_transport2
(
stream
,
_mimepart_body_transport
,
body
);
mu_stream_set_size
(
stream
,
_mimepart_body_stream_size
,
body
);
mu_body_set_stream
(
body
,
stream
,
mime_part
->
msg
);
mu_message_set_body
(
mime_part
->
msg
,
body
,
mime_part
);
...
...
Please
register
or
sign in
to post a comment