From 1c59946d7ad79f493b933180441a4c211cdbec57 Mon Sep 17 00:00:00 2001 From: david Date: Wed, 21 Nov 2007 02:31:07 +0000 Subject: [PATCH] Throw an exception instead of calling luaL_argerror in l_nsock_connect when an SSL connection is requested but OpenSSL isn't available. --- nse_nsock.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nse_nsock.cc b/nse_nsock.cc index 03f6c4e82..d5ad580bb 100644 --- a/nse_nsock.cc +++ b/nse_nsock.cc @@ -300,8 +300,9 @@ static int l_nsock_connect(lua_State* l) { udata->ssl_session); break; #else - luaL_argerror(l, 4, "Sorry, you don't have OpenSSL."); - return 0; + lua_pushboolean(l, false); + lua_pushstring(l, "Sorry, you don't have OpenSSL\n"); + return 2; #endif default: goto error;