Skip to content

Commit

Permalink
INTERNAL: Do not include sasl_defs.h in memcached.h
Browse files Browse the repository at this point in the history
  • Loading branch information
namsic committed Jan 2, 2025
1 parent 2f1ecf0 commit 4f47aab
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions memcached.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@

#include "cmdlog.h"
#include "lqdetect.h"
#include "sasl_defs.h"

/* Lock for global stats */
static pthread_mutex_t stats_lock = PTHREAD_MUTEX_INITIALIZER;
Expand Down Expand Up @@ -868,7 +869,7 @@ static void conn_cleanup(conn *c)
}

if (c->sasl_conn) {
sasl_dispose(&c->sasl_conn);
sasl_dispose((sasl_conn_t**)&c->sasl_conn);
c->sasl_conn = NULL;
}

Expand Down Expand Up @@ -4128,7 +4129,7 @@ static void init_sasl_conn(conn *c)
if (!c->sasl_conn) {
int result=sasl_server_new("memcached",
NULL, NULL, NULL, NULL,
NULL, 0, &c->sasl_conn);
NULL, 0, (sasl_conn_t**)&c->sasl_conn);
if (result != SASL_OK) {
if (settings.verbose) {
mc_logger->log(EXTENSION_LOG_INFO, c,
Expand Down
3 changes: 1 addition & 2 deletions memcached.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#include "topkeys.h"
#include "mc_util.h"
#include "engine_loader.h"
#include "sasl_defs.h"

/* This is the address we use for admin purposes. For example, doing stats
* and heart beats from arcus_zk.
Expand Down Expand Up @@ -274,7 +273,7 @@ typedef bool (*STATE_FUNC)(conn *);
struct conn {
int sfd;
short nevents;
sasl_conn_t *sasl_conn;
void *sasl_conn;
bool sasl_started;
bool authenticated;
STATE_FUNC state;
Expand Down
2 changes: 2 additions & 0 deletions sasl_defs.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#include <stdlib.h>
#include <string.h>

#include "sasl_defs.h"

#ifdef HAVE_SASL_CB_GETCONF
/* The locations we may search for a SASL config file if the user didn't
* specify one in the environment variable SASL_CONF_PATH
Expand Down

0 comments on commit 4f47aab

Please sign in to comment.