X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=opie.c;h=4b8ad4f3ead2ce5fc158f31c518ff218432f3abc;hb=910d5a2f852edb8c4e54c0e875da6a90385ab790;hp=6c2018e43ac9c6ac6a18e18806043253d139f7ff;hpb=7cfdaf3256f7957cc03ab6f9fe908b5524e2b876;p=~andy%2Ffetchmail diff --git a/opie.c b/opie.c index 6c2018e4..4b8ad4f3 100644 --- a/opie.c +++ b/opie.c @@ -8,19 +8,23 @@ #include #include #include -#if defined(STDC_HEADERS) #include -#endif #include "fetchmail.h" #include "socket.h" -#include "i18n.h" -#include "md5.h" +#include "gettext.h" +#include "fm_md5.h" #ifdef OPIE_ENABLE +#ifdef __cplusplus +extern "C" { +#endif #include +#ifdef __cplusplus +} +#endif -int do_otp(int sock, char *command, struct query *ctl) +int do_otp(int sock, const char *command, struct query *ctl) { int i, rval; char buffer[128]; @@ -39,7 +43,7 @@ int do_otp(int sock, char *command, struct query *ctl) to64frombits(buffer, ctl->remotename, strlen(ctl->remotename)); suppress_tags = TRUE; - gen_send(sock, buffer, sizeof(buffer)); + gen_send(sock, "%s", buffer); suppress_tags = FALSE; if ((rval = gen_recv(sock, buffer, sizeof(buffer)))) @@ -66,14 +70,14 @@ int do_otp(int sock, char *command, struct query *ctl) to64frombits(buffer, response, strlen(response)); suppress_tags = TRUE; - gen_send(sock, buffer, strlen(buffer)); + gen_send(sock, "%s", buffer); suppress_tags = FALSE; if ((rval = gen_recv(sock, buffer, sizeof(buffer)))) return rval; return PS_SUCCESS; -}; +} #endif /* OPIE_ENABLE */ /* opie.c ends here */