details: https://code.openbravo.com/erp/stable/2.50/rev/a4b00a7a3b4a
changeset: 9587:a4b00a7a3b4a
user: Asier Lostalé <asier.lostale <at> openbravo.com>
date: Thu Jul 28 08:23:57 2011 +0200
summary: fixed bug 18102: Refreshed clone instance is not detected as new one
diffstat:
src/org/openbravo/erpCommon/obps/ActiveInstanceProcess.java | 15 +++++++++++-
1 files changed, 13 insertions(+), 2 deletions(-)
diffs (58 lines):
diff -r 655195a425af -r a4b00a7a3b4a
src/org/openbravo/erpCommon/obps/ActiveInstanceProcess.java
--- a/src/org/openbravo/erpCommon/obps/ActiveInstanceProcess.java Wed Jul
20 17:08:59 2011 +0000
+++ b/src/org/openbravo/erpCommon/obps/ActiveInstanceProcess.java Thu Jul
28 08:23:57 2011 +0200
@@ -11,7 +11,7 @@
* under the License.
* The Original Code is Openbravo ERP.
* The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2009-2010 Openbravo SLU
+ * All portions are Copyright (C) 2009-2011 Openbravo SLU
* All Rights Reserved.
* Contributor(s): ______________________________________.
************************************************************************
@@ -27,6 +27,7 @@
import org.openbravo.dal.service.OBDal;
import org.openbravo.erpCommon.utility.HttpsUtils;
import org.openbravo.erpCommon.utility.OBError;
+import org.openbravo.erpCommon.utility.SystemInfo;
import org.openbravo.model.ad.module.Module;
import org.openbravo.model.ad.system.System;
import org.openbravo.model.ad.system.SystemInformation;
@@ -51,11 +52,17 @@
String[] result = null;
+ System sys = OBDal.getInstance().get(System.class, "0");
+
if (!HttpsUtils.isInternetAvailable()) {
msg.setType("Error");
msg.setMessage("@WSError@");
return;
} else {
+ if (!publicKey.equals(sys.getInstanceKey())) {
+ // Changing license, do not send instance number to get a new one
+ instanceNo = null;
+ }
result = send(publicKey, purpose, instanceNo, activate);
}
@@ -71,7 +78,7 @@
msg.setType("Error");
msg.setMessage("@LicenseWithoutAccessTo@ " + nonAllowedMods);
} else {
- System sys = OBDal.getInstance().get(System.class, "0");
+
sys.setActivationKey(result[1]);
sys.setInstanceKey(publicKey);
ActivationKey.setInstance(ak);
@@ -126,6 +133,10 @@
OBContext.restorePreviousMode();
}
+ content += "&sysId=" + URLEncoder.encode(SystemInfo.getSystemIdentifier(),
"utf-8");
+ content += "&dbId=" + URLEncoder.encode(SystemInfo.getDBIdentifier(),
"utf-8");
+ content += "&macId=" + URLEncoder.encode(SystemInfo.getMacAddress(),
"utf-8");
+
URL url = new URL(BUTLER_URL);
try {
String result = HttpsUtils.sendSecure(url, content);
------------------------------------------------------------------------------
Got Input? Slashdot Needs You.
Take our quick survey online. Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits