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
d52428a2
...
d52428a2bbad0e0f80b5c35c2ea90c3af2e7d51b
authored
2003-02-05 22:23:28 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(lazy_create): Removed. Use mu_tempname() instead.
1 parent
9ddac665
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
11 deletions
mailbox/body.c
mailbox/body.c
View file @
d52428a
...
...
@@ -34,7 +34,6 @@
#define BODY_MODIFIED 0x10000
static
int
lazy_create
__P
((
body_t
));
static
int
_body_flush
__P
((
stream_t
));
static
int
_body_get_fd
__P
((
stream_t
,
int
*
));
static
int
_body_read
__P
((
stream_t
,
char
*
,
size_t
,
off_t
,
size_t
*
));
...
...
@@ -147,19 +146,16 @@ body_get_stream (body_t body, stream_t *pstream)
if
(
body
->
stream
==
NULL
)
{
int
fd
;
int
status
=
stream_create
(
&
body
->
stream
,
MU_STREAM_RDWR
,
body
);
if
(
status
!=
0
)
return
status
;
/* Create the temporary file. */
fd
=
lazy_create
(
body
);
if
(
fd
==
-
1
)
return
errno
;
status
=
file_stream_create
(
&
body
->
fstream
,
body
->
filename
,
MU_STREAM_RDWR
);
body
->
filename
=
mu_tempname
(
NULL
);
status
=
file_stream_create
(
&
body
->
fstream
,
body
->
filename
,
MU_STREAM_RDWR
);
if
(
status
!=
0
)
return
status
;
status
=
stream_open
(
body
->
fstream
);
close
(
fd
);
if
(
status
!=
0
)
return
status
;
stream_set_fd
(
body
->
stream
,
_body_get_fd
,
body
);
...
...
@@ -340,10 +336,6 @@ _body_get_lines0 (stream_t stream, size_t *plines)
return
status
;
}
#ifndef P_tmpdir
# define P_tmpdir "/tmp"
#endif
static
int
lazy_create
(
body_t
body
)
{
...
...
Please
register
or
sign in
to post a comment