Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bug fix for pollset module

  • Loading branch information...
commit a39bbf8cab71009617b62446af07a64adc2c8f85 1 parent 9bdbe8e
@xolox authored
Showing with 9 additions and 3 deletions.
  1. +1 −1  src/apr.lua
  2. +2 −1  src/pollset.c
  3. +6 −1 test/pollset.lua
View
2  src/apr.lua
@@ -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
--
View
3  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
*
@@ -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. */
View
7 test/pollset.lua
@@ -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
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.