r17233 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r17232‎ | r17233 | r17234 >
Date:02:24, 24 October 2006
Author:river
Status:old
Tags:
Comment:
current_time_str was not being updated
Modified paths:
  • /trunk/willow/src/willow/wnet.cc (modified) (history)

Diff [purge]

Index: trunk/willow/src/willow/wnet.cc
@@ -70,6 +70,7 @@
7171 static void wnet_sendfile_do(struct fde *);
7272
7373 static void readbuf_reset(struct readbuf *);
 74+static void secondly_sched(void);
7475
7576 struct fde *fde_table;
7677 int max_fd;
@@ -84,6 +85,26 @@
8586 awaks.push_back(s);
8687 }
8788
 89+event secondly_ev;
 90+timeval secondly_tv;
 91+
 92+static void
 93+secondly_update(int, short, void *)
 94+{
 95+ wnet_set_time();
 96+ secondly_sched();
 97+}
 98+
 99+static void
 100+secondly_sched(void)
 101+{
 102+ secondly_tv.tv_usec = 0;
 103+ secondly_tv.tv_sec = 1;
 104+ evtimer_set(&secondly_ev, secondly_update, NULL);
 105+ event_base_set(evb, &secondly_ev);
 106+ event_add(&secondly_ev, &secondly_tv);
 107+}
 108+
88109 void
89110 wnet_init(void)
90111 {
@@ -119,6 +140,7 @@
120141 }
121142 wlog(WLOG_NOTICE, "wnet: initialised, using libevent %s (%s)",
122143 event_get_version(), event_get_method());
 144+ secondly_sched();
123145 }
124146
125147 void