aboutsummaryrefslogtreecommitdiffstats
path: root/pop3.c
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2006-03-15 17:05:25 +0000
committerMatthias Andree <matthias.andree@gmx.de>2006-03-15 17:05:25 +0000
commitc3e52ea6ca3178b7ecab4b389a9ba9269662b48f (patch)
tree92010dbf827948300ec59549600f86eac09ca9b0 /pop3.c
parent10ad1196e3f7f240a231e91d7cb2a612da3d6b4e (diff)
downloadfetchmail-c3e52ea6ca3178b7ecab4b389a9ba9269662b48f.tar.gz
fetchmail-c3e52ea6ca3178b7ecab4b389a9ba9269662b48f.tar.bz2
fetchmail-c3e52ea6ca3178b7ecab4b389a9ba9269662b48f.zip
Further cleanups to compile with C++ compiler.
svn path=/branches/BRANCH_6-3/; revision=4744
Diffstat (limited to 'pop3.c')
-rw-r--r--pop3.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/pop3.c b/pop3.c
index ff68f614..4456b2d3 100644
--- a/pop3.c
+++ b/pop3.c
@@ -23,7 +23,13 @@
#include "i18n.h"
#ifdef OPIE_ENABLE
+#ifdef __cplusplus
+extern "C" {
+#endif
#include <opie.h>
+#ifdef __cplusplus
+}
+#endif
#endif /* OPIE_ENABLE */
/* global variables: please reinitialize them explicitly for proper
@@ -533,8 +539,10 @@ static int pop3_getauth(int sock, struct query *ctl, char *greeting)
if ((challenge = strstr(lastok, "otp-"))) {
char response[OPIE_RESPONSE_MAX+1];
int i;
+ char *n = xstrdup("");
- i = opiegenerator(challenge, !strcmp(ctl->password, "opie") ? "" : ctl->password, response);
+ i = opiegenerator(challenge, !strcmp(ctl->password, "opie") ? n : ctl->password, response);
+ free(n);
if ((i == -2) && !run.poll_interval) {
char secret[OPIE_SECRET_MAX+1];
fprintf(stderr, GT_("Secret pass phrase: "));