diff options
author | Luciano Iam <lucianito@gmail.com> | 2020-02-22 13:57:03 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2020-02-22 23:10:25 +0100 |
commit | 7f73cfb36ed48f116eb128baf2c4d17aa93ca8d7 (patch) | |
tree | f4ed410f6b7fab497144f5ac330bb8aeb96d8ef0 /libs/surfaces | |
parent | 047b05b86074e67b4742de4634efafd94c2dc0bf (diff) |
Properly initialize lws config structs
Diffstat (limited to 'libs/surfaces')
-rw-r--r-- | libs/surfaces/websockets/server.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/surfaces/websockets/server.cc b/libs/surfaces/websockets/server.cc index 7c447bc419..ad8c816dd5 100644 --- a/libs/surfaces/websockets/server.cc +++ b/libs/surfaces/websockets/server.cc @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ - +#define DEBUG #ifdef DEBUG #include <iostream> #endif @@ -31,6 +31,7 @@ WebsocketsServer::WebsocketsServer (ArdourSurface::ArdourWebsockets& surface) { // keep references to all config for libwebsockets 2 lws_protocols proto; + memset (&proto, 0, sizeof(lws_protocols)); proto.name = "lws-ardour"; proto.callback = WebsocketsServer::lws_callback; proto.per_session_data_size = 0; @@ -43,6 +44,7 @@ WebsocketsServer::WebsocketsServer (ArdourSurface::ArdourWebsockets& surface) _lws_proto[0] = proto; memset (&_lws_proto[1], 0, sizeof(lws_protocols)); + memset (&_lws_info, 0, sizeof(lws_context_creation_info)); _lws_info.port = WEBSOCKET_LISTEN_PORT; _lws_info.protocols = _lws_proto; _lws_info.uid = -1; |