projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@83 e385b8ad-14ed-0310-8656-cc95a2468c6d
[apps/madmutt.git]
/
imap
/
auth_sasl.c
diff --git
a/imap/auth_sasl.c
b/imap/auth_sasl.c
index
5740435
..
a76677f
100644
(file)
--- a/
imap/auth_sasl.c
+++ b/
imap/auth_sasl.c
@@
-18,6
+18,10
@@
/* SASL login/authentication code */
/* SASL login/authentication code */
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include "mutt.h"
#include "mutt_sasl.h"
#include "imap_private.h"
#include "mutt.h"
#include "mutt_sasl.h"
#include "imap_private.h"
@@
-116,12
+120,19
@@
imap_auth_res_t imap_auth_sasl (IMAP_DATA* idata, const char* method)
irc = IMAP_CMD_CONTINUE;
/* looping protocol */
irc = IMAP_CMD_CONTINUE;
/* looping protocol */
- while (rc == SASL_CONTINUE)
+ while (rc == SASL_CONTINUE
|| olen > 0
)
{
do
irc = imap_cmd_step (idata);
while (irc == IMAP_CMD_CONTINUE);
{
do
irc = imap_cmd_step (idata);
while (irc == IMAP_CMD_CONTINUE);
+ if (method && irc == IMAP_CMD_NO)
+ {
+ dprint (2, (debugfile, "imap_auth_sasl: %s failed\n", method));
+ sasl_dispose (&saslconn);
+ return IMAP_AUTH_UNAVAIL;
+ }
+
if (irc == IMAP_CMD_BAD || irc == IMAP_CMD_NO)
goto bail;
if (irc == IMAP_CMD_BAD || irc == IMAP_CMD_NO)
goto bail;
@@
-180,6
+191,8
@@
imap_auth_res_t imap_auth_sasl (IMAP_DATA* idata, const char* method)
mutt_socket_write (idata->conn, "*\r\n");
dprint (1, (debugfile, "imap_auth_sasl: sasl_client_step error %d\n",rc));
}
mutt_socket_write (idata->conn, "*\r\n");
dprint (1, (debugfile, "imap_auth_sasl: sasl_client_step error %d\n",rc));
}
+
+ olen = 0;
}
while (irc != IMAP_CMD_OK)
}
while (irc != IMAP_CMD_OK)