Skip to content

Commit

Permalink
Bug fix for pollset module
Browse files Browse the repository at this point in the history
  • Loading branch information
xolox committed Nov 3, 2011
1 parent 9bdbe8e commit a39bbf8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/apr.lua
Expand Up @@ -14,7 +14,7 @@
--]]
local apr = require 'apr.core'
apr._VERSION = '0.21.1'
apr._VERSION = '0.21.2'
-- apr.md5(input [, binary]) -> digest {{{1
--
Expand Down
3 changes: 2 additions & 1 deletion src/pollset.c
@@ -1,7 +1,7 @@
/* Pollset module for the Lua/APR binding.
*
* Author: Peter Odding <peter@peterodding.com>
* Last Change: November 2, 2011
* Last Change: November 4, 2011
* Homepage: http://peterodding.com/code/lua/apr/
* License: MIT
*
Expand Down Expand Up @@ -136,6 +136,7 @@ static int pollset_remove(lua_State *L)
apr_status_t status;

object = check_object(L, 1, &lua_apr_pollset_type);
socket = check_object(L, 2, &lua_apr_socket_type);
pollfd = find_fd(object, socket);
if (pollfd != NULL) {
/* Remove it from the pollset. */
Expand Down
7 changes: 6 additions & 1 deletion test/pollset.lua
Expand Up @@ -3,7 +3,7 @@
Unit tests for the pollset module of the Lua/APR binding.
Author: Peter Odding <peter@peterodding.com>
Last Change: November 1, 2011
Last Change: November 4, 2011
Homepage: http://peterodding.com/code/lua/apr/
License: MIT
Expand All @@ -26,4 +26,9 @@ assert(server:listen(10))
-- Add the server socket to the pollset.
assert(pollset:add(server, 'input'))
-- TODO Write a test that operates parallel network connections without multi threading.
-- Remove the server socket from the pollset.
assert(pollset:remove(server))
-- vim: ts=2 sw=2 et tw=79 fen fdm=marker

0 comments on commit a39bbf8

Please sign in to comment.