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
433677f4
...
433677f4cf89692dc91cf1a4ee28316fecc8e805
authored
2006-01-20 16:29:54 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Add gettext markers
1 parent
0c89e510
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
34 deletions
mailbox/imap/folder.c
mailbox/mbox/mbox.c
mailbox/imap/folder.c
View file @
433677f
...
...
@@ -53,6 +53,7 @@
#include <mailutils/iterator.h>
#include <mailutils/argcv.h>
#include <mailutils/tls.h>
#include <mailutils/nls.h>
/* For dbg purposes set to one to see different level of traffic. */
/* Print to stderr the command sent to the IMAP server. */
...
...
@@ -1923,7 +1924,7 @@ imap_fetch (f_imap_t f_imap)
{
status
=
imap_rfc822_header
(
f_imap
,
&
sp
);
}
/* else mu_error (
"not supported RFC822 option\n"
); */
/* else mu_error (
_("not supported RFC822 option")
); */
}
else
{
...
...
@@ -1934,7 +1935,7 @@ imap_fetch (f_imap_t f_imap)
{
status
=
imap_uid
(
f_imap
,
&
sp
);
}
/* else mu_error (
"not supported FETCH command\n"
); */
/* else mu_error (
_("not supported FETCH command")
); */
}
return
status
;
}
...
...
@@ -2222,8 +2223,14 @@ imap_parse (f_imap_t f_imap)
remainder
=
empty
;
}
if
(
!
tag
)
{
/* Just in case */
mu_error
(
_
(
"No tag in response: %s %s"
),
response
,
remainder
);
status
=
MU_ERR_FAILURE
;
}
/* Is the response untagged ? */
if
(
tag
&&
tag
[
0
]
==
'*'
)
else
if
(
tag
[
0
]
==
'*'
)
{
FOLDER_DEBUG2
(
folder
,
MU_DEBUG_PROT
,
"* %s %s
\n
"
,
response
,
remainder
);
...
...
@@ -2246,7 +2253,7 @@ imap_parse (f_imap_t f_imap)
/* The human-readable text contains a special alert that
MUST be presented to the user in a fashion that calls
the user's attention to the message. */
mu_error
(
"ALERT: %s
\n
"
,
(
sp
)
?
sp
:
""
);
mu_error
(
_
(
"ALERT: %s"
)
,
(
sp
)
?
sp
:
""
);
}
else
if
(
strcasecmp
(
subtag
,
"BADCHARSET"
)
==
0
)
{
...
...
@@ -2255,7 +2262,7 @@ imap_parse (f_imap_t f_imap)
is not supported by this implementation. If the
optional list of charsets is given, this lists the
charsets that are supported by this implementation. */
mu_error
(
"BADCHARSET: %s
\n
"
,
(
sp
)
?
sp
:
""
);
mu_error
(
_
(
"BAD CHARSET: %s"
)
,
(
sp
)
?
sp
:
""
);
}
else
if
(
strcasecmp
(
subtag
,
"CAPABILITY"
)
==
0
)
{
...
...
@@ -2274,14 +2281,14 @@ imap_parse (f_imap_t f_imap)
mailbox name. This is a hint to the client that the
operation can succeed if the SELECT or EXAMINE is
reissued with the new mailbox name. */
mu_error
(
"NEWNAME: %s
\n
"
,
(
sp
)
?
sp
:
""
);
mu_error
(
"NEWNAME: %s"
,
(
sp
)
?
sp
:
""
);
}
else
if
(
strcasecmp
(
subtag
,
"PARSE"
)
==
0
)
{
/* The human-readable text represents an error in
parsing the [RFC-822] header or [MIME-IMB] headers
of a message in the mailbox. */
mu_error
(
"PARSE: %s
\n
"
,
(
sp
)
?
sp
:
""
);
mu_error
(
"PARSE: %s"
,
(
sp
)
?
sp
:
""
);
}
else
if
(
strcasecmp
(
subtag
,
"PERMANENTFLAGS"
)
==
0
)
{
...
...
@@ -2317,7 +2324,7 @@ imap_parse (f_imap_t f_imap)
other reason). This is a hint to the client that
the operation can succeed if the mailbox is first
created by the CREATE command. */
mu_error
(
"TRYCREATE: %s
\n
"
,
(
sp
)
?
sp
:
""
);
mu_error
(
"TRYCREATE: %s"
,
(
sp
)
?
sp
:
""
);
}
else
if
(
strcasecmp
(
subtag
,
"UIDNEXT"
)
==
0
)
{
...
...
@@ -2355,18 +2362,18 @@ imap_parse (f_imap_t f_imap)
{
/* Not sure why we would get an untagged ok...but we do... */
/* Still should we be verbose about is ? */
mu_error
(
"Untagged OK: %s
\n
"
,
remainder
);
mu_error
(
_
(
"Untagged OK: %s"
)
,
remainder
);
}
}
else
if
(
strcasecmp
(
response
,
"NO"
)
==
0
)
{
/* This does not mean failure but rather a strong warning. */
mu_error
(
"Untagged NO: %s
\n
"
,
remainder
);
mu_error
(
_
(
"Untagged NO: %s"
)
,
remainder
);
}
else
if
(
strcasecmp
(
response
,
"BAD"
)
==
0
)
{
/* We're dead, protocol/syntax error. */
mu_error
(
"Untagged BAD: %s
\n
"
,
remainder
);
mu_error
(
_
(
"Untagged BAD: %s"
)
,
remainder
);
}
else
if
(
strcasecmp
(
response
,
"PREAUTH"
)
==
0
)
{
...
...
@@ -2390,7 +2397,7 @@ imap_parse (f_imap_t f_imap)
{
f_imap
->
selected
->
messages_count
=
strtol
(
response
,
NULL
,
10
);
}
else
if
(
strcasecmp
(
remainder
,
"EXPUNGE
D
"
)
==
0
)
else
if
(
strcasecmp
(
remainder
,
"EXPUNGE"
)
==
0
)
{
unsigned
int
msgno
=
strtol
(
response
,
NULL
,
10
);
status
=
imap_expunge
(
f_imap
,
msgno
);
...
...
@@ -2429,12 +2436,12 @@ imap_parse (f_imap_t f_imap)
else
{
/* Once again, check for something strange. */
mu_error
(
"unknown untagged response:
\"
%s
\"
%s
\n
"
,
mu_error
(
_
(
"unknown untagged response:
\"
%s
\"
%s"
)
,
response
,
remainder
);
}
}
/* Continuation token ???. */
else
if
(
tag
&&
tag
[
0
]
==
'+'
)
else
if
(
tag
[
0
]
==
'+'
)
{
done
=
1
;
}
...
...
@@ -2463,7 +2470,8 @@ imap_parse (f_imap_t f_imap)
else
/* NO and BAD */
{
status
=
EINVAL
;
mu_error
(
"NO/Bad Tagged: %s %s
\n
"
,
response
,
remainder
);
mu_error
(
_
(
"NO/Bad Tagged: %s %s %s"
),
tag
,
response
,
remainder
);
}
}
f_imap
->
ptr
=
f_imap
->
buffer
;
...
...
mailbox/mbox/mbox.c
View file @
433677f
...
...
@@ -367,7 +367,7 @@ mbox_is_updated (mu_mailbox_t mailbox)
{
mu_observable_notify
(
mailbox
->
observable
,
MU_EVT_MAILBOX_CORRUPT
);
/* And be verbose. ? */
mu_error
(
"* BAD : Mailbox corrupted, shrank size
\n
"
);
mu_error
(
_
(
"* BAD : Mailbox corrupted, shrank in size"
)
);
/* FIXME: should I crash. */
return
0
;
}
...
...
@@ -482,7 +482,7 @@ mbox_expunge0 (mu_mailbox_t mailbox, int remove_deleted)
{
if
(
tmpmboxname
)
free
(
tmpmboxname
);
mu_error
(
"Failed to create temporary file when expunging.
\n
"
);
mu_error
(
_
(
"Failed to create temporary file when expunging"
)
);
return
errno
;
}
...
...
@@ -545,7 +545,7 @@ mbox_expunge0 (mu_mailbox_t mailbox, int remove_deleted)
mu_mailbox_destroy
(
&
tmpmailbox
);
remove
(
tmpmboxname
);
free
(
tmpmboxname
);
mu_error
(
"Failed to grab the lock: %s
\n
"
,
mu_strerror
(
status
));
mu_error
(
_
(
"Failed to grab the lock: %s"
),
mu_strerror
(
status
));
return
status
;
}
...
...
@@ -597,8 +597,8 @@ mbox_expunge0 (mu_mailbox_t mailbox, int remove_deleted)
status
=
mbox_get_message
(
mailbox
,
i
+
1
,
&
msg
);
if
(
status
!=
0
)
{
mu_error
(
"Error expunge:%d: %s"
,
__LINE__
,
mu_strerror
(
status
));
mu_error
(
_
(
"Error expunging:%d: %s"
)
,
__LINE__
,
mu_strerror
(
status
));
goto
bailout0
;
}
}
...
...
@@ -606,8 +606,8 @@ mbox_expunge0 (mu_mailbox_t mailbox, int remove_deleted)
&
total
,
1
,
(
i
==
save_imapbase
));
if
(
status
!=
0
)
{
mu_error
(
"Error expunge:%d: %s"
,
__LINE__
,
mu_strerror
(
status
));
mu_error
(
_
(
"Error expunging:%d: %s"
)
,
__LINE__
,
mu_strerror
(
status
));
goto
bailout0
;
}
/* Clear the dirty bits. */
...
...
@@ -629,8 +629,8 @@ mbox_expunge0 (mu_mailbox_t mailbox, int remove_deleted)
||
(
status
=
mu_stream_write
(
tmpmailbox
->
stream
,
buffer
,
n
,
total
,
&
n
)
!=
0
))
{
mu_error
(
"Error expunge:%d: %s"
,
__LINE__
,
mu_strerror
(
status
));
mu_error
(
_
(
"Error expunging:%d: %s"
)
,
__LINE__
,
mu_strerror
(
status
));
goto
bailout0
;
}
len
-=
n
;
...
...
@@ -641,8 +641,8 @@ mbox_expunge0 (mu_mailbox_t mailbox, int remove_deleted)
status
=
mu_stream_write
(
tmpmailbox
->
stream
,
"
\n
"
,
1
,
total
,
&
n
);
if
(
status
!=
0
)
{
mu_error
(
"Error expunge:%d: %s"
,
__LINE__
,
mu_strerror
(
status
));
mu_error
(
_
(
"Error expunging:%d: %s"
)
,
__LINE__
,
mu_strerror
(
status
));
goto
bailout0
;
}
total
++
;
...
...
@@ -671,8 +671,8 @@ mbox_expunge0 (mu_mailbox_t mailbox, int remove_deleted)
total
,
&
n
);
if
(
status
!=
0
)
{
mu_error
(
"Error expunge:%d: %s"
,
__LINE__
,
mu_strerror
(
status
));
mu_error
(
_
(
"Error expunging:%d: %s"
)
,
__LINE__
,
mu_strerror
(
status
));
goto
bailout0
;
}
total
+=
n
;
...
...
@@ -682,8 +682,8 @@ mbox_expunge0 (mu_mailbox_t mailbox, int remove_deleted)
else
if
(
len
<
0
)
{
/* Corrupted mailbox. */
mu_error
(
"Error expunge:%d: %s"
,
__LINE__
,
mu_strerror
(
status
));
mu_error
(
_
(
"Error expunging:%d: %s"
)
,
__LINE__
,
mu_strerror
(
status
));
goto
bailout0
;
}
}
...
...
@@ -703,8 +703,8 @@ mbox_expunge0 (mu_mailbox_t mailbox, int remove_deleted)
status
=
mu_stream_write
(
mailbox
->
stream
,
buffer
,
n
,
offset
,
&
n
);
if
(
status
!=
0
)
{
mu_error
(
"Error expunge:%d: %s
\n
"
,
__LINE__
,
mu_strerror
(
status
));
mu_error
(
_
(
"Error expunging:%d: %s"
)
,
__LINE__
,
mu_strerror
(
status
));
goto
bailout
;
}
off
+=
n
;
...
...
@@ -717,8 +717,8 @@ mbox_expunge0 (mu_mailbox_t mailbox, int remove_deleted)
status
=
mu_stream_truncate
(
mailbox
->
stream
,
total
+
marker
);
if
(
status
!=
0
)
{
mu_error
(
"Error expunging:%d: %s
\n
"
,
__LINE__
,
mu_strerror
(
status
));
mu_error
(
_
(
"Error expunging:%d: %s"
)
,
__LINE__
,
mu_strerror
(
status
));
goto
bailout
;
}
...
...
Please
register
or
sign in
to post a comment