diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-03-04 22:23:21 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-03-04 22:23:21 +0000 |
commit | c2841b668a2e165bd5fedb79138379efd904c009 (patch) | |
tree | 2a0156cf546653e08e9faeaef7deab0b3cc57084 /main | |
parent | 8ef91aad9ee6e3cf949c96a34ae195c69b20ed67 (diff) |
More public API name changes to use an appropriate ast_ prefix
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@105785 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r-- | main/http.c | 10 | ||||
-rw-r--r-- | main/manager.c | 10 | ||||
-rw-r--r-- | main/tcptls.c | 14 |
3 files changed, 17 insertions, 17 deletions
diff --git a/main/http.c b/main/http.c index 487200256..11db1779c 100644 --- a/main/http.c +++ b/main/http.c @@ -73,7 +73,7 @@ static struct server_args http_desc = { .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 @@ static struct server_args https_desc = { .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 @@ static int __ast_http_load(int reload) 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; } diff --git a/main/manager.c b/main/manager.c index 6c96def39..ec8362b08 100644 --- a/main/manager.c +++ b/main/manager.c @@ -3618,7 +3618,7 @@ static struct server_args ami_desc = { .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 @@ static struct server_args amis_desc = { .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 @@ static int __init_manager(int reload) 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; } diff --git a/main/tcptls.c b/main/tcptls.c index acb012d60..d623420a5 100644 --- a/main/tcptls.c +++ b/main/tcptls.c @@ -81,7 +81,7 @@ static int ssl_close(void *cookie) } #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 @@ HOOK_T server_read(struct ast_tcptls_server_instance *ser, void *buf, size_t cou 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 @@ HOOK_T server_write(struct ast_tcptls_server_instance *ser, void *buf, size_t co 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 @@ static int __ssl_setup(struct ast_tls_config *cfg, int client) #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 @@ int ssl_setup(struct ast_tls_config *cfg) /*! \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 @@ error: * 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 @@ error: } /*! \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); |