Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions modules/cachedb_cassandra/cachedb_cassandra_dbase.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,13 @@ int cassandra_reopen(cassandra_con *cass_con)
int cassandra_new_connection(cassandra_con *con, char *host, int port, char *username, char *password)
{
con->cluster = cass_cluster_new();
if (username && password) {
cass_cluster_set_credentials(con->cluster, username, password);
}
if (!con->cluster) {
LM_ERR("Failed to create Cassandra Cluster object\n");
return -1;
}
if (username && password) {
cass_cluster_set_credentials(con->cluster, username, password);
}

#if CASS_VERSION_MAJOR >= 2 && CASS_VERSION_MINOR >= 15
/* since version 2.15, DSE support is available in the standard driver
Expand Down
5 changes: 5 additions & 0 deletions modules/cachedb_memcached/cachedb_memcached.c
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,11 @@ memcached_con* memcached_new_connection(struct cachedb_id *id)
con->ref = 1;

con->memc = memcached_create(NULL);
if (!con->memc) {
LM_ERR("failed to create memcached handle\n");
pkg_free(con);
return 0;
}

memset(host_buff,0,MAX_HOSTPORT_SIZE);

Expand Down