Created
April 6, 2012 20:44
-
-
Save avsej/2322804 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git c/src/instance.c w/src/instance.c | |
index e0101d9..326de45 100644 | |
--- c/src/instance.c | |
+++ w/src/instance.c | |
@@ -332,21 +332,21 @@ void libcouchbase_apply_vbucket_config(libcouchbase_t instance, VBUCKET_CONFIG_H | |
instance->backup_nodes[ii] = instance->backup_nodes[nn]; | |
instance->backup_nodes[nn] = pp; | |
} | |
} | |
instance->sasl.name = vbucket_config_get_user(instance->vbucket_config); | |
memset(instance->sasl.password.buffer, 0, | |
sizeof(instance->sasl.password.buffer)); | |
passwd = vbucket_config_get_password(instance->vbucket_config); | |
if (passwd) { | |
instance->sasl.password.secret.len = strlen(passwd); | |
- strcpy((char *)instance->sasl.password.secret.data, passwd); | |
+ strcpy((char *)(instance->sasl.password.buffer + sizeof(instance->sasl.password.secret.len)), passwd); | |
} | |
memcpy(instance->sasl.callbacks, sasl_callbacks, sizeof(sasl_callbacks)); | |
/* | |
* Run through all of the vbuckets and build a map of what they need. | |
* It would have been nice if I could query libvbucket for the number | |
* of vbuckets a server got, but there isn't at the moment.. | |
*/ | |
max = (libcouchbase_uint16_t)vbucket_config_get_num_vbuckets(instance->vbucket_config); | |
instance->nvbuckets = max; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment