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
a912fe08
...
a912fe08506332584c285c0b90246331b6707a35
authored
2001-04-17 03:31:19 +0000
by
Alain Magloire
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Check the return value of the locker_t.
1 parent
c8df06a7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
mailbox/mbx_mbox.c
mailbox/mbx_mbox.c
View file @
a912fe0
...
...
@@ -389,9 +389,9 @@ mbox_open (mailbox_t mailbox, int flags)
/* Give an appropriate way to file lock. */
/* FIXME: use dotlock external program: we may not be setgid. */
if
(
mailbox
->
locker
==
NULL
)
locker_create
(
&
(
mailbox
->
locker
),
mud
->
name
,
strlen
(
mud
->
name
),
MU_LOCKER_PID
|
MU_LOCKER_FCNTL
);
return
0
;
status
=
locker_create
(
&
(
mailbox
->
locker
),
mud
->
name
,
strlen
(
mud
->
name
),
MU_LOCKER_PID
|
MU_LOCKER_FCNTL
);
return
status
;
}
static
int
...
...
@@ -645,7 +645,7 @@ mbox_expunge (mailbox_t mailbox)
}
/* Get the File lock. */
if
(
locker_lock
(
mailbox
->
locker
,
MU_LOCKER_WRLOCK
)
<
0
)
if
(
locker_lock
(
mailbox
->
locker
,
MU_LOCKER_WRLOCK
)
!=
0
)
{
mailbox_close
(
tmpmailbox
);
mailbox_destroy
(
&
tmpmailbox
);
...
...
@@ -1374,7 +1374,12 @@ mbox_append_message (mailbox_t mailbox, message_t msg)
switch
(
mud
->
state
)
{
case
MBOX_NO_STATE
:
locker_lock
(
mailbox
->
locker
,
MU_LOCKER_WRLOCK
);
if
(
locker_lock
(
mailbox
->
locker
,
MU_LOCKER_WRLOCK
)
!=
0
)
{
MAILBOX_DEBUG0
(
mailbox
,
MU_DEBUG_TRACE
,
"mbox_append_message:lock failed
\n
"
);
return
ENOLCK
;
}
default:
{
...
...
Please
register
or
sign in
to post a comment