Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
Merge pull request #43 from ali-ince/1.7-add-support-for-bolt-v3
Browse files Browse the repository at this point in the history
Fix Bolt V1
  • Loading branch information
ali-ince authored Sep 19, 2018
2 parents b6f329d + 9c59022 commit 0d4f311
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions seabolt/src/bolt/protocol/v1.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ int BoltProtocolV1_set_begin_tx_bookmark(struct BoltConnection* connection, stru
struct BoltValue* bookmarks;
if (params->size==0) {
BoltValue_format_as_Dictionary(params, 1);
if (BoltDictionary_set_key(params, 0, BOOKMARK_KEY, BOOKMARK_KEY_SIZE)) {
if (BoltDictionary_set_key(params, 0, BOOKMARKS_KEY, BOOKMARKS_KEY_SIZE)) {
return BOLT_PROTOCOL_VIOLATION;
}
bookmarks = BoltDictionary_value(params, 0);
Expand Down Expand Up @@ -736,9 +736,10 @@ int BoltProtocolV1_set_tx_timeout_unsupported(struct BoltConnection* connection,
return BOLT_PROTOCOL_UNSUPPORTED;
}

int BoltProtocolV1_set_tx_bookmark_unsupported(struct BoltConnection* connection, struct BoltValue* value)
int BoltProtocolV1_set_tx_bookmark_ignore(struct BoltConnection* connection, struct BoltValue* value)
{
return BOLT_PROTOCOL_UNSUPPORTED;
// we will ignore bookmarks with this version of the protocol
return BOLT_SUCCESS;
}

int BoltProtocolV1_set_tx_metadata_unsupported(struct BoltConnection* connection, struct BoltValue* value)
Expand Down Expand Up @@ -769,7 +770,7 @@ struct BoltProtocol* BoltProtocolV1_create_protocol()
protocol->clear_run = &BoltProtocolV1_clear_load_run_request;
protocol->set_run_cypher = &BoltProtocolV1_set_run_cypher;
protocol->set_run_cypher_parameter = &BoltProtocolV1_set_run_cypher_parameter;
protocol->set_run_bookmark = &BoltProtocolV1_set_tx_bookmark_unsupported;
protocol->set_run_bookmark = &BoltProtocolV1_set_tx_bookmark_ignore;
protocol->set_run_tx_timeout = &BoltProtocolV1_set_tx_timeout_unsupported;
protocol->set_run_tx_metadata = &BoltProtocolV1_set_tx_metadata_unsupported;
protocol->load_run = &BoltProtocolV1_load_run_request;
Expand Down

0 comments on commit 0d4f311

Please sign in to comment.