@@ -267,7 +267,6 @@ mongoc_collection_aggregate (mongoc_collection_t *collection, /* IN */
267
267
{
268
268
mongoc_cursor_t * cursor ;
269
269
bson_iter_t iter ;
270
- bson_iter_t citer ;
271
270
uint32_t max_wire_version = 0 ;
272
271
uint32_t min_wire_version = 0 ;
273
272
uint32_t hint ;
@@ -295,9 +294,8 @@ mongoc_collection_aggregate (mongoc_collection_t *collection, /* IN */
295
294
* items for the pipeline, or {"pipeline": [...]}.
296
295
*/
297
296
if (bson_iter_init_find (& iter , pipeline , "pipeline" ) &&
298
- BSON_ITER_HOLDS_ARRAY (& iter ) &&
299
- bson_iter_recurse (& iter , & citer )) {
300
- bson_append_iter (& command , "pipeline" , 8 , & citer );
297
+ BSON_ITER_HOLDS_ARRAY (& iter )) {
298
+ bson_append_iter (& command , "pipeline" , 8 , & iter );
301
299
} else {
302
300
BSON_APPEND_ARRAY (& command , "pipeline" , pipeline );
303
301
}
@@ -335,8 +333,8 @@ mongoc_collection_aggregate (mongoc_collection_t *collection, /* IN */
335
333
bson_append_document_end (& command , & child );
336
334
}
337
335
338
- cursor = mongoc_collection_command (collection , flags , 0 , 1 , 0 , & command ,
339
- NULL , read_prefs );
336
+ cursor = mongoc_collection_command (collection , flags , 0 , 0 , 0 , & command ,
337
+ NULL , read_prefs );
340
338
cursor -> hint = hint ;
341
339
342
340
if (max_wire_version > 0 ) {
0 commit comments