Skip to content

Commit

Permalink
fix mongodb module not using user specified port
Browse files Browse the repository at this point in the history
  • Loading branch information
ToraNova committed Dec 31, 2021
1 parent 0227908 commit 4a1bb51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hydra-mongodb.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ int32_t start_mongodb(int32_t s, char *ip, int32_t port, unsigned char options,
mongoc_log_set_handler(NULL, NULL);
bson_init(&q);

snprintf(uri, sizeof(uri), "mongodb://%s:%s@%s/?authSource=%s", login, pass, hydra_address2string(ip), miscptr);
snprintf(uri, sizeof(uri), "mongodb://%s:%s@%s:%d/?authSource=%s", login, pass, hydra_address2string(ip), port, miscptr);
client = mongoc_client_new(uri);
if (!client)
return 3;
Expand Down

0 comments on commit 4a1bb51

Please sign in to comment.