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
8a0e37a3
...
8a0e37a387d905d9974bf8701996d60979b3c642
authored
2001-06-01 05:59:29 +0000
by
Alain Magloire
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Some minor bugfixes.
1 parent
86d51d05
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
12 deletions
ChangeLog
mailbox/debug.c
mailbox/folder_imap.c
mailbox/mbx_imap.c
mailbox/mime.c
ChangeLog
View file @
8a0e37a
2001-06-01 Alain Magloire
* mailbox/debug.c(debug_print): Noop is format is NULL;
* mailbox/mbx_imap.c (imap_messages_count): Hack! Force a
reconnect if the server timeout on us. This is not the right
approach and does not work well, fix later.
(message_operation): Check if selected is not null, first.
* mailbox/folder_imap.c (folder_imap_create): Wrong state.
* mailbox/mime.c: Pass down the return value if not ENOENT.
2001-05-30 Dave Inglis
* mailbox/mbx_pop.c (CHECK_ERROR): Force the mailbox to call connect
again when an error occured. For example the QPopper(Qalcomm) POP3
server timeout very quickly, 30 seconds violating the RFC. So when
Readin the stream again we reconnect.
2001-05-30 Dave Inglis
* mailbox/filter_trans.c (base64_decode): The variable should
...
...
mailbox/debug.c
View file @
8a0e37a
/* GNU mailutils - a suite of utilities for electronic mail
Copyright (C) 1999, 2000 Free Software Foundation, Inc.
Copyright (C) 1999, 2000
, 2001
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Library Public License as published by
...
...
@@ -97,7 +97,8 @@ int
debug_print
(
debug_t
debug
,
size_t
level
,
const
char
*
format
,
...)
{
va_list
ap
;
if
(
debug
==
NULL
)
if
(
debug
==
NULL
||
format
==
NULL
)
return
EINVAL
;
if
(
!
(
debug
->
level
&
level
))
...
...
mailbox/folder_imap.c
View file @
8a0e37a
...
...
@@ -422,7 +422,7 @@ folder_imap_create (folder_t folder)
case
IMAP_CREATE
:
status
=
imap_send
(
f_imap
);
CHECK_EAGAIN
(
f_imap
,
status
);
f_imap
->
state
=
IMAP_
DELE
TE_ACK
;
f_imap
->
state
=
IMAP_
CREA
TE_ACK
;
case
IMAP_CREATE_ACK
:
status
=
imap_parse
(
f_imap
);
...
...
@@ -951,7 +951,7 @@ imap_string (f_imap_t f_imap, char **ptr)
return
status
;
}
/* FIXME: does not wor
l for noblo
king. */
/* FIXME: does not wor
k for nonbloc
king. */
static
int
imap_list
(
f_imap_t
f_imap
)
{
...
...
mailbox/mbx_imap.c
View file @
8a0e37a
...
...
@@ -506,18 +506,30 @@ imap_messages_count (mailbox_t mailbox, size_t *pnum)
case
IMAP_SELECT
:
status
=
imap_send
(
f_imap
);
CHECK_EAGAIN
(
f_imap
,
status
);
if
(
status
!=
0
)
f_imap
->
selected
=
NULL
;
{
/* HACK!!!!! Force a reconnect here. */
if
(
status
!=
EAGAIN
&&
status
!=
EINPROGRESS
&&
status
!=
EINTR
)
{
CLEAR_STATE
(
f_imap
);
status
=
folder_open
(
f_imap
->
folder
,
f_imap
->
folder
->
flags
);
CHECK_EAGAIN
(
f_imap
,
status
);
return
imap_messages_count
(
mailbox
,
pnum
);
}
return
status
;
}
f_imap
->
state
=
IMAP_SELECT_ACK
;
case
IMAP_SELECT_ACK
:
status
=
imap_parse
(
f_imap
);
CHECK_EAGAIN
(
f_imap
,
status
);
MAILBOX_DEBUG0
(
mailbox
,
MU_DEBUG_PROT
,
f_imap
->
buffer
);
break
;
default:
break
;
status
=
folder_open
(
f_imap
->
folder
,
f_imap
->
folder
->
flags
);
CHECK_EAGAIN
(
f_imap
,
status
);
return
status
;
}
if
(
pnum
)
...
...
@@ -1722,8 +1734,9 @@ message_operation (f_imap_t f_imap, msg_imap_t msg_imap, char *buffer,
case
IMAP_FETCH_ACK
:
status
=
imap_parse
(
f_imap
);
CHECK_EAGAIN
(
f_imap
,
status
);
MAILBOX_DEBUG0
(
f_imap
->
selected
->
mailbox
,
MU_DEBUG_PROT
,
f_imap
->
buffer
);
if
(
f_imap
->
selected
)
MAILBOX_DEBUG0
(
f_imap
->
selected
->
mailbox
,
MU_DEBUG_PROT
,
f_imap
->
buffer
);
default:
break
;
...
...
mailbox/mime.c
View file @
8a0e37a
...
...
@@ -606,9 +606,11 @@ mime_create(mime_t *pmime, message_t msg, int flags)
else
if
(
(
ret
=
header_get_value
(
mime
->
hdrs
,
MU_HEADER_CONTENT_TYPE
,
mime
->
content_type
,
size
+
1
,
0
)
)
==
0
)
_mime_munge_content_header
(
mime
->
content_type
);
}
else
{
ret
=
0
;
if
(
(
mime
->
content_type
=
strdup
(
"text/plain; charset=us-ascii"
)
)
==
NULL
)
/* default as per spec. */
ret
=
ENOMEM
;
if
(
ret
==
ENOENT
)
{
ret
=
0
;
if
(
(
mime
->
content_type
=
strdup
(
"text/plain; charset=us-ascii"
)
)
==
NULL
)
/* default as per spec. */
ret
=
ENOMEM
;
}
}
if
(
ret
==
0
)
{
mime
->
msg
=
msg
;
...
...
Please
register
or
sign in
to post a comment