projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rocco Rutte:
[apps/madmutt.git]
/
pop
/
pop_auth.c
diff --git
a/pop/pop_auth.c
b/pop/pop_auth.c
index
840f9e8
..
1fa17ec
100644
(file)
--- a/
pop/pop_auth.c
+++ b/
pop/pop_auth.c
@@
-12,6
+12,7
@@
#endif
#include "mutt.h"
#endif
#include "mutt.h"
+#include "ascii.h"
#include "mx.h"
#include "md5.h"
#include "pop.h"
#include "mx.h"
#include "md5.h"
#include "pop.h"
@@
-103,11
+104,11
@@
static pop_auth_res_t pop_auth_sasl (POP_DATA * pop_data, const char *method)
break;
#ifdef USE_SASL2
break;
#ifdef USE_SASL2
- if (!s
afe_str
ncmp (inbuf, "+ ", 2)
+ if (!s
tr_
ncmp (inbuf, "+ ", 2)
&& sasl_decode64 (inbuf, strlen (inbuf), buf, LONG_STRING - 1,
&len) != SASL_OK)
#else
&& sasl_decode64 (inbuf, strlen (inbuf), buf, LONG_STRING - 1,
&len) != SASL_OK)
#else
- if (!s
afe_str
ncmp (inbuf, "+ ", 2)
+ if (!s
tr_
ncmp (inbuf, "+ ", 2)
&& sasl_decode64 (inbuf, strlen (inbuf), buf, &len) != SASL_OK)
#endif
{
&& sasl_decode64 (inbuf, strlen (inbuf), buf, &len) != SASL_OK)
#endif
{
@@
-138,7
+139,7
@@
static pop_auth_res_t pop_auth_sasl (POP_DATA * pop_data, const char *method)
/* sasl_client_st(art|ep) allocate pc with malloc, expect me to
* free it */
#ifndef USE_SASL2
/* sasl_client_st(art|ep) allocate pc with malloc, expect me to
* free it */
#ifndef USE_SASL2
-
FREE
(&pc);
+
mem_free
(&pc);
#endif
}
}
#endif
}
}
@@
-146,7
+147,7
@@
static pop_auth_res_t pop_auth_sasl (POP_DATA * pop_data, const char *method)
if (rc != SASL_OK)
goto bail;
if (rc != SASL_OK)
goto bail;
- if (!s
afe_str
ncmp (inbuf, "+OK", 3)) {
+ if (!s
tr_
ncmp (inbuf, "+OK", 3)) {
mutt_sasl_setup_conn (pop_data->conn, saslconn);
return POP_A_SUCCESS;
}
mutt_sasl_setup_conn (pop_data->conn, saslconn);
return POP_A_SUCCESS;
}
@@
-155,7
+156,7
@@
bail:
sasl_dispose (&saslconn);
/* terminate SASL sessoin if the last responce is not +OK nor -ERR */
sasl_dispose (&saslconn);
/* terminate SASL sessoin if the last responce is not +OK nor -ERR */
- if (!s
afe_str
ncmp (inbuf, "+ ", 2)) {
+ if (!s
tr_
ncmp (inbuf, "+ ", 2)) {
snprintf (buf, sizeof (buf), "*\r\n");
if (pop_query (pop_data, buf, sizeof (buf)) == PQ_NOT_CONNECTED)
return POP_A_SOCKET;
snprintf (buf, sizeof (buf), "*\r\n");
if (pop_query (pop_data, buf, sizeof (buf)) == PQ_NOT_CONNECTED)
return POP_A_SOCKET;
@@
-174,11
+175,11
@@
void pop_apop_timestamp (POP_DATA * pop_data, char *buf)
{
char *p1, *p2;
{
char *p1, *p2;
-
FREE
(&pop_data->timestamp);
+
mem_free
(&pop_data->timestamp);
if ((p1 = strchr (buf, '<')) && (p2 = strchr (p1, '>'))) {
p2[1] = '\0';
if ((p1 = strchr (buf, '<')) && (p2 = strchr (p1, '>'))) {
p2[1] = '\0';
- pop_data->timestamp = s
afe_str
dup (p1);
+ pop_data->timestamp = s
tr_
dup (p1);
}
}
}
}
@@
-310,7
+311,7
@@
pop_query_status pop_authenticate (POP_DATA * pop_data)
if (PopAuthenticators && *PopAuthenticators) {
/* Try user-specified list of authentication methods */
if (PopAuthenticators && *PopAuthenticators) {
/* Try user-specified list of authentication methods */
- methods = s
afe_str
dup (PopAuthenticators);
+ methods = s
tr_
dup (PopAuthenticators);
method = methods;
while (method) {
method = methods;
while (method) {
@@
-349,7
+350,7
@@
pop_query_status pop_authenticate (POP_DATA * pop_data)
method = comma;
}
method = comma;
}
-
FREE
(&methods);
+
mem_free
(&methods);
}
else {
/* Fall back to default: any authenticator */
}
else {
/* Fall back to default: any authenticator */