atexit(kill_helper);
}
-const FAST_FUNC char *command(const char *fmt, const char *param)
+char* FAST_FUNC send_mail_command(const char *fmt, const char *param)
{
- const char *msg = fmt;
+ char *msg;
if (timeout)
alarm(timeout);
- if (msg) {
+ msg = (char*)fmt;
+ if (fmt) {
msg = xasprintf(fmt, param);
+ if (verbose)
+ bb_error_msg("send:'%s'", msg);
printf("%s\r\n", msg);
}
fflush_all();
// NB: parse_url can modify url[] (despite const), but only if '@' is there
/*
-static char FAST_FUNC *parse_url(char *url, char **user, char **pass)
+static char* FAST_FUNC parse_url(char *url, char **user, char **pass)
{
// parse [user[:pass]@]host
// return host
SRC_BUF_SIZE = 45, /* This *MUST* be a multiple of 3 */
DST_BUF_SIZE = 4 * ((SRC_BUF_SIZE + 2) / 3),
};
-
#define src_buf text
+ char src[SRC_BUF_SIZE];
FILE *fp = fp;
ssize_t len = len;
char dst_buf[DST_BUF_SIZE + 1];
if (fname) {
fp = (NOT_LONE_DASH(fname)) ? xfopen_for_read(fname) : (FILE *)text;
- src_buf = bb_common_bufsiz1;
- // N.B. strlen(NULL) segfaults!
+ src_buf = src;
} else if (text) {
// though we do not call uuencode(NULL, NULL) explicitly
// still we do not want to break things suddenly