|
36 | 36 | #define SUPPORTS_WRITE_COMMANDS(n) \
|
37 | 37 | (((n)->min_wire_version <= 2) && ((n)->max_wire_version >= 2))
|
38 | 38 | #define WRITE_CONCERN_DOC(wc) \
|
39 |
| - (wc && _mongoc_write_concern_has_gle ((wc))) ? \ |
| 39 | + (wc && _mongoc_write_concern_needs_gle ((wc))) ? \ |
40 | 40 | (_mongoc_write_concern_freeze((mongoc_write_concern_t*)(wc))) : \
|
41 | 41 | (&gEmptyWriteConcern)
|
42 | 42 |
|
@@ -224,7 +224,7 @@ _mongoc_write_command_delete_legacy (mongoc_write_command_t *command,
|
224 | 224 | GOTO (cleanup);
|
225 | 225 | }
|
226 | 226 |
|
227 |
| - if (_mongoc_write_concern_has_gle (write_concern)) { |
| 227 | + if (_mongoc_write_concern_needs_gle (write_concern)) { |
228 | 228 | if (!_mongoc_client_recv_gle (client, hint, &gle, error)) {
|
229 | 229 | result->failed = true;
|
230 | 230 | GOTO (cleanup);
|
@@ -361,7 +361,7 @@ _mongoc_write_command_insert_legacy (mongoc_write_command_t *command,
|
361 | 361 | GOTO (cleanup);
|
362 | 362 | }
|
363 | 363 |
|
364 |
| - if (_mongoc_write_concern_has_gle (write_concern)) { |
| 364 | + if (_mongoc_write_concern_needs_gle (write_concern)) { |
365 | 365 | bson_iter_t citer;
|
366 | 366 |
|
367 | 367 | if (!_mongoc_client_recv_gle (client, hint, &gle, error)) {
|
@@ -462,7 +462,7 @@ _mongoc_write_command_update_legacy (mongoc_write_command_t *command,
|
462 | 462 | GOTO (cleanup);
|
463 | 463 | }
|
464 | 464 |
|
465 |
| - if (_mongoc_write_concern_has_gle (write_concern)) { |
| 465 | + if (_mongoc_write_concern_needs_gle (write_concern)) { |
466 | 466 | if (!_mongoc_client_recv_gle (client, hint, &gle, error)) {
|
467 | 467 | result->failed = true;
|
468 | 468 | GOTO (cleanup);
|
@@ -509,7 +509,7 @@ _mongoc_write_command_delete (mongoc_write_command_t *command,
|
509 | 509 | * a response from the server.
|
510 | 510 | */
|
511 | 511 | if ((client->cluster.nodes [hint - 1].min_wire_version == 0) &&
|
512 |
| - !_mongoc_write_concern_has_gle (write_concern)) { |
| 512 | + !_mongoc_write_concern_needs_gle (write_concern)) { |
513 | 513 | _mongoc_write_command_delete_legacy (command, client, hint, database,
|
514 | 514 | collection, write_concern, result,
|
515 | 515 | error);
|
@@ -582,7 +582,7 @@ _mongoc_write_command_insert (mongoc_write_command_t *command,
|
582 | 582 | * a response from the server.
|
583 | 583 | */
|
584 | 584 | if ((client->cluster.nodes [hint - 1].min_wire_version == 0) &&
|
585 |
| - !_mongoc_write_concern_has_gle (write_concern)) { |
| 585 | + !_mongoc_write_concern_needs_gle (write_concern)) { |
586 | 586 | _mongoc_write_command_insert_legacy (command, client, hint, database,
|
587 | 587 | collection, write_concern, result,
|
588 | 588 | error);
|
@@ -699,7 +699,7 @@ _mongoc_write_command_update (mongoc_write_command_t *command,
|
699 | 699 | * a response from the server.
|
700 | 700 | */
|
701 | 701 | if ((client->cluster.nodes [hint - 1].min_wire_version == 0) &&
|
702 |
| - !_mongoc_write_concern_has_gle (write_concern)) { |
| 702 | + !_mongoc_write_concern_needs_gle (write_concern)) { |
703 | 703 | _mongoc_write_command_update_legacy (command, client, hint, database,
|
704 | 704 | collection, write_concern, result,
|
705 | 705 | error);
|
|
0 commit comments