[asterisk-commits] dlee: trunk r397310 - in /trunk: ./ main/http.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Aug 21 12:12:32 CDT 2013
Author: dlee
Date: Wed Aug 21 12:12:30 2013
New Revision: 397310
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=397310
Log:
Complete http_shutdown.
This patch frees up some resources allocated in http.c.
* tcp listeners stopped
* tls settings freed
* uri redirects freed
* unregister internal http.c uri's
(closes issue ASTERISK-22237)
Reported by: Corey Farrell
Patches:
http.patch uploaded by Corey Farrell (license 5909)
........
Merged revisions 397308 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 397309 from http://svn.asterisk.org/svn/asterisk/branches/11
Modified:
trunk/ (props changed)
trunk/main/http.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.
Modified: trunk/main/http.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/http.c?view=diff&rev=397310&r1=397309&r2=397310
==============================================================================
--- trunk/main/http.c (original)
+++ trunk/main/http.c Wed Aug 21 12:12:30 2013
@@ -1334,7 +1334,25 @@
static void http_shutdown(void)
{
+ struct http_uri_redirect *redirect;
ast_cli_unregister_multiple(cli_http, ARRAY_LEN(cli_http));
+
+ ast_tcptls_server_stop(&http_desc);
+ if (http_tls_cfg.enabled) {
+ ast_tcptls_server_stop(&https_desc);
+ }
+ ast_free(http_tls_cfg.certfile);
+ ast_free(http_tls_cfg.pvtfile);
+ ast_free(http_tls_cfg.cipher);
+
+ ast_http_uri_unlink(&statusuri);
+ ast_http_uri_unlink(&staticuri);
+
+ AST_RWLIST_WRLOCK(&uri_redirects);
+ while ((redirect = AST_RWLIST_REMOVE_HEAD(&uri_redirects, entry))) {
+ ast_free(redirect);
+ }
+ AST_RWLIST_UNLOCK(&uri_redirects);
}
int ast_http_init(void)
More information about the asterisk-commits
mailing list