MXS-1835 Turn all protocol modules into C++

This commit is contained in:
Johan Wikman
2018-04-27 12:04:35 +03:00
parent da16ba538d
commit 7876c3c70f
10 changed files with 58 additions and 36 deletions

View File

@ -1,4 +1,4 @@
add_library(httpd SHARED httpd.c)
add_library(httpd SHARED httpd.cc)
target_link_libraries(httpd maxscale-common)
set_target_properties(httpd PROPERTIES VERSION "1.0.1")
install_module(httpd core)

View File

@ -57,6 +57,8 @@ static int httpd_get_line(int sock, char *buf, int size);
static void httpd_send_headers(DCB *dcb, int final, bool auth_ok);
static char *httpd_default_auth();
extern "C"
{
/**
* The module entry point routine. It is this routine that
* must populate the structure that is referred to as the
@ -105,6 +107,8 @@ MXS_MODULE* MXS_CREATE_MODULE()
return &info;
}
}
/*lint +e14 */
static const char* default_auth = "NullAuthAllow";
@ -139,7 +143,7 @@ static int httpd_read_event(DCB* dcb)
HTTPD_session *client_data = NULL;
GWBUF *uri;
client_data = dcb->data;
client_data = static_cast<HTTPD_session*>(dcb->data);
/**
* get the request line