From ebf2e0d8ee10d1ba89b76bd7df1fd10ba6870d9a Mon Sep 17 00:00:00 2001
From: Peter Hormanns <peter.hormanns@hostsharing.net>
Date: Thu, 19 May 2011 19:37:29 +0200
Subject: [PATCH] Probleme mit Hive

---
 hsarback/src/de/hsadmin/remote/PacRemote.java |    2 +-
 hsarback/src/de/hsadmin/mods/pac/Pac.java     |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/hsarback/src/de/hsadmin/mods/pac/Pac.java b/hsarback/src/de/hsadmin/mods/pac/Pac.java
index 533e30b..8dc6734 100644
--- a/hsarback/src/de/hsadmin/mods/pac/Pac.java
+++ b/hsarback/src/de/hsadmin/mods/pac/Pac.java
@@ -87,6 +87,7 @@
 	public Pac() {
 		basepac = new BasePac();
 		curINetAddr = new INetAddress();
+		hive = new Hive();
 	}
 
 	public Pac(String name, Customer cust, BasePac basePac, Hive hive) {
diff --git a/hsarback/src/de/hsadmin/remote/PacRemote.java b/hsarback/src/de/hsadmin/remote/PacRemote.java
index c64f6de..3de8a4a 100644
--- a/hsarback/src/de/hsadmin/remote/PacRemote.java
+++ b/hsarback/src/de/hsadmin/remote/PacRemote.java
@@ -76,7 +76,7 @@
 		}
 		Hive hive = pac.getHive();
 		String hiveName = setParams.get("hive");
-		if (hive == null && assertNotNull(hiveName)) {
+		if ((hive == null || hive.getName() == null) && assertNotNull(hiveName)) {
 			hive = new Hive();
 			hive.setName(hiveName);
 			pac.setHive(hive);

--
Gitblit v1.9.1