static void pop3_checkr(const char *fmt, const char *param, char **ret)
{
- const char *msg = command(fmt, param);
+ char *msg = send_mail_command(fmt, param);
char *answer = xmalloc_fgetline(stdin);
if (answer && '+' == answer[0]) {
+ free(msg);
if (timeout)
alarm(0);
if (ret) {
free(answer);
return;
}
- bb_error_msg_and_die("%s failed: %s", msg, answer);
+ bb_error_msg_and_die("%s failed, reply was: %s", msg, answer);
}
static void pop3_check(const char *fmt, const char *param)
s[1] = '\0';
// get md5 sum of "<stamp>password" string
md5_begin(&md5.ctx);
- md5_hash(buf, strlen(buf), &md5.ctx);
- md5_hash(G.pass, strlen(G.pass), &md5.ctx);
- md5_end(res, &md5.ctx);
+ md5_hash(&md5.ctx, buf, strlen(buf));
+ md5_hash(&md5.ctx, G.pass, strlen(G.pass));
+ md5_end(&md5.ctx, res);
*bin2hex(md5.hex, (char*)res, 16) = '\0';
// APOP
s = xasprintf("%s %s", G.user, md5.hex);