diff options
author | Richard Mudgett <rmudgett@digium.com> | 2015-08-18 16:06:54 -0500 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2015-08-18 16:49:48 -0500 |
commit | 77518d54344945d7d3bfc1ebfe61d97704fa5dfa (patch) | |
tree | 16861f7833f686e57a10a967c34e896f7a7d6fb0 /res/res_http_websocket.c | |
parent | ab373f2ceffcad3a497663027199f4f4a81f644b (diff) |
res_http_websocket.c: Fix some off nominal path cleanup.
* Remove extraneous unlock on off-nominal path.
* Add missing HTTP error reply.
Change-Id: I1f402bfe448fba8696b507477cab5f060ccd9b2b
Diffstat (limited to 'res/res_http_websocket.c')
-rw-r--r-- | res/res_http_websocket.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_http_websocket.c b/res/res_http_websocket.c index c2d1b1850..b6baa3cf9 100644 --- a/res/res_http_websocket.c +++ b/res/res_http_websocket.c @@ -207,7 +207,6 @@ int AST_OPTIONAL_API_NAME(ast_websocket_server_add_protocol)(struct ast_websocke protocol = ast_websocket_sub_protocol_alloc(name); if (!protocol) { - ao2_unlock(server->protocols); return -1; } protocol->session_established = callback; @@ -824,6 +823,7 @@ int AST_OPTIONAL_API_NAME(ast_websocket_uri_cb)(struct ast_tcptls_session_instan && protocol_handler->session_attempted(ser, get_vars, headers)) { ast_debug(3, "WebSocket connection from '%s' rejected by protocol handler '%s'\n", ast_sockaddr_stringify(&ser->remote_address), protocol_handler->name); + websocket_bad_request(ser); ao2_ref(protocol_handler, -1); return 0; } |