From 4bca675b49fdd08f47d811abe57eac16bd8e2953 Mon Sep 17 00:00:00 2001
From: gcontini <1121667+gcontini@users.noreply.github.com>
Date: 周六, 02 5月 2020 21:46:22 +0800
Subject: [PATCH] rename product->feature

---
 src/templates/licensecc_properties.h.in |    2 +-
 src/library/licensecc.cpp               |    4 ++--
 include/licensecc/datatypes.h           |    6 +++---
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/licensecc/datatypes.h b/include/licensecc/datatypes.h
index 8a229ea..cb87f7c 100644
--- a/include/licensecc/datatypes.h
+++ b/include/licensecc/datatypes.h
@@ -102,11 +102,11 @@
 	 * <pre>
 	 * [feature_xx]
 	 * sig=AAAA
-	 * [bb]
-	 * expiry-date
+	 * [another_feature]
+	 * expiry-date=20201111
 	 * </pre>
 	 */
-	char feature_name[LCC_API_PROJECT_NAME_SIZE +
+	char feature_name[LCC_API_FEATURE_NAME_SIZE +
 					  1];  // name of the feature you' (must correspond to the name in the license)
 	/**
 	 * this number passed in by the application must correspond to the magic number used when compiling the library.
diff --git a/src/library/licensecc.cpp b/src/library/licensecc.cpp
index 087d7cf..0573121 100644
--- a/src/library/licensecc.cpp
+++ b/src/library/licensecc.cpp
@@ -77,8 +77,8 @@
 	string project;
 	size_t str_size;
 	if (callerInformation != nullptr &&
-		(str_size = license::mstrnlen_s(callerInformation->project_name, sizeof callerInformation->project_name)) > 0) {
-		project = string(callerInformation->project_name, str_size);
+		(str_size = license::mstrnlen_s(callerInformation->feature_name, sizeof callerInformation->project_name)) > 0) {
+		project = string(callerInformation->feature_name, str_size);
 	} else {
 		project = string(LCC_PROJECT_NAME);
 	}
diff --git a/src/templates/licensecc_properties.h.in b/src/templates/licensecc_properties.h.in
index 55c22a2..15f6452 100644
--- a/src/templates/licensecc_properties.h.in
+++ b/src/templates/licensecc_properties.h.in
@@ -51,7 +51,7 @@
 #define LCC_API_AUDIT_EVENT_NUM 5
 #define LCC_API_AUDIT_EVENT_PARAM2 255
 #define LCC_API_VERSION_LENGTH 15
-#define LCC_API_PROJECT_NAME_SIZE 15
+#define LCC_API_FEATURE_NAME_SIZE 15
 #define LCC_API_EXPIRY_DATE_SIZE 10
 #define LCC_API_ERROR_BUFFER_SIZE 256
 

--
Gitblit v1.9.1