Skip to content

Commit

Permalink
Merge pull request #60 from gerald-lindsly/master
Browse files Browse the repository at this point in the history
Replica set allocation error in mongo.c
  • Loading branch information
gjmurakami-10gen committed Dec 31, 2012
2 parents 6c361a4 + dcc2bff commit 35d6781
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/mongo.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -644,6 +644,7 @@ MONGO_EXPORT int mongo_replica_set_client( mongo *conn ) {


/* Primary found, so return. */ /* Primary found, so return. */
else if( conn->replica_set->primary_connected ) { else if( conn->replica_set->primary_connected ) {
conn->primary = bson_malloc( sizeof( mongo_host_port ) );
strncpy( conn->primary->host, node->host, strlen( node->host ) + 1 ); strncpy( conn->primary->host, node->host, strlen( node->host ) + 1 );
conn->primary->port = node->port; conn->primary->port = node->port;
return MONGO_OK; return MONGO_OK;
Expand Down

0 comments on commit 35d6781

Please sign in to comment.