Skip to content

Instantly share code, notes, and snippets.

@atimin
Created October 26, 2018 10:41
Show Gist options
  • Save atimin/9f44dec413aa1a187cede96071aac3ad to your computer and use it in GitHub Desktop.
Save atimin/9f44dec413aa1a187cede96071aac3ad to your computer and use it in GitHub Desktop.
My workarounds for OpcUa Stack
diff --git a/src/OpcUaStackServer/ServiceSet/Session.cpp b/src/OpcUaStackServer/ServiceSet/Session.cpp
index e6ec6a85..54ba71e4 100644
--- a/src/OpcUaStackServer/ServiceSet/Session.cpp
+++ b/src/OpcUaStackServer/ServiceSet/Session.cpp
@@ -255,10 +255,10 @@ namespace OpcUaStackServer
Log(Debug, "user name invalid");
return BadIdentityTokenInvalid;
}
- if (token->passwordLen() == 0) {
- Log(Debug, "password name invalid");
- return BadIdentityTokenInvalid;
- }
+// if (token->passwordLen() == 0) {
+// Log(Debug, "password name invalid");
+// return BadIdentityTokenInvalid;
+// }
if (endpointDescription_.get() == nullptr) {
Log(Debug, "endpoint description not exist");
return BadIdentityTokenInvalid;
@@ -844,7 +844,7 @@ namespace OpcUaStackServer
sessionIf_->responseMessage(responseHeader, secureChannelTransaction);
// FIXME: BUG - After deleting the session, the monitored item will send a notification. -> CORE
- sessionIf_->deleteSession(authenticationToken_);
+ //sessionIf_->deleteSession(authenticationToken_);
}
}
diff --git a/src/OpcUaStackServer/ServiceSet/Session.cpp b/src/OpcUaStackServer/ServiceSet/Session.cpp
index e6ec6a85..54ba71e4 100644
--- a/src/OpcUaStackServer/ServiceSet/Session.cpp
+++ b/src/OpcUaStackServer/ServiceSet/Session.cpp
@@ -255,10 +255,10 @@ namespace OpcUaStackServer
Log(Debug, "user name invalid");
return BadIdentityTokenInvalid;
}
- if (token->passwordLen() == 0) {
- Log(Debug, "password name invalid");
- return BadIdentityTokenInvalid;
- }
+// if (token->passwordLen() == 0) {
+// Log(Debug, "password name invalid");
+// return BadIdentityTokenInvalid;
+// }
if (endpointDescription_.get() == nullptr) {
Log(Debug, "endpoint description not exist");
return BadIdentityTokenInvalid;
@@ -844,7 +844,7 @@ namespace OpcUaStackServer
sessionIf_->responseMessage(responseHeader, secureChannelTransaction);
// FIXME: BUG - After deleting the session, the monitored item will send a notification. -> CORE
- sessionIf_->deleteSession(authenticationToken_);
+ //sessionIf_->deleteSession(authenticationToken_);
}
}
@atimin
Copy link
Author

atimin commented Oct 26, 2018

Last Kai's commit:
commit 14776ce21a3d2d421b0813111fe20e167481da3d
Author: Kai Huebl [email protected]
Date: Mon May 7 15:37:58 2018 +0200

fix context bug in session

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment