tcsetattr(fp, TCSANOW, &term);
}
// now we check for optional args
+ tmp = strstr(arg, "-r ");
+ if (tmp) {
+ tmp += 3;
+ sscanf(tmp, "%u", &mail->retries);
+ } else {
+ mail->retries = 5; // 5 retries after failure
+ }
tmp = strstr(arg, "-i ");
if (tmp) {
tmp += 3;
exit(1);
}
#endif /* HAVE_GETHOSTBYNAME_R */
- while (fail < 5) {
+ while (fail < mail->retries) {
struct timeval timeout;
int res;
fd_set fdset;
exit(1);
}
#endif /* HAVE_GETHOSTBYNAME_R */
- while (fail < 5) {
+ while (fail < mail->retries) {
struct timeval timeout;
int res;
fd_set fdset;