aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--degesch.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/degesch.c b/degesch.c
index 11f148d..6aa1667 100644
--- a/degesch.c
+++ b/degesch.c
@@ -8410,8 +8410,7 @@ lua_connector_on_connected (void *user_data, int socket, const char *hostname)
{
struct lua_connector *self = user_data;
- // TODO: use this for SNI once TLS is implemented
- (void) hostname;
+ // TODO: use the hostname for SNI once TLS is implemented
if (self->ref_on_success != LUA_REFNIL)
{
@@ -8419,9 +8418,10 @@ lua_connector_on_connected (void *user_data, int socket, const char *hostname)
lua_rawgeti (L, LUA_REGISTRYINDEX, self->ref_on_success);
struct lua_connection *connection =
lua_plugin_push_connection (self->plugin, socket); // 1: connection
+ lua_pushstring (L, hostname); // 2: hostname
struct error *e = NULL;
- if (!lua_plugin_call (self->plugin, 1, 0, &e))
+ if (!lua_plugin_call (self->plugin, 2, 0, &e))
{
lua_plugin_log_error (self->plugin, "connector on_success", e);
// The connection has placed itself in the cache