Example #1
0
mongo_connection *mongo_manager_connection_find_by_hash_with_callback(mongo_con_manager *manager, char *hash, void *callback_data, mongo_cleanup_t cleanup_cb)
{
	mongo_connection *connection;

	connection = mongo_manager_find_by_hash(manager, manager->connections, hash);
	return mongo_manager_add_connection_callback(connection, callback_data, cleanup_cb);
}
Example #2
0
mongo_connection *mongo_manager_connection_find_by_server_definition(mongo_con_manager *manager, mongo_server_def *definition)
{
	char *hash = mongo_server_create_hash(definition);
	mongo_connection *con = mongo_manager_find_by_hash(manager, manager->connections, hash);

	free(hash);
	return con;
}
Example #3
0
mongo_connection_blacklist *mongo_manager_blacklist_find_by_hash(mongo_con_manager *manager, char *hash)
{
	return mongo_manager_find_by_hash(manager, manager->blacklist, hash);
}
Example #4
0
mongo_connection *mongo_manager_connection_find_by_hash(mongo_con_manager *manager, char *hash)
{
	return mongo_manager_find_by_hash(manager, manager->connections, hash);
}