Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change db_connect to allow different arguments from different processes. #142

Merged
merged 7 commits into from
Dec 21, 2016

Conversation

robertnishihara
Copy link
Collaborator

No description provided.

@@ -65,10 +67,22 @@ int64_t timeout_handler(event_loop *loop, int64_t id, void *context) {

TEST object_table_lookup_test(void) {
event_loop *loop = event_loop_create();
int num_args1 = 2;
const char **db_connect_args1 = malloc(sizeof(char *) * num_args1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do

int num_args1 = 2;
const char* db_connect_args1[] = {"address", "127.0.0.1:12345"}; 

It's shorter and doesn't need to be freed!

@pcmoritz pcmoritz merged commit c9c1b3e into master Dec 21, 2016
@pcmoritz pcmoritz deleted the connect branch December 21, 2016 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants