projects
/
lcr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LCR now runs as a user.
[lcr.git]
/
mail.c
diff --git
a/mail.c
b/mail.c
index
d4c6441
..
9acd145
100644
(file)
--- a/
mail.c
+++ b/
mail.c
@@
-9,16
+9,6
@@
** **
\*****************************************************************************/
** **
\*****************************************************************************/
-#include <stdio.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <sys/resource.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-//#include <poll.h>
#include "main.h"
static char *months[] = {
#include "main.h"
static char *months[] = {
@@
-179,8
+169,7
@@
static void *mail_child(void *arg)
PDEBUG(DEBUG_EPOINT, "child process done for sending a mail\n");
/* exit process */
PDEBUG(DEBUG_EPOINT, "child process done for sending a mail\n");
/* exit process */
- memset(args, 0, sizeof(struct mail_args));
- free(args);
+ FREE(args, sizeof(struct mail_args));
amemuse--;
return(NULL);
}
amemuse--;
return(NULL);
}
@@
-190,12
+179,7
@@
void send_mail(char *filename, char *callerid, char *callerintern, char *callern
struct mail_args *arg;
pthread_t tid;
struct mail_args *arg;
pthread_t tid;
- arg = (struct mail_args *)calloc(1, sizeof(struct mail_args));
- if (!arg)
- {
- PERROR("failed to alloc memory.\n");
- return;
- }
+ arg = (struct mail_args *)MALLOC(sizeof(struct mail_args));
amemuse++;
SCPY(arg->email, vbox_email);
amemuse++;
SCPY(arg->email, vbox_email);