Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.

Commit

Permalink
PHP-1511: append_gle should ignore unset fsync/journal from link
Browse files Browse the repository at this point in the history
  • Loading branch information
jmikola committed Apr 25, 2016
1 parent f9d8e51 commit 16c9a1e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions collection.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,11 +378,13 @@ static zval* append_getlasterror(zval *coll, mongo_buffer *buf, zval *options, m
php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "The 'MongoCursor::$timeout' static property is deprecated, please call MongoCursor->timeout() instead");
}

/* Get the default value for journalling */
fsync = link->servers->options.default_fsync;
journal = link->servers->options.default_journal;

/* Read the default_* properties from the link */
if (link->servers->options.default_fsync != -1) {
fsync = link->servers->options.default_fsync;
}
if (link->servers->options.default_journal != -1) {
journal = link->servers->options.default_journal;
}
if (link->servers->options.default_w != -1) {
w = link->servers->options.default_w;
}
Expand Down

0 comments on commit 16c9a1e

Please sign in to comment.