aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Harning Jr <harningt@gmail.com>2011-01-15 20:11:54 -0500
committerThomas Harning Jr <harningt@gmail.com>2011-01-15 20:11:54 -0500
commit01e03565ef64b4e6970bf502dd6bb2f248e90b53 (patch)
tree97d2c852579f79d1bd5800c9be3ab02bf51a3d6b
parent1273235c989166c8de728f74af93f50da7bcbd89 (diff)
downloadluaevent-prosody-01e03565ef64b4e6970bf502dd6bb2f248e90b53.tar.gz
luaevent-prosody-01e03565ef64b4e6970bf502dd6bb2f248e90b53.zip
bufferevent unlearns read access to low-level timeout/watermark properties that appear shouldn't be exposed
-rw-r--r--doc/modules/luaevent.core.bufferevent.mdwn12
-rw-r--r--src/buffer_event.c35
2 files changed, 0 insertions, 47 deletions
diff --git a/doc/modules/luaevent.core.bufferevent.mdwn b/doc/modules/luaevent.core.bufferevent.mdwn
index 842ee06..5115bb8 100644
--- a/doc/modules/luaevent.core.bufferevent.mdwn
+++ b/doc/modules/luaevent.core.bufferevent.mdwn
@@ -43,24 +43,12 @@ Functions:
* `low` - When buffer is below this, the event will be fired
* `high` - N/A to libevent, user app may use this
-## bufferevent:get_read_watermarks
-* Output: `low, high`
-* See `set_read_watermarks`
-
-## bufferevent:get_write_watermarks
-* Output: `low, high`
-* See `set_write_watermarks`
-
## bufferevent:set_timeouts
* Sets timeouts for the bufferevent's events
* Input: `(read, write)`
* `read` - Read readiness timeout
* `write` - Write readiness timeout
-## bufferevent:get_timeouts
-* Output: `read, write`
-* See `set_timeouts`
-
## bufferevent:enable/disable
* Input: `event flag`
* `event flag` - `EV_READ`, `EV_WRITE`, or `EV_READ|EV_WRITE`
diff --git a/src/buffer_event.c b/src/buffer_event.c
index 0aab636..debc54a 100644
--- a/src/buffer_event.c
+++ b/src/buffer_event.c
@@ -171,24 +171,6 @@ static int buffer_event_set_write_watermarks(lua_State* L) {
return 0;
}
-static int buffer_event_get_read_watermarks(lua_State* L) {
- le_bufferevent* ev = buffer_event_get(L, 1);
- if(!ev->ev) return 0;
-
- lua_pushinteger(L, ev->ev->wm_read.low);
- lua_pushinteger(L, ev->ev->wm_read.high);
- return 2;
-}
-
-static int buffer_event_get_write_watermarks(lua_State* L) {
- le_bufferevent* ev = buffer_event_get(L, 1);
- if(!ev->ev) return 0;
-
- lua_pushinteger(L, ev->ev->wm_write.low);
- lua_pushinteger(L, ev->ev->wm_write.high);
- return 2;
-}
-
static int buffer_event_set_timeouts(lua_State* L) {
int timeout_read, timeout_write;
le_bufferevent* ev = buffer_event_get(L, 1);
@@ -201,20 +183,6 @@ static int buffer_event_set_timeouts(lua_State* L) {
return 0;
}
-static int buffer_event_get_timeouts(lua_State* L) {
- le_bufferevent* ev = buffer_event_get(L, 1);
- if(!ev->ev) return 0;
-
-#if LIBEVENT_VERSION_NUMBER >= 0x02000000
- lua_pushinteger(L, (ev->ev->timeout_read).tv_sec);
- lua_pushinteger(L, (ev->ev->timeout_write).tv_sec);
-#else
- lua_pushinteger(L, ev->ev->timeout_read);
- lua_pushinteger(L, ev->ev->timeout_write);
-#endif
- return 2;
-}
-
static int buffer_event_enable(lua_State* L) {
le_bufferevent* ev = buffer_event_get(L, 1);
if(!ev->ev) return 0;
@@ -236,10 +204,7 @@ static luaL_Reg buffer_event_funcs[] = {
{"get_write", buffer_event_get_write},
{"set_read_watermarks", buffer_event_set_read_watermarks},
{"set_write_watermarks", buffer_event_set_write_watermarks},
- {"get_read_watermarks", buffer_event_get_read_watermarks},
- {"get_write_watermarks", buffer_event_get_write_watermarks},
{"set_timeouts", buffer_event_set_timeouts},
- {"get_timeouts", buffer_event_get_timeouts},
{"enable", buffer_event_enable},
{"disable", buffer_event_disable},
{NULL, NULL}