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
ce3fd630
...
ce3fd630f534ad8c93d912368e4512b671ae3207
authored
2007-02-27 16:13:25 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(deliver_pending_bulletins): Return immediately, if unable to count messages in the bulletin box
1 parent
397905e7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
pop3d/bulletin.c
pop3d/bulletin.c
View file @
ce3fd63
...
...
@@ -151,7 +151,7 @@ read_bulletin_db (size_t *pnum)
return
1
;
}
s
=
MU_DATUM_SIZE
(
data
);
s
=
MU_DATUM_SIZE
(
data
);
if
(
s
<
sizeof
sbuf
)
bufptr
=
sbuf
;
else
...
...
@@ -165,7 +165,7 @@ read_bulletin_db (size_t *pnum)
bufptr
=
buf
;
}
memcpy
(
bufptr
,
MU_DATUM_PTR
(
data
),
s
);
memcpy
(
bufptr
,
MU_DATUM_PTR
(
data
),
s
);
bufptr
[
s
]
=
0
;
mu_dbm_datum_free
(
&
data
);
...
...
@@ -180,7 +180,7 @@ read_bulletin_db (size_t *pnum)
{
long
n
;
n
=
*
(
long
*
)
MU_DATUM_PTR
(
data
);
n
=
*
(
long
*
)
MU_DATUM_PTR
(
data
);
if
(
n
>=
0
)
{
syslog
(
LOG_INFO
,
...
...
@@ -220,11 +220,11 @@ write_bulletin_db (size_t num)
memset
(
&
key
,
0
,
sizeof
key
);
memset
(
&
data
,
0
,
sizeof
data
);
MU_DATUM_PTR
(
key
)
=
username
;
MU_DATUM_SIZE
(
key
)
=
strlen
(
username
);
MU_DATUM_PTR
(
key
)
=
username
;
MU_DATUM_SIZE
(
key
)
=
strlen
(
username
);
p
=
mu_umaxtostr
(
0
,
num
);
MU_DATUM_PTR
(
data
)
=
p
;
MU_DATUM_SIZE
(
data
)
=
strlen
(
p
);
MU_DATUM_PTR
(
data
)
=
p
;
MU_DATUM_SIZE
(
data
)
=
strlen
(
p
);
rc
=
mu_dbm_insert
(
db
,
key
,
data
,
1
);
if
(
rc
)
...
...
@@ -274,8 +274,11 @@ deliver_pending_bulletins ()
return
;
lastnum
=
get_last_delivered_num
();
mu_mailbox_messages_count
(
bull
,
&
total
);
rc
=
mu_mailbox_messages_count
(
bull
,
&
total
);
if
(
rc
)
mu_error
(
_
(
"Cannot count bulletins: %s"
),
mu_strerror
(
rc
));
else
{
syslog
(
LOG_DEBUG
,
"user %s, last bulletin %lu, total bulletins %lu"
,
username
,
(
unsigned
long
)
lastnum
,
(
unsigned
long
)
total
);
...
...
@@ -312,6 +315,8 @@ deliver_pending_bulletins ()
}
store_last_delivered_num
(
i
-
1
);
}
}
close_bulletin_mailbox
(
&
bull
);
}
...
...
Please
register
or
sign in
to post a comment