diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2016-01-09 06:19:54 +0100 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2016-01-09 06:19:54 +0100 |
commit | 32f719dec7374658c8637a44237879b75984f288 (patch) | |
tree | ab72fafe96d763336c1f58c8d39980acf1bacdae | |
parent | 0b92e9210cef90a74189ac23a68766636c159fb1 (diff) | |
download | xK-32f719dec7374658c8637a44237879b75984f288.tar.gz xK-32f719dec7374658c8637a44237879b75984f288.tar.xz xK-32f719dec7374658c8637a44237879b75984f288.zip |
degesch: Lua: pass hostname to on_connected
-rw-r--r-- | degesch.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 |