unsigned long id;
long flags;
- time_t posted;
+ unsigned long posted;
char posted_s[24];
unsigned long duration;
static struct service *global_service;
static struct globalMessage *messageList;
static long messageCount;
-static time_t last_max_alert;
+static unsigned long last_max_alert;
static struct log_type *G_LOG;
static struct
void message_expire(void *data);
static struct globalMessage*
-message_add(long flags, time_t posted, unsigned long duration, char *from, const char *msg)
+message_add(long flags, unsigned long posted, unsigned long duration, char *from, const char *msg)
{
struct globalMessage *message;
- struct tm tm;
+ time_t feh;
message = malloc(sizeof(struct globalMessage));
if(!message)
message->message = strdup(msg);
if ((flags & MESSAGE_OPTION_IMMEDIATE) == 0) {
- localtime_r(&message->posted, &tm);
+ feh = message->posted;
strftime(message->posted_s, sizeof(message->posted_s),
- "%I:%M %p, %m/%d/%Y", &tm);
+ "%I:%M %p, %m/%d/%Y", localtime(&feh));
}
if(messageList)
global_saxdb_read(struct dict *db)
{
struct record_data *hir;
- time_t posted;
+ unsigned long posted;
long flags;
unsigned long duration;
char *str, *from, *message;