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
442711bc
...
442711bcda49eeca667d15c509d200995379c832
authored
2011-10-25 21:27:45 +0300
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Use MU_CTYPE_ENDLN to trim \r\n.
1 parent
0cb608de
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
10 additions
and
9 deletions
imap4d/io.c
imap4d/preauth.c
libmu_sieve/extensions/spamd.c
libproto/mailer/smtp_io.c
libproto/mbox/mbox.c
libproto/pop/mbox.c
maidag/lmtp.c
imap4d/io.c
View file @
442711b
...
...
@@ -319,7 +319,7 @@ io_getline (char **pbuf, size_t *psize, size_t *pnbytes)
imap4d_bye
(
ERR_NO_IFILE
);
/*FIXME rc = ECONNABORTED;*/
}
len
=
mu_rtrim_c
set
(
s
,
"
\r\n
"
);
len
=
mu_rtrim_c
lass
(
s
,
MU_CTYPE_ENDLN
);
if
(
pnbytes
)
*
pnbytes
=
len
;
}
...
...
imap4d/preauth.c
View file @
442711b
...
...
@@ -463,7 +463,7 @@ do_preauth_program (struct sockaddr *pcs, struct sockaddr *sa)
}
else
{
mu_rtrim_c
set
(
buf
,
"
\r\n
"
);
mu_rtrim_c
lass
(
buf
,
MU_CTYPE_ENDLN
);
return
buf
;
}
return
NULL
;
...
...
libmu_sieve/extensions/spamd.c
View file @
442711b
...
...
@@ -248,7 +248,7 @@ spamd_read_line (mu_sieve_machine_t mach, mu_stream_t stream,
size_t
n
;
int
rc
=
mu_stream_getline
(
stream
,
pbuffer
,
psize
,
&
n
);
if
(
rc
==
0
)
mu_rtrim_c
set
(
*
pbuffer
,
"
\r\n
"
);
mu_rtrim_c
lass
(
*
pbuffer
,
MU_CTYPE_ENDLN
);
else
{
/* FIXME: Need an 'onabort' mechanism in Sieve machine, which
...
...
libproto/mailer/smtp_io.c
View file @
442711b
...
...
@@ -68,7 +68,7 @@ mu_smtp_response (mu_smtp_t smtp)
MU_SMTP_CHECK_ERROR
(
smtp
,
rc
);
if
(
n
==
0
)
MU_SMTP_CHECK_ERROR
(
smtp
,
EIO
);
n
=
mu_rtrim_c
set
(
smtp
->
rdbuf
,
"
\r\n
"
);
n
=
mu_rtrim_c
lass
(
smtp
->
rdbuf
,
MU_CTYPE_ENDLN
);
if
(
n
<
3
||
!
mu_isdigit
(
smtp
->
rdbuf
[
0
]))
{
mu_diag_output
(
MU_DIAG_NOTICE
,
...
...
@@ -101,7 +101,7 @@ mu_smtp_response (mu_smtp_t smtp)
MU_SMTP_CHECK_ERROR
(
smtp
,
rc
);
if
(
n
==
0
)
MU_SMTP_CHECK_ERROR
(
smtp
,
EIO
);
n
=
mu_rtrim_c
set
(
smtp
->
rdbuf
,
"
\r\n
"
);
n
=
mu_rtrim_c
lass
(
smtp
->
rdbuf
,
MU_CTYPE_ENDLN
);
if
(
n
<
3
||
memcmp
(
smtp
->
rdbuf
,
smtp
->
replcode
,
3
))
{
mu_diag_output
(
MU_DIAG_NOTICE
,
...
...
libproto/mbox/mbox.c
View file @
442711b
...
...
@@ -28,6 +28,7 @@
#include <mailutils/cstr.h>
#include <mailutils/io.h>
#include <mailutils/filter.h>
#include <mailutils/cctype.h>
#define ATTRIBUTE_IS_DELETED(flag) (flag & MU_ATTRIBUTE_DELETED)
#define ATTRIBUTE_IS_EQUAL(flag1, flag2) (flag1 == flag2)
...
...
@@ -381,7 +382,7 @@ mbox_envelope_date (mu_envelope_t envelope, char *buf, size_t len,
&
n
);
if
(
status
)
return
status
;
mu_rtrim_c
set
(
buffer
,
"
\r\n
"
);
mu_rtrim_c
lass
(
buffer
,
MU_CTYPE_ENDLN
);
/* Format: "From [sender] [date]" */
/* strlen ("From ") == 5 */
...
...
@@ -938,7 +939,7 @@ msg_envelope_to_stream (mu_stream_t out, mu_message_t msg)
return
status
;
}
mu_rtrim_c
set
(
datestr
,
"
\r\n
"
);
mu_rtrim_c
lass
(
datestr
,
MU_CTYPE_ENDLN
);
envarr
[
0
]
=
"From "
;
envarr
[
1
]
=
sender
;
...
...
libproto/pop/mbox.c
View file @
442711b
...
...
@@ -640,7 +640,7 @@ pop_header_blurb (mu_stream_t stream, size_t maxlines,
while
((
status
=
mu_stream_getline
(
stream
,
&
buf
,
&
size
,
&
n
))
==
0
&&
n
>
0
)
{
size_t
len
=
mu_rtrim_c
set
(
buf
,
"
\r\n
"
);
size_t
len
=
mu_rtrim_c
lass
(
buf
,
MU_CTYPE_ENDLN
);
if
(
len
==
0
)
break
;
mu_opool_append
(
opool
,
buf
,
len
);
...
...
maidag/lmtp.c
View file @
442711b
...
...
@@ -545,7 +545,7 @@ lmtp_loop (mu_stream_t iostr, unsigned int timeout)
enum
lmtp_command
cmd
=
cp
->
cmd_code
;
enum
lmtp_state
next_state
=
transtab
[
cmd
][
state
];
mu_rtrim_c
set
(
sp
,
"
\r\n
"
);
mu_rtrim_c
lass
(
sp
,
MU_CTYPE_ENDLN
);
if
(
next_state
!=
state_none
)
{
...
...
Please
register
or
sign in
to post a comment