"January", "February", "March", "April", "Mai", "June", "July",
"August", "September", "October", "November", "December"
};
"January", "February", "March", "April", "Mai", "June", "July",
"August", "September", "October", "November", "December"
};
PDEBUG(DEBUG_EPOINT, "child process started for sending a mail\n");
/* lower priority to keep pbx running fluently */
PDEBUG(DEBUG_EPOINT, "child process started for sending a mail\n");
/* lower priority to keep pbx running fluently */
memset(&schedp, 0, sizeof(schedp));
schedp.sched_priority = 0;
ret = sched_setscheduler(0, SCHED_OTHER, &schedp);
memset(&schedp, 0, sizeof(schedp));
schedp.sched_priority = 0;
ret = sched_setscheduler(0, SCHED_OTHER, &schedp);
/* open process */
SPRINT(command, "%s -f%s %s", SENDMAIL, options.email, email);
/* open process */
SPRINT(command, "%s -f%s %s", SENDMAIL, options.email, email);
fprintf(ph, "\n * date: %s %d %d %d:%02d\n\n", months[mon], mday, year+1900, hour, min);
/* attach audio file */
fprintf(ph, "\n * date: %s %d %d %d:%02d\n\n", months[mon], mday, year+1900, hour, min);
/* attach audio file */
while(strchr(filename, '/'))
filename = strchr(filename, '/')+1;
fprintf(ph, "--next_part\n");
while(strchr(filename, '/'))
filename = strchr(filename, '/')+1;
fprintf(ph, "--next_part\n");
fprintf(ph, "Content-Transfer-Encoding: base64\nContent-Disposition: inline;\n\tfilename=\"%s\"\n\n", filename);
/* stream from disk and encode */
fprintf(ph, "Content-Transfer-Encoding: base64\nContent-Disposition: inline;\n\tfilename=\"%s\"\n\n", filename);
/* stream from disk and encode */
/* read exactly one line */
cnt = read(fh, rbuf, 54);
if (cnt <= 0)
break;
/* encode */
n = cnt;
/* read exactly one line */
cnt = read(fh, rbuf, 54);
if (cnt <= 0)
break;
/* encode */
n = cnt;
SPRINT(buffer, "-Error- Failed to read audio file: '%s'.\n\n", filename);
fprintf(ph, "%s", buffer);
PERROR("%s", buffer);
SPRINT(buffer, "-Error- Failed to read audio file: '%s'.\n\n", filename);
fprintf(ph, "%s", buffer);
PERROR("%s", buffer);
SCPY(arg->callername, callername);
SCPY(arg->terminal, terminal);
SCPY(arg->callername, callername);
SCPY(arg->terminal, terminal);
- if ((pthread_create(&tid, NULL, mail_child, arg)<0))
- {
+ if ((pthread_create(&tid, NULL, mail_child, arg)<0)) {