From 90abc074b2f911f9afc6e321f17fcc0c8570fb95 Mon Sep 17 00:00:00 2001 From: Thomas Harning Jr Date: Sat, 15 Jan 2011 20:12:24 -0500 Subject: bufferevent learns to set watermarking using write-accessor functions rather than low-level access --- src/buffer_event.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/buffer_event.c b/src/buffer_event.c index debc54a..8a663bc 100644 --- a/src/buffer_event.c +++ b/src/buffer_event.c @@ -153,8 +153,7 @@ static int buffer_event_set_read_watermarks(lua_State* L) { low = lua_tonumber(L, 2); high = lua_tonumber(L, 3); - ev->ev->wm_read.low = low; - ev->ev->wm_read.high = high; + bufferevent_setwatermark(ev->ev, EV_READ, low, high); return 0; } @@ -166,8 +165,7 @@ static int buffer_event_set_write_watermarks(lua_State* L) { low = lua_tonumber(L, 2); high = lua_tonumber(L, 3); - ev->ev->wm_write.low = low; - ev->ev->wm_write.high = high; + bufferevent_setwatermark(ev->ev, EV_WRITE, low, high); return 0; } -- cgit v1.2.3