Fix mistakes
This commit is contained in:
@ -23,11 +23,11 @@ endif()
|
|||||||
target_link_libraries(maxscale ${EMBEDDED_LIB} ${PCRE_LINK_FLAGS} ${CURL_LIBRARIES} log_manager utils ssl aio pthread crypt dl crypto inih z rt m stdc++)
|
target_link_libraries(maxscale ${EMBEDDED_LIB} ${PCRE_LINK_FLAGS} ${CURL_LIBRARIES} log_manager utils ssl aio pthread crypt dl crypto inih z rt m stdc++)
|
||||||
install(TARGETS maxscale DESTINATION ${MAXSCALE_BINDIR})
|
install(TARGETS maxscale DESTINATION ${MAXSCALE_BINDIR})
|
||||||
|
|
||||||
add_executable(maxkeys maxkeys.c secrets.c utils.c gwdirs.c random_jkiss.c)
|
add_executable(maxkeys maxkeys.c secrets.c utils.c gwdirs.c spinlock.c random_jkiss.c)
|
||||||
target_link_libraries(maxkeys log_manager utils pthread crypt crypto)
|
target_link_libraries(maxkeys log_manager utils pthread crypt crypto)
|
||||||
install(TARGETS maxkeys DESTINATION ${MAXSCALE_BINDIR})
|
install(TARGETS maxkeys DESTINATION ${MAXSCALE_BINDIR})
|
||||||
|
|
||||||
add_executable(maxpasswd maxpasswd.c secrets.c utils.c gwdirs.c random_jkiss.c)
|
add_executable(maxpasswd maxpasswd.c secrets.c utils.c gwdirs.c spinlock.c random_jkiss.c)
|
||||||
target_link_libraries(maxpasswd log_manager utils pthread crypt crypto)
|
target_link_libraries(maxpasswd log_manager utils pthread crypt crypto)
|
||||||
install(TARGETS maxpasswd DESTINATION ${MAXSCALE_BINDIR})
|
install(TARGETS maxpasswd DESTINATION ${MAXSCALE_BINDIR})
|
||||||
|
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <spinlock.h>
|
||||||
#include <random_jkiss.h>
|
#include <random_jkiss.h>
|
||||||
|
|
||||||
/* Public domain code for JKISS RNG - Comment header added */
|
/* Public domain code for JKISS RNG - Comment header added */
|
||||||
@ -63,6 +64,7 @@ random_jkiss(void)
|
|||||||
{
|
{
|
||||||
unsigned long long t;
|
unsigned long long t;
|
||||||
unsigned int result;
|
unsigned int result;
|
||||||
|
|
||||||
spinlock_acquire(&random_jkiss_spinlock);
|
spinlock_acquire(&random_jkiss_spinlock);
|
||||||
if (!init)
|
if (!init)
|
||||||
{
|
{
|
||||||
|
@ -215,7 +215,7 @@ typedef enum skygw_chk_t {
|
|||||||
((s) == SESSION_STATE_LISTENER ? "SESSION_STATE_LISTENER" : \
|
((s) == SESSION_STATE_LISTENER ? "SESSION_STATE_LISTENER" : \
|
||||||
((s) == SESSION_STATE_LISTENER_STOPPED ? "SESSION_STATE_LISTENER_STOPPED" : \
|
((s) == SESSION_STATE_LISTENER_STOPPED ? "SESSION_STATE_LISTENER_STOPPED" : \
|
||||||
(s) == SESSION_STATE_ROUTER_READY ? "SESSION_STATE_ROUTER_READY":\
|
(s) == SESSION_STATE_ROUTER_READY ? "SESSION_STATE_ROUTER_READY":\
|
||||||
"SESSION_STATE_UNKNOWN"))))
|
"SESSION_STATE_UNKNOWN")))))
|
||||||
|
|
||||||
#define STRPROTOCOLSTATE(s) ((s) == MYSQL_ALLOC ? "MYSQL_ALLOC" : \
|
#define STRPROTOCOLSTATE(s) ((s) == MYSQL_ALLOC ? "MYSQL_ALLOC" : \
|
||||||
((s) == MYSQL_PENDING_CONNECT ? "MYSQL_PENDING_CONNECT" : \
|
((s) == MYSQL_PENDING_CONNECT ? "MYSQL_PENDING_CONNECT" : \
|
||||||
|
Reference in New Issue
Block a user