File tree Expand file tree Collapse file tree 5 files changed +14
-2
lines changed Expand file tree Collapse file tree 5 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,8 @@ let _ =
7070 () ;
7171 error Api_errors. license_checkout_error [" reason" ]
7272 ~doc: " The license for the edition you requested is not available." () ;
73+ error Api_errors. license_server_certificate_error [" reason" ]
74+ ~doc: " The license server certificate check error." () ;
7375 error Api_errors. license_file_deprecated []
7476 ~doc:
7577 " This type of license file is for previous versions of the server. \
Original file line number Diff line number Diff line change @@ -5249,9 +5249,12 @@ let with_license_server_changes printer rpc session_id params hosts f =
52495249 hosts
52505250 ) ;
52515251 let now = Unix. gettimeofday () in
5252+ let need_roll_back errname =
5253+ errname = Api_errors. license_checkout_error
5254+ || errname = Api_errors. license_server_certificate_error
5255+ in
52525256 try f rpc session_id with
5253- | Api_errors. Server_error (name, _) as e
5254- when name = Api_errors. license_checkout_error ->
5257+ | Api_errors. Server_error (name , _ ) as e when need_roll_back name ->
52555258 (* Put back original license_server_details *)
52565259 List. iter
52575260 (fun (host , license_server ) ->
Original file line number Diff line number Diff line change @@ -919,6 +919,9 @@ let missing_connection_details = add_error "MISSING_CONNECTION_DETAILS"
919919
920920let license_checkout_error = add_error " LICENSE_CHECKOUT_ERROR"
921921
922+ let license_server_certificate_error =
923+ add_error " LICENSE_SERVER_CERTIFICATE_ERROR"
924+
922925let license_file_deprecated = add_error " LICENSE_FILE_DEPRECATED"
923926
924927let activation_while_not_free = add_error " ACTIVATION_WHILE_NOT_FREE"
Original file line number Diff line number Diff line change @@ -79,6 +79,8 @@ type errors =
7979 date *)
8080 | License_processing_error (* * License could not be processed *)
8181 | License_checkout_error of string (* * License could not be checked out *)
82+ | License_server_certificate_error of string
83+ (* * License server certificate error *)
8284 | Missing_connection_details
8385 (* * Thrown if connection port or address parameter not supplied to
8486 check_license *)
Original file line number Diff line number Diff line change @@ -2070,6 +2070,8 @@ let apply_edition_internal ~__context ~host ~edition ~additional =
20702070 raise Api_errors. (Server_error (missing_connection_details, [] ))
20712071 | V6_interface. (V6_error (License_checkout_error s )) ->
20722072 raise Api_errors. (Server_error (license_checkout_error, [s]))
2073+ | V6_interface. (V6_error (License_server_certificate_error s )) ->
2074+ raise Api_errors. (Server_error (license_server_certificate_error, [s]))
20732075 | V6_interface. (V6_error (Internal_error e )) ->
20742076 raise Api_errors. (Server_error (internal_error, [e]))
20752077 in
You can’t perform that action at this time.
0 commit comments