[svn-commits] russell: branch 1.6.0 r106304 - in /branches/1.6.0: ./ channels/ include/aste...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Mar 5 18:13:11 CST 2008


Author: russell
Date: Wed Mar  5 18:13:10 2008
New Revision: 106304

URL: http://svn.digium.com/view/asterisk?view=rev&rev=106304
Log:
Merged revisions 105785 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
r105785 | russell | 2008-03-04 16:23:21 -0600 (Tue, 04 Mar 2008) | 2 lines

More public API name changes to use an appropriate ast_ prefix

........

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/channels/chan_sip.c
    branches/1.6.0/include/asterisk/tcptls.h
    branches/1.6.0/main/http.c
    branches/1.6.0/main/manager.c
    branches/1.6.0/main/tcptls.c

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
--- trunk-merged (original)
+++ trunk-merged Wed Mar  5 18:13:10 2008
@@ -1,1 +1,1 @@
-/trunk:1-105595,105675,105677,105733-105734,105773,106036,106040,106139
+/trunk:1-105595,105675,105677,105733-105734,105773,105785,106036,106040,106139

Modified: branches/1.6.0/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/channels/chan_sip.c?view=diff&rev=106304&r1=106303&r2=106304
==============================================================================
--- branches/1.6.0/channels/chan_sip.c (original)
+++ branches/1.6.0/channels/chan_sip.c Wed Mar  5 18:13:10 2008
@@ -2075,7 +2075,7 @@
 	.tls_cfg = NULL,
 	.poll_timeout = -1,
 	.name = "sip tcp server",
-	.accept_fn = server_root,
+	.accept_fn = ast_tcptls_server_root,
 	.worker_fn = sip_tcp_worker_fn,
 };
 
@@ -2085,7 +2085,7 @@
 	.tls_cfg = &sip_tls_cfg,
 	.poll_timeout = -1,
 	.name = "sip tls server",
-	.accept_fn = server_root,
+	.accept_fn = ast_tcptls_server_root,
 	.worker_fn = sip_tcp_worker_fn,
 };
 
@@ -2526,7 +2526,7 @@
 		res = sendto(p->socket.fd, data, len, 0, (const struct sockaddr *)dst, sizeof(struct sockaddr_in));
 	else {
 		if (p->socket.ser->f) 
-			res = server_write(p->socket.ser, data, len);
+			res = ast_tcptls_server_write(p->socket.ser, data, len);
 		else
 			ast_debug(1, "No p->socket.ser->f len=%d\n", len);
 	} 
@@ -18120,7 +18120,7 @@
 				ast_copy_string(ca.hostname, p->tohost, sizeof(ca.hostname));
 		}
 	}
-	s->ser = (!s->ser) ? client_start(&ca) : s->ser;
+	s->ser = (!s->ser) ? ast_tcptls_client_start(&ca) : s->ser;
 
 	if (!s->ser) {
 		if (ca.tls_cfg)
@@ -20703,10 +20703,10 @@
 	notify_types = ast_config_load(notify_config, config_flags);
 
 	memcpy(sip_tls_desc.tls_cfg, &default_tls_cfg, sizeof(default_tls_cfg));
-	server_start(&sip_tcp_desc);
-
-	if (ssl_setup(sip_tls_desc.tls_cfg))
-		server_start(&sip_tls_desc);
+	ast_tcptls_server_start(&sip_tcp_desc);
+
+	if (ast_ssl_setup(sip_tls_desc.tls_cfg))
+		ast_tcptls_server_start(&sip_tls_desc);
 	else if (sip_tls_desc.tls_cfg->enabled) {
 		sip_tls_desc.tls_cfg = NULL;
 		ast_log(LOG_WARNING, "SIP TLS server did not load because of errors.\n");
@@ -21395,9 +21395,9 @@
 
 	/* Kill TCP/TLS server threads */
 	if (sip_tcp_desc.master)
-		server_stop(&sip_tcp_desc);
+		ast_tcptls_server_stop(&sip_tcp_desc);
 	if (sip_tls_desc.master)
-		server_stop(&sip_tls_desc);
+		ast_tcptls_server_stop(&sip_tls_desc);
 
 	/* Kill all existing TCP/TLS threads */
 	AST_LIST_LOCK(&threadl);

Modified: branches/1.6.0/include/asterisk/tcptls.h
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/include/asterisk/tcptls.h?view=diff&rev=106304&r1=106303&r2=106304
==============================================================================
--- branches/1.6.0/include/asterisk/tcptls.h (original)
+++ branches/1.6.0/include/asterisk/tcptls.h Wed Mar  5 18:13:10 2008
@@ -154,16 +154,16 @@
 #define LEN_T size_t
 #endif
 
-struct ast_tcptls_server_instance *client_start(struct server_args *desc);
+struct ast_tcptls_server_instance *ast_tcptls_client_start(struct server_args *desc);
 
-void *server_root(void *);
-void server_start(struct server_args *desc);
-void server_stop(struct server_args *desc);
-int ssl_setup(struct ast_tls_config *cfg);
+void *ast_tcptls_server_root(void *);
+void ast_tcptls_server_start(struct server_args *desc);
+void ast_tcptls_server_stop(struct server_args *desc);
+int ast_ssl_setup(struct ast_tls_config *cfg);
 
 void *ast_make_file_from_fd(void *data);
 
-HOOK_T server_read(struct ast_tcptls_server_instance *ser, void *buf, size_t count);
-HOOK_T server_write(struct ast_tcptls_server_instance *ser, void *buf, size_t count);
+HOOK_T ast_tcptls_server_read(struct ast_tcptls_server_instance *ser, void *buf, size_t count);
+HOOK_T ast_tcptls_server_write(struct ast_tcptls_server_instance *ser, void *buf, size_t count);
 
 #endif /* _ASTERISK_SERVER_H */

Modified: branches/1.6.0/main/http.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/main/http.c?view=diff&rev=106304&r1=106303&r2=106304
==============================================================================
--- branches/1.6.0/main/http.c (original)
+++ branches/1.6.0/main/http.c Wed Mar  5 18:13:10 2008
@@ -73,7 +73,7 @@
 	.tls_cfg = NULL,
 	.poll_timeout = -1,
 	.name = "http server",
-	.accept_fn = server_root,
+	.accept_fn = ast_tcptls_server_root,
 	.worker_fn = httpd_helper_thread,
 };
 
@@ -83,7 +83,7 @@
 	.tls_cfg = &http_tls_cfg,
 	.poll_timeout = -1,
 	.name = "https server",
-	.accept_fn = server_root,
+	.accept_fn = ast_tcptls_server_root,
 	.worker_fn = httpd_helper_thread,
 };
 
@@ -1028,9 +1028,9 @@
 	if (strcmp(prefix, newprefix))
 		ast_copy_string(prefix, newprefix, sizeof(prefix));
 	enablestatic = newenablestatic;
-	server_start(&http_desc);
-	if (ssl_setup(https_desc.tls_cfg))
-		server_start(&https_desc);
+	ast_tcptls_server_start(&http_desc);
+	if (ast_ssl_setup(https_desc.tls_cfg))
+		ast_tcptls_server_start(&https_desc);
 
 	return 0;
 }

Modified: branches/1.6.0/main/manager.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/main/manager.c?view=diff&rev=106304&r1=106303&r2=106304
==============================================================================
--- branches/1.6.0/main/manager.c (original)
+++ branches/1.6.0/main/manager.c Wed Mar  5 18:13:10 2008
@@ -3618,7 +3618,7 @@
 	.poll_timeout = 5000,	/* wake up every 5 seconds */
 	.periodic_fn = purge_old_stuff,
 	.name = "AMI server",
-	.accept_fn = server_root,	/* thread doing the accept() */
+	.accept_fn = ast_tcptls_server_root,	/* thread doing the accept() */
 	.worker_fn = session_do,	/* thread handling the session */
 };
 
@@ -3628,7 +3628,7 @@
 	.tls_cfg = &ami_tls_cfg, 
 	.poll_timeout = -1,	/* the other does the periodic cleanup */
 	.name = "AMI TLS server",
-	.accept_fn = server_root,	/* thread doing the accept() */
+	.accept_fn = ast_tcptls_server_root,	/* thread doing the accept() */
 	.worker_fn = session_do,	/* thread handling the session */
 };
 
@@ -3937,9 +3937,9 @@
 
 	manager_event(EVENT_FLAG_SYSTEM, "Reload", "Module: Manager\r\nStatus: %s\r\nMessage: Manager reload Requested\r\n", manager_enabled ? "Enabled" : "Disabled");
 
-	server_start(&ami_desc);
-	if (ssl_setup(amis_desc.tls_cfg))
-		server_start(&amis_desc);
+	ast_tcptls_server_start(&ami_desc);
+	if (ast_ssl_setup(amis_desc.tls_cfg))
+		ast_tcptls_server_start(&amis_desc);
 	return 0;
 }
 

Modified: branches/1.6.0/main/tcptls.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/main/tcptls.c?view=diff&rev=106304&r1=106303&r2=106304
==============================================================================
--- branches/1.6.0/main/tcptls.c (original)
+++ branches/1.6.0/main/tcptls.c Wed Mar  5 18:13:10 2008
@@ -81,7 +81,7 @@
 }
 #endif	/* DO_SSL */
 
-HOOK_T server_read(struct ast_tcptls_server_instance *ser, void *buf, size_t count)
+HOOK_T ast_tcptls_server_read(struct ast_tcptls_server_instance *ser, void *buf, size_t count)
 {
 #ifdef DO_SSL
 	if (ser->ssl)
@@ -90,7 +90,7 @@
 	return read(ser->fd, buf, count);
 }
 
-HOOK_T server_write(struct ast_tcptls_server_instance *ser, void *buf, size_t count)
+HOOK_T ast_tcptls_server_write(struct ast_tcptls_server_instance *ser, void *buf, size_t count)
 {
 #ifdef DO_SSL
 	if (ser->ssl)
@@ -99,7 +99,7 @@
 	return write(ser->fd, buf, count);
 }
 
-void *server_root(void *data)
+void *ast_tcptls_server_root(void *data)
 {
 	struct server_args *desc = data;
 	int fd;
@@ -196,7 +196,7 @@
 #endif
 }
 
-int ssl_setup(struct ast_tls_config *cfg)
+int ast_ssl_setup(struct ast_tls_config *cfg)
 {
 	return __ssl_setup(cfg, 0);
 }
@@ -204,7 +204,7 @@
 /*! \brief A generic client routine for a TCP client
  *  and starts a thread for handling accept()
  */
-struct ast_tcptls_server_instance *client_start(struct server_args *desc)
+struct ast_tcptls_server_instance *ast_tcptls_client_start(struct server_args *desc)
 {
 	int flags;
 	struct ast_tcptls_server_instance *ser = NULL;
@@ -271,7 +271,7 @@
  * which does the socket/bind/listen and starts a thread for handling
  * accept().
  */
-void server_start(struct server_args *desc)
+void ast_tcptls_server_start(struct server_args *desc)
 {
 	int flags;
 	int x = 1;
@@ -334,7 +334,7 @@
 }
 
 /*! \brief Shutdown a running server if there is one */
-void server_stop(struct server_args *desc)
+void ast_tcptls_server_stop(struct server_args *desc)
 {
 	if (desc->master != AST_PTHREADT_NULL) {
 		pthread_cancel(desc->master);




More information about the svn-commits mailing list