Don't attempt a websocket protocol removal if res_http_websocket isn't there
authorMatthew Jordan <mjordan@digium.com>
Mon, 8 Apr 2013 15:38:34 +0000 (15:38 +0000)
committerMatthew Jordan <mjordan@digium.com>
Mon, 8 Apr 2013 15:38:34 +0000 (15:38 +0000)
commita5df2542c34544d4a274303c0c26581dbca5c301
treeb04f265c3e97be56492e65b4a48a6eb572c0ac93
parentb8d4e573f1292688d07063542d263490536c2bc9
Don't attempt a websocket protocol removal if res_http_websocket isn't there

This patch sets the protocols container provided by res_http_websocket to NULL
when the module gets unloaded and adds the necessary checks when adding/
removing a websocket protocol. This prevents some FRACKing on an invalid
pointer to the disposed container if a module that uses res_http_websocket is
unloaded after it.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384942 65c4cc65-6c06-0410-ace0-fbb531ad65f3
res/res_http_websocket.c
res/res_stasis_websocket.c