Compile modutil.c as C++
This commit is contained in:
@ -326,9 +326,9 @@ extern GWBUF *gwbuf_split(GWBUF **buf, size_t length);
|
|||||||
* Set given type to all buffers on the list.
|
* Set given type to all buffers on the list.
|
||||||
* *
|
* *
|
||||||
* @param buf The shared buffer
|
* @param buf The shared buffer
|
||||||
* @param type Type to be added
|
* @param type Type to be added, mask of @c gwbuf_type_t values.
|
||||||
*/
|
*/
|
||||||
extern void gwbuf_set_type(GWBUF *head, gwbuf_type_t type);
|
extern void gwbuf_set_type(GWBUF *head, uint32_t type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a property to a buffer.
|
* Add a property to a buffer.
|
||||||
|
@ -18,7 +18,8 @@ add_library(maxscale-common SHARED
|
|||||||
maxscale_pcre2.cc
|
maxscale_pcre2.cc
|
||||||
misc.cc
|
misc.cc
|
||||||
mlist.cc
|
mlist.cc
|
||||||
modutil.c monitor.c queuemanager.c query_classifier.cc poll.c random_jkiss.c resultset.c router.cc secrets.c server.c service.c session.c spinlock.c thread.c users.c utils.c skygw_utils.cc statistics.c listener.c ssl.c mysql_utils.c mysql_binlog.c modulecmd.c)
|
modutil.cc
|
||||||
|
monitor.c queuemanager.c query_classifier.cc poll.c random_jkiss.c resultset.c router.cc secrets.c server.c service.c session.c spinlock.c thread.c users.c utils.c skygw_utils.cc statistics.c listener.c ssl.c mysql_utils.c mysql_binlog.c modulecmd.c)
|
||||||
|
|
||||||
if(WITH_JEMALLOC)
|
if(WITH_JEMALLOC)
|
||||||
target_link_libraries(maxscale-common ${JEMALLOC_LIBRARIES})
|
target_link_libraries(maxscale-common ${JEMALLOC_LIBRARIES})
|
||||||
|
@ -643,7 +643,7 @@ gwbuf_rtrim(GWBUF *head, unsigned int n_bytes)
|
|||||||
return rval;
|
return rval;
|
||||||
}
|
}
|
||||||
|
|
||||||
void gwbuf_set_type(GWBUF* buf, gwbuf_type_t type)
|
void gwbuf_set_type(GWBUF* buf, uint32_t type)
|
||||||
{
|
{
|
||||||
/** Set type consistenly to all buffers on the list */
|
/** Set type consistenly to all buffers on the list */
|
||||||
while (buf != NULL)
|
while (buf != NULL)
|
||||||
|
@ -46,11 +46,11 @@ static const char* sub_single = "$1.";
|
|||||||
static const char* sub_escape = "\\.";
|
static const char* sub_escape = "\\.";
|
||||||
|
|
||||||
static void modutil_reply_routing_error(
|
static void modutil_reply_routing_error(
|
||||||
DCB* backend_dcb,
|
DCB* backend_dcb,
|
||||||
int error,
|
int error,
|
||||||
char* state,
|
const char* state,
|
||||||
char* errstr,
|
char* errstr,
|
||||||
uint32_t flags);
|
uint32_t flags);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -329,7 +329,7 @@ modutil_get_query(GWBUF *buf)
|
|||||||
char* query_str = NULL;
|
char* query_str = NULL;
|
||||||
|
|
||||||
packet = GWBUF_DATA(buf);
|
packet = GWBUF_DATA(buf);
|
||||||
packet_type = packet[4];
|
packet_type = (mysql_server_cmd_t)packet[4];
|
||||||
|
|
||||||
switch (packet_type)
|
switch (packet_type)
|
||||||
{
|
{
|
||||||
@ -758,11 +758,11 @@ void modutil_reply_auth_error(DCB* backend_dcb,
|
|||||||
* @param errstr Plain-text string error
|
* @param errstr Plain-text string error
|
||||||
* @param flags GWBUF type flags
|
* @param flags GWBUF type flags
|
||||||
*/
|
*/
|
||||||
static void modutil_reply_routing_error(DCB* backend_dcb,
|
static void modutil_reply_routing_error(DCB* backend_dcb,
|
||||||
int error,
|
int error,
|
||||||
char* state,
|
const char* state,
|
||||||
char* errstr,
|
char* errstr,
|
||||||
uint32_t flags)
|
uint32_t flags)
|
||||||
{
|
{
|
||||||
GWBUF* buf;
|
GWBUF* buf;
|
||||||
CHK_DCB(backend_dcb);
|
CHK_DCB(backend_dcb);
|
Reference in New Issue
Block a user