-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split connection state machines #120
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Patrik-Stas
force-pushed
the
connection-split
branch
from
September 28, 2020 18:36
9ac2de0
to
42910dc
Compare
mirgee
reviewed
Sep 28, 2020
Patrik-Stas
force-pushed
the
connection-split
branch
2 times, most recently
from
September 29, 2020 07:55
f6c39dd
to
fc233c8
Compare
mirgee
reviewed
Sep 29, 2020
mirgee
reviewed
Sep 29, 2020
mirgee
reviewed
Sep 29, 2020
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
Patrik-Stas
force-pushed
the
v3/restructure-files
branch
from
September 30, 2020 09:12
3003985
to
6b2d424
Compare
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
Patrik-Stas
force-pushed
the
connection-split
branch
from
September 30, 2020 09:19
d14fe4d
to
b8f029a
Compare
mirgee
approved these changes
Sep 30, 2020
Comment on lines
+281
to
+288
} else if let SmConnection::Inviter(sm_inviter) = &self.connection_sm { | ||
trace!("Connection::update_state >>> Inviter found no message to handel on main connection agent. Will check bootstrap agent."); | ||
if let Some((messages, bootstrap_agent_info)) = sm_inviter.get_bootstrap_agent_messages()? { | ||
if let Some((uid, message)) = self.find_message_to_handle(messages) { | ||
trace!("Connection::update_state >>> handling message found on bootstrap agent uid: {:?}", uid); | ||
self.update_state_with_message(&message); | ||
bootstrap_agent_info.update_message_status(uid)?; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should add a one line comment explaining why this is done?
@@ -308,38 +308,30 @@ pub extern fn vcx_connection_connect(command_handle: CommandHandle, | |||
return VcxError::from(VcxErrorKind::InvalidConnectionHandle).into(); | |||
} | |||
|
|||
let options = if !connection_options.is_null() { | |||
let _options = if !connection_options.is_null() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this defined but not used?
mirgee
pushed a commit
that referenced
this pull request
Oct 1, 2020
* Restructure connection state machine files Signed-off-by: Patrik Stas <patrik.stas@absa.africa> * Split connection state machines (#120) * Split connection state machines files Signed-off-by: Patrik Stas <patrik.stas@absa.africa> * Inviter conn should also check bootstrap agent for messages. Refactor. Signed-off-by: Patrik Stas <patrik.stas@absa.africa> * Connection.connect returns invitation for inviter. Refactor Signed-off-by: Patrik Stas <patrik.stas@absa.africa> * Update access modifiers, removed redundant comments Signed-off-by: Patrik Stas <patrik.stas@absa.africa> * Remove unused imports in v3/** Signed-off-by: Patrik Stas <patrik.stas@absa.africa> * Optimize imports, reformat code Signed-off-by: Patrik Stas <patrik.stas@absa.africa> * Error in connection update state should not be ignored Signed-off-by: Patrik Stas <patrik.stas@absa.africa> * Remove outdated test, fix warnings in connection.rs Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Created this as separate PR into
v3/restructure-files
to make these changes easier to digest.DidExchangeStateSM
state machine into 2 separate state machines for inviter and inviteeagent info
, updated to3.0
serialization formatv3/handlers/connection/connection.rs
serves as proxy interface to preserve shared inviter/invitee interface.get_invite_details
. It returns connection invitation only if called on inviter connection in stateInvited
. Otherwise returns error. Previously the code was attempting to construct invitation object from DDO of connection counterparty known at the moment.connect()
on connection now returns connection invitation if the connection is inviter, otherwise returns string{}
Signed-off-by: Patrik Stas patrik.stas@absa.africa