aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Harning Jr <harningt@gmail.com>2011-01-15 20:12:24 -0500
committerThomas Harning Jr <harningt@gmail.com>2011-01-15 20:12:24 -0500
commit90abc074b2f911f9afc6e321f17fcc0c8570fb95 (patch)
treebf3de7c563d44cbac99e51438ae260d2197a9433
parent01e03565ef64b4e6970bf502dd6bb2f248e90b53 (diff)
downloadluaevent-prosody-90abc074b2f911f9afc6e321f17fcc0c8570fb95.tar.gz
luaevent-prosody-90abc074b2f911f9afc6e321f17fcc0c8570fb95.zip
bufferevent learns to set watermarking using write-accessor functions rather than low-level access
-rw-r--r--src/buffer_event.c6
1 files 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;
}