env:connect wasn't leaving the connection object in an officially open state

This commit is contained in:
blumf 2009-07-30 11:25:48 +00:00
parent c49378b160
commit dce61d4704

View File

@ -957,6 +957,7 @@ static int env_connect (lua_State *L) {
res_conn = (conn_data*)lua_newuserdata(L, sizeof(conn_data)); res_conn = (conn_data*)lua_newuserdata(L, sizeof(conn_data));
luasql_setmeta (L, LUASQL_CONNECTION_FIREBIRD); luasql_setmeta (L, LUASQL_CONNECTION_FIREBIRD);
memcpy(res_conn, &conn, sizeof(conn_data)); memcpy(res_conn, &conn, sizeof(conn_data));
res_conn->closed = 0; /* connect now officially open */
/* register the connection */ /* register the connection */
lua_registerobj(L, 1, env); lua_registerobj(L, 1, env);