Changeset 45bd56a in code


Ignore:
Timestamp:
Mar 5, 2014, 4:02:49 PM (11 years ago)
Author:
Mike Belopuhov <mike@…>
Branches:
master
Children:
a5893e9
Parents:
55923b7
Message:

logger will do its own time accounting; from the discussion with florian

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • icb.c

    r55923b7 r45bd56a  
    235235        buf[0] = buflen;
    236236
    237         logger(time(NULL), ig->name, is->nick, msg);
     237        logger(ig->name, is->nick, msg);
    238238
    239239        LIST_FOREACH(s, &ig->sess, entry) {
  • icbd.h

    r55923b7 r45bd56a  
    3434/* logger.c */
    3535int     logger_init(void);
    36 void    logger(time_t, char *, char *, char *);
     36void    logger(char *, char *, char *);
  • logger.c

    r55923b7 r45bd56a  
    2020#include <sys/time.h>
    2121#include <sys/uio.h>
    22 #include <netinet/in.h>
    23 #include <arpa/inet.h>
    2422#include <errno.h>
    2523#include <stdlib.h>
     
    3230#include <event.h>
    3331#include <pwd.h>
    34 #include <netdb.h>
    3532
    3633#include "icb.h"
     
    4239
    4340struct icbd_logentry {
    44         time_t  timestamp;
    4541        char    group[ICB_MAXGRPLEN];
    4642        char    nick[ICB_MAXNICKLEN];
     
    141137
    142138void
    143 logger(time_t timestamp, char *group, char *nick, char *what)
     139logger(char *group, char *nick, char *what)
    144140{
    145141        struct icbd_logentry e;
    146142        struct iovec iov[2];
    147143
    148         e.timestamp = timestamp;
    149144        strlcpy(e.group, group, ICB_MAXGRPLEN);
    150145        strlcpy(e.nick, nick, ICB_MAXNICKLEN);
Note: See TracChangeset for help on using the changeset viewer.