|
|
|
|
|
|
|
|
|
|
xen-api
[Xen-API] [PATCH 6 of 7] CA-34933: test for valid session when calling b
ocaml/xapi/helpers.ml | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
# HG changeset patch
# User Marcus Granado <marcus.granado@xxxxxxxxxx>
# Date 1274449016 -3600
# Node ID a402deb8e3cfdccc5fd3383d7fb96a76a07917a2
# Parent 2cb0cc2a496431b098d0cd44fbb7c33a9ac82f78
CA-34933: test for valid session when calling back master
Signed-off-by: Marcus Granado <marcus.granado@xxxxxxxxxxxxx>
diff -r 2cb0cc2a4964 -r a402deb8e3cf ocaml/xapi/helpers.ml
--- a/ocaml/xapi/helpers.ml
+++ b/ocaml/xapi/helpers.ml
@@ -124,7 +124,11 @@
then session_id
else do_master_login ()
end
- else Context.get_session_id __context
+ else
+ let session_id = Context.get_session_id __context in
+ (* read any attr to test if session is still valid *)
+ Db.Session.get_pool ~__context ~self:session_id;
+ session_id
with _ ->
do_master_login ()
in
xen-api.hg-6.patch
Description: Text Data
_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api
|
|
|
|
|