diff options
author | Thomas Harning Jr <harningt@gmail.com> | 2011-01-15 20:32:15 -0500 |
---|---|---|
committer | Thomas Harning Jr <harningt@gmail.com> | 2011-01-15 20:32:15 -0500 |
commit | 5ec63dfcc62a70be811e2abd09e372113500beec (patch) | |
tree | 20a7198cd5012bb1fcde84643ca98e93eb720706 | |
parent | 938d68fa73d5ded18d33dcf40077e627fd2b975a (diff) | |
parent | d1c516f4beb47e79fb886e46a4b6e0cf432d850a (diff) | |
download | luaevent-prosody-5ec63dfcc62a70be811e2abd09e372113500beec.tar.gz luaevent-prosody-5ec63dfcc62a70be811e2abd09e372113500beec.zip |
Merge remote branch 'jsnyder-tree/master'
Conflicts:
CHANGELOG
Makefile
README
-rw-r--r-- | CHANGELOG | 3 | ||||
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | src/buffer_event.c | 2 | ||||
-rw-r--r-- | src/event_buffer.c | 3 | ||||
-rw-r--r-- | src/luaevent.c | 4 |
5 files changed, 11 insertions, 7 deletions
@@ -4,6 +4,9 @@ * Removes low-level read access to watermark & timeout values that break API * Switches to watermark write accessor function to avoid API break ====== +luaevent-prosody 0.1.1 - 2010-02-25 + * Fix overflow with high event timeouts +====== luaevent-prosody 0.1.0 - 2010-02-15 * Fixed stack slot leak in event callbacks * Fixed stack slot leak when error occurs in callback @@ -23,8 +23,10 @@ all: $(CC) $(LDFLAGS) -o $(LIB) *.o -L$(LUA_LIB_DIR) -l$(LUA_LIB) -levent install: all - $(INSTALL_DATA) -D lua/luaevent.lua $(DESTDIR)$(INSTALL_DIR_LUA)/luaevent.lua - $(INSTALL_PROGRAM) -D $(LIB) $(DESTDIR)$(INSTALL_DIR_BIN)/luaevent/$(LIB) + mkdir -p $(DESTDIR)$(INSTALL_DIR_LUA) + $(INSTALL_DATA) lua/luaevent.lua $(DESTDIR)$(INSTALL_DIR_LUA)/luaevent.lua + mkdir -p $(DESTDIR)$(INSTALL_DIR_BIN)/luaevent/ + $(INSTALL_PROGRAM) $(LIB) $(DESTDIR)$(INSTALL_DIR_BIN)/luaevent/$(LIB) clean: rm -f *.so diff --git a/src/buffer_event.c b/src/buffer_event.c index 8a663bc..598230f 100644 --- a/src/buffer_event.c +++ b/src/buffer_event.c @@ -1,9 +1,9 @@ /* LuaEvent - Copyright (C) 2007 Thomas Harning <harningt@gmail.com> * Licensed as LGPL - See doc/COPYING for details */ +#include <stdlib.h> #include "buffer_event.h" #include "utility.h" #include <lauxlib.h> -#include <malloc.h> #include "event_buffer.h" #define BUFFER_EVENT_MT "BUFFER_EVENT_MT" diff --git a/src/event_buffer.c b/src/event_buffer.c index ea66a94..a61c643 100644 --- a/src/event_buffer.c +++ b/src/event_buffer.c @@ -1,9 +1,8 @@ /* LuaEvent - Copyright (C) 2007 Thomas Harning <harningt@gmail.com> * Licensed as LGPL - See doc/COPYING for details */ - +#include <stdlib.h> #include "event_buffer.h" #include <lauxlib.h> -#include <malloc.h> #define EVENT_BUFFER_MT "EVENT_BUFFER_MT" diff --git a/src/luaevent.c b/src/luaevent.c index 6036cf1..89c295a 100644 --- a/src/luaevent.c +++ b/src/luaevent.c @@ -56,8 +56,8 @@ int getSocketFd(lua_State* L, int idx) { } void load_timeval(double time, struct timeval *tv) { - tv->tv_sec = (int)time; - tv->tv_usec = (int)(time * 1000000) % 1000000; + tv->tv_sec = (int) time; + tv->tv_usec = (int)( (time - tv->tv_sec) * 1000000 ); } /* sock, event, callback, timeout */ |