aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/http.c10
-rw-r--r--main/manager.c8
-rw-r--r--main/tcptls.c12
3 files changed, 15 insertions, 15 deletions
diff --git a/main/http.c b/main/http.c
index c1ec9f759..487200256 100644
--- a/main/http.c
+++ b/main/http.c
@@ -137,7 +137,7 @@ static const char *ftype2mtype(const char *ftype, char *wkspace, int wkspacelen)
return wkspace;
}
-static struct ast_str *static_callback(struct server_instance *ser, const char *uri, struct ast_variable *vars, int *status, char **title, int *contentlength)
+static struct ast_str *static_callback(struct ast_tcptls_server_instance *ser, const char *uri, struct ast_variable *vars, int *status, char **title, int *contentlength)
{
char *path;
char *ftype;
@@ -207,7 +207,7 @@ out403:
}
-static struct ast_str *httpstatus_callback(struct server_instance *ser, const char *uri, struct ast_variable *vars, int *status, char **title, int *contentlength)
+static struct ast_str *httpstatus_callback(struct ast_tcptls_server_instance *ser, const char *uri, struct ast_variable *vars, int *status, char **title, int *contentlength)
{
struct ast_str *out = ast_str_create(512);
struct ast_variable *v;
@@ -392,7 +392,7 @@ static void post_raw(struct mm_mimepart *part, const char *post_dir, const char
fclose(f);
}
-static struct ast_str *handle_post(struct server_instance *ser, char *uri,
+static struct ast_str *handle_post(struct ast_tcptls_server_instance *ser, char *uri,
int *status, char **title, int *contentlength, struct ast_variable *headers,
struct ast_variable *cookies)
{
@@ -535,7 +535,7 @@ static struct ast_str *handle_post(struct server_instance *ser, char *uri,
return ast_http_error(200, "OK", NULL, "File successfully uploaded.");
}
-static struct ast_str *handle_uri(struct server_instance *ser, char *uri, int *status,
+static struct ast_str *handle_uri(struct ast_tcptls_server_instance *ser, char *uri, int *status,
char **title, int *contentlength, struct ast_variable **cookies,
unsigned int *static_content)
{
@@ -683,7 +683,7 @@ static void *httpd_helper_thread(void *data)
{
char buf[4096];
char cookie[4096];
- struct server_instance *ser = data;
+ struct ast_tcptls_server_instance *ser = data;
struct ast_variable *var, *prev=NULL, *vars=NULL, *headers = NULL;
char *uri, *title=NULL;
int status = 200, contentlength = 0;
diff --git a/main/manager.c b/main/manager.c
index 3eeecd5b6..6c96def39 100644
--- a/main/manager.c
+++ b/main/manager.c
@@ -2818,7 +2818,7 @@ static int do_message(struct mansession *s)
*/
static void *session_do(void *data)
{
- struct server_instance *ser = data;
+ struct ast_tcptls_server_instance *ser = data;
struct mansession *s = ast_calloc(1, sizeof(*s));
int flags;
int res;
@@ -3562,17 +3562,17 @@ generic_callback_out:
return out;
}
-static struct ast_str *manager_http_callback(struct server_instance *ser, const char *uri, struct ast_variable *params, int *status, char **title, int *contentlength)
+static struct ast_str *manager_http_callback(struct ast_tcptls_server_instance *ser, const char *uri, struct ast_variable *params, int *status, char **title, int *contentlength)
{
return generic_http_callback(FORMAT_HTML, &ser->requestor, uri, params, status, title, contentlength);
}
-static struct ast_str *mxml_http_callback(struct server_instance *ser, const char *uri, struct ast_variable *params, int *status, char **title, int *contentlength)
+static struct ast_str *mxml_http_callback(struct ast_tcptls_server_instance *ser, const char *uri, struct ast_variable *params, int *status, char **title, int *contentlength)
{
return generic_http_callback(FORMAT_XML, &ser->requestor, uri, params, status, title, contentlength);
}
-static struct ast_str *rawman_http_callback(struct server_instance *ser, const char *uri, struct ast_variable *params, int *status, char **title, int *contentlength)
+static struct ast_str *rawman_http_callback(struct ast_tcptls_server_instance *ser, const char *uri, struct ast_variable *params, int *status, char **title, int *contentlength)
{
return generic_http_callback(FORMAT_RAW, &ser->requestor, uri, params, status, title, contentlength);
}
diff --git a/main/tcptls.c b/main/tcptls.c
index e11155a3e..acb012d60 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 server_instance *ser, void *buf, size_t count)
+HOOK_T 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 server_instance *ser, void *buf, size_t count)
return read(ser->fd, buf, count);
}
-HOOK_T server_write(struct server_instance *ser, void *buf, size_t count)
+HOOK_T server_write(struct ast_tcptls_server_instance *ser, void *buf, size_t count)
{
#ifdef DO_SSL
if (ser->ssl)
@@ -105,7 +105,7 @@ void *server_root(void *data)
int fd;
struct sockaddr_in sin;
socklen_t sinlen;
- struct server_instance *ser;
+ struct ast_tcptls_server_instance *ser;
pthread_t launched;
for (;;) {
@@ -204,10 +204,10 @@ 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 server_instance *client_start(struct server_args *desc)
+struct ast_tcptls_server_instance *client_start(struct server_args *desc)
{
int flags;
- struct server_instance *ser = NULL;
+ struct ast_tcptls_server_instance *ser = NULL;
/* Do nothing if nothing has changed */
if(!memcmp(&desc->oldsin, &desc->sin, sizeof(desc->oldsin))) {
@@ -353,7 +353,7 @@ void server_stop(struct server_args *desc)
*/
void *ast_make_file_from_fd(void *data)
{
- struct server_instance *ser = data;
+ struct ast_tcptls_server_instance *ser = data;
#ifdef DO_SSL
int (*ssl_setup)(SSL *) = (ser->client) ? SSL_connect : SSL_accept;
int ret;