Skip to content

Commit

Permalink
Merge pull request #38 from cryptlex/ahmad/unlimited-implementation
Browse files Browse the repository at this point in the history
refactor: update data type to int64_t for activationLeaseDuration setter
  • Loading branch information
adnan-kamili authored Jul 31, 2024
2 parents 9e2f90d + 9056fbb commit 32b4a6e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 4 additions & 3 deletions lexactivator.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,12 +324,13 @@ func SetLicenseCallback(callbackFunction func(int)) int {
lease duration property is enabled.
PARAMETERS:
* leaseDuration - value of the lease duration.
* leaseDuration - value of the lease duration. A value of -1 indicates unlimited
lease duration.
RETURN CODES: LA_OK, LA_E_PRODUCT_ID, LA_E_LICENSE_KEY
*/
func SetActivationLeaseDuration(leaseDuration uint) int {
cLeaseDuration := (C.uint)(leaseDuration)
func SetActivationLeaseDuration(leaseDuration int64) int {
cLeaseDuration := (C.int64_t)(leaseDuration)
status := C.SetActivationLeaseDuration(cLeaseDuration)
return int(status)
}
Expand Down
5 changes: 3 additions & 2 deletions lexactivator/LexActivator.h
Original file line number Diff line number Diff line change
Expand Up @@ -278,11 +278,12 @@ LEXACTIVATOR_API int LA_CC SetLicenseCallback(CallbackType callback);
lease duration property is enabled.
PARAMETERS:
* leaseDuration - value of the lease duration.
* leaseDuration - value of the lease duration. A value of -1 indicates unlimited
lease duration.
RETURN CODES: LA_OK, LA_E_PRODUCT_ID, LA_E_LICENSE_KEY
*/
LEXACTIVATOR_API int LA_CC SetActivationLeaseDuration(uint32_t leaseDuration);
LEXACTIVATOR_API int LA_CC SetActivationLeaseDuration(int64_t leaseDuration);

/*
FUNCTION: SetActivationMetadata()
Expand Down

0 comments on commit 32b4a6e

Please sign in to comment.