@@ -267,7 +267,6 @@ mongoc_collection_aggregate (mongoc_collection_t *collection, /* IN */
267267{
268268 mongoc_cursor_t * cursor ;
269269 bson_iter_t iter ;
270- bson_iter_t citer ;
271270 uint32_t max_wire_version = 0 ;
272271 uint32_t min_wire_version = 0 ;
273272 uint32_t hint ;
@@ -295,9 +294,8 @@ mongoc_collection_aggregate (mongoc_collection_t *collection, /* IN */
295294 * items for the pipeline, or {"pipeline": [...]}.
296295 */
297296 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 );
301299 } else {
302300 BSON_APPEND_ARRAY (& command , "pipeline" , pipeline );
303301 }
@@ -335,8 +333,8 @@ mongoc_collection_aggregate (mongoc_collection_t *collection, /* IN */
335333 bson_append_document_end (& command , & child );
336334 }
337335
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 );
340338 cursor -> hint = hint ;
341339
342340 if (max_wire_version > 0 ) {
0 commit comments