Skip to content

Commit e395870

Browse files
namsicjhpark816
authored andcommitted
INTERNAL: Do not include sasl_defs.h in memcached.h
1 parent 2f1ecf0 commit e395870

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

memcached.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363

6464
#include "cmdlog.h"
6565
#include "lqdetect.h"
66+
#include "sasl_defs.h"
6667

6768
/* Lock for global stats */
6869
static pthread_mutex_t stats_lock = PTHREAD_MUTEX_INITIALIZER;
@@ -868,7 +869,7 @@ static void conn_cleanup(conn *c)
868869
}
869870

870871
if (c->sasl_conn) {
871-
sasl_dispose(&c->sasl_conn);
872+
sasl_dispose((sasl_conn_t**)&c->sasl_conn);
872873
c->sasl_conn = NULL;
873874
}
874875

@@ -4128,7 +4129,7 @@ static void init_sasl_conn(conn *c)
41284129
if (!c->sasl_conn) {
41294130
int result=sasl_server_new("memcached",
41304131
NULL, NULL, NULL, NULL,
4131-
NULL, 0, &c->sasl_conn);
4132+
NULL, 0, (sasl_conn_t**)&c->sasl_conn);
41324133
if (result != SASL_OK) {
41334134
if (settings.verbose) {
41344135
mc_logger->log(EXTENSION_LOG_INFO, c,

memcached.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
#include "topkeys.h"
3333
#include "mc_util.h"
3434
#include "engine_loader.h"
35-
#include "sasl_defs.h"
3635

3736
/* This is the address we use for admin purposes. For example, doing stats
3837
* and heart beats from arcus_zk.
@@ -274,7 +273,7 @@ typedef bool (*STATE_FUNC)(conn *);
274273
struct conn {
275274
int sfd;
276275
short nevents;
277-
sasl_conn_t *sasl_conn;
276+
void *sasl_conn;
278277
bool sasl_started;
279278
bool authenticated;
280279
STATE_FUNC state;

sasl_defs.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
#include <stdlib.h>
66
#include <string.h>
77

8+
#include "sasl_defs.h"
9+
810
#ifdef HAVE_SASL_CB_GETCONF
911
/* The locations we may search for a SASL config file if the user didn't
1012
* specify one in the environment variable SASL_CONF_PATH

0 commit comments

Comments
 (0)