[asterisk-commits] russell: branch 1.6.0 r106303 - in /branches/1.6.0: ./ channels/ include/aste...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Mar 5 18:11:09 CST 2008
Author: russell
Date: Wed Mar 5 18:11:09 2008
New Revision: 106303
URL: http://svn.digium.com/view/asterisk?view=rev&rev=106303
Log:
Merged revisions 105773 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r105773 | russell | 2008-03-04 16:15:18 -0600 (Tue, 04 Mar 2008) | 2 lines
Rename public object server_instance to ast_tcptls_server_instance
........
Modified:
branches/1.6.0/ (props changed)
branches/1.6.0/channels/chan_sip.c
branches/1.6.0/include/asterisk/http.h
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
branches/1.6.0/res/res_phoneprov.c
Propchange: branches/1.6.0/
------------------------------------------------------------------------------
--- trunk-merged (original)
+++ trunk-merged Wed Mar 5 18:11:09 2008
@@ -1,1 +1,1 @@
-/trunk:1-105595,105675,105677,105733-105734,106036,106040,106139
+/trunk:1-105595,105675,105677,105733-105734,105773,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=106303&r1=106302&r2=106303
==============================================================================
--- branches/1.6.0/channels/chan_sip.c (original)
+++ branches/1.6.0/channels/chan_sip.c Wed Mar 5 18:11:09 2008
@@ -777,7 +777,7 @@
enum sip_transport type;
int fd;
uint16_t port;
- struct server_instance *ser;
+ struct ast_tcptls_server_instance *ser;
};
/*! \brief sip_request: The data grabbed from the UDP socket
@@ -1551,7 +1551,7 @@
struct sip_threadinfo {
int stop;
pthread_t threadid;
- struct server_instance *ser;
+ struct ast_tcptls_server_instance *ser;
enum sip_transport type; /* We keep a copy of the type here so we can display it in the connection list */
AST_LIST_ENTRY(sip_threadinfo) list;
};
@@ -2129,25 +2129,25 @@
.get_codec = sip_get_codec,
};
-static void *_sip_tcp_helper_thread(struct sip_pvt *pvt, struct server_instance *ser);
+static void *_sip_tcp_helper_thread(struct sip_pvt *pvt, struct ast_tcptls_server_instance *ser);
static void *sip_tcp_helper_thread(void *data)
{
struct sip_pvt *pvt = data;
- struct server_instance *ser = pvt->socket.ser;
+ struct ast_tcptls_server_instance *ser = pvt->socket.ser;
return _sip_tcp_helper_thread(pvt, ser);
}
static void *sip_tcp_worker_fn(void *data)
{
- struct server_instance *ser = data;
+ struct ast_tcptls_server_instance *ser = data;
return _sip_tcp_helper_thread(NULL, ser);
}
/*! \brief SIP TCP helper function */
-static void *_sip_tcp_helper_thread(struct sip_pvt *pvt, struct server_instance *ser)
+static void *_sip_tcp_helper_thread(struct sip_pvt *pvt, struct ast_tcptls_server_instance *ser)
{
int res, cl;
struct sip_request req = { 0, } , reqcpy = { 0, };
@@ -18064,7 +18064,7 @@
}
/*! \todo document this function. */
-static struct server_instance *sip_tcp_locate(struct sockaddr_in *s)
+static struct ast_tcptls_server_instance *sip_tcp_locate(struct sockaddr_in *s)
{
struct sip_threadinfo *th;
@@ -18086,7 +18086,7 @@
{
struct sip_socket *s = &p->socket;
static const char name[] = "SIP socket";
- struct server_instance *ser;
+ struct ast_tcptls_server_instance *ser;
struct server_args ca = {
.name = name,
.accept_fd = -1,
Modified: branches/1.6.0/include/asterisk/http.h
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/include/asterisk/http.h?view=diff&rev=106303&r1=106302&r2=106303
==============================================================================
--- branches/1.6.0/include/asterisk/http.h (original)
+++ branches/1.6.0/include/asterisk/http.h Wed Mar 5 18:11:09 2008
@@ -65,7 +65,7 @@
content is specified)
\endverbatim
*/
-typedef struct ast_str *(*ast_http_callback)(struct server_instance *ser, const char *uri, struct ast_variable *params, int *status, char **title, int *contentlength);
+typedef struct ast_str *(*ast_http_callback)(struct ast_tcptls_server_instance *ser, const char *uri, struct ast_variable *params, int *status, char **title, int *contentlength);
/*! \brief Definition of a URI reachable in the embedded HTTP server */
struct ast_http_uri {
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=106303&r1=106302&r2=106303
==============================================================================
--- branches/1.6.0/include/asterisk/tcptls.h (original)
+++ branches/1.6.0/include/asterisk/tcptls.h Wed Mar 5 18:11:09 2008
@@ -102,7 +102,7 @@
* or equivalent with a timeout of 'poll_timeout' milliseconds, and if the
* following accept() is successful it creates a thread in charge of
* running the session, whose body is desc->worker_fn(). The argument of
- * worker_fn() is a struct server_instance, which contains the address
+ * worker_fn() is a struct ast_tcptls_server_instance, which contains the address
* of the other party, a pointer to desc, the file descriptors (fd) on which
* we can do a select/poll (but NOT IO/, and a FILE *on which we can do I/O.
* We have both because we want to support plain and SSL sockets, and
@@ -111,7 +111,7 @@
*
* NOTE: in order to let other parts of asterisk use these services,
* we need to do the following:
- * + move struct server_instance and struct server_args to
+ * + move struct ast_tcptls_server_instance and struct server_args to
* a common header file, together with prototypes for
* server_start() and server_root().
*/
@@ -119,7 +119,7 @@
/*! \brief
* describes a server instance
*/
-struct server_instance {
+struct ast_tcptls_server_instance {
FILE *f; /* fopen/funopen result */
int fd; /* the socket returned by accept() */
SSL *ssl; /* ssl state */
@@ -154,7 +154,7 @@
#define LEN_T size_t
#endif
-struct server_instance *client_start(struct server_args *desc);
+struct ast_tcptls_server_instance *client_start(struct server_args *desc);
void *server_root(void *);
void server_start(struct server_args *desc);
@@ -163,7 +163,7 @@
void *ast_make_file_from_fd(void *data);
-HOOK_T server_read(struct server_instance *ser, void *buf, size_t count);
-HOOK_T server_write(struct server_instance *ser, void *buf, size_t count);
+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);
#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=106303&r1=106302&r2=106303
==============================================================================
--- branches/1.6.0/main/http.c (original)
+++ branches/1.6.0/main/http.c Wed Mar 5 18:11:09 2008
@@ -137,7 +137,7 @@
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 @@
}
-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 @@
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 @@
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 @@
{
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;
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=106303&r1=106302&r2=106303
==============================================================================
--- branches/1.6.0/main/manager.c (original)
+++ branches/1.6.0/main/manager.c Wed Mar 5 18:11:09 2008
@@ -2818,7 +2818,7 @@
*/
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 @@
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);
}
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=106303&r1=106302&r2=106303
==============================================================================
--- branches/1.6.0/main/tcptls.c (original)
+++ branches/1.6.0/main/tcptls.c Wed Mar 5 18:11:09 2008
@@ -81,7 +81,7 @@
}
#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 @@
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 @@
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 @@
/*! \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 *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;
Modified: branches/1.6.0/res/res_phoneprov.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/res/res_phoneprov.c?view=diff&rev=106303&r1=106302&r2=106303
==============================================================================
--- branches/1.6.0/res/res_phoneprov.c (original)
+++ branches/1.6.0/res/res_phoneprov.c Wed Mar 5 18:11:09 2008
@@ -323,7 +323,7 @@
}
/*! \brief Callback that is executed everytime an http request is received by this module */
-static struct ast_str *phoneprov_callback(struct server_instance *ser, const char *uri, struct ast_variable *vars, int *status, char **title, int *contentlength)
+static struct ast_str *phoneprov_callback(struct ast_tcptls_server_instance *ser, const char *uri, struct ast_variable *vars, int *status, char **title, int *contentlength)
{
struct http_route *route;
struct http_route search_route = {
More information about the asterisk-commits
mailing list