summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNils Schwabe2014-08-25 14:55:48 +0200
committerNils Schwabe2014-08-25 14:55:48 +0200
commitab02e581aefff5e075d60731e8c23f1ef24a695d (patch)
tree4264d8a9bf91343a5e5776e0a212f97f42a9f789 /src
parentAdd accidentally removed apostrophes back to DbImage (diff)
downloadsatellite-daemon-ab02e581aefff5e075d60731e8c23f1ef24a695d.tar.gz
satellite-daemon-ab02e581aefff5e075d60731e8c23f1ef24a695d.tar.xz
satellite-daemon-ab02e581aefff5e075d60731e8c23f1ef24a695d.zip
Fix new thriftconnection things
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/openslx/satellitedaemon/db/DbImage.java2
-rw-r--r--src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java9
2 files changed, 6 insertions, 5 deletions
diff --git a/src/main/java/org/openslx/satellitedaemon/db/DbImage.java b/src/main/java/org/openslx/satellitedaemon/db/DbImage.java
index db90116..77709e7 100644
--- a/src/main/java/org/openslx/satellitedaemon/db/DbImage.java
+++ b/src/main/java/org/openslx/satellitedaemon/db/DbImage.java
@@ -3,7 +3,7 @@ package org.openslx.satellitedaemon.db;
import java.util.List;
/**
- * Represents an image in the satellites database (mostly from
+ * Represents an image in the satellite's database (mostly from
* m_VLData_imageInfo)
*/
public class DbImage
diff --git a/src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java b/src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java
index b813f15..ed08c85 100644
--- a/src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java
+++ b/src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java
@@ -15,7 +15,8 @@ import org.apache.log4j.Logger;
import org.apache.thrift.TException;
import org.apache.thrift.protocol.TBinaryProtocol;
import org.apache.thrift.protocol.TProtocol;
-import org.apache.thrift.transport.TNonblockingSocket;
+import org.apache.thrift.transport.TFramedTransport;
+import org.apache.thrift.transport.TSocket;
import org.apache.thrift.transport.TTransport;
import org.openslx.imagemaster.crcchecker.CrcFile;
import org.openslx.imagemaster.thrift.iface.AuthorizationError;
@@ -388,15 +389,15 @@ public class ThriftConnection {
private static ImageServer.Client newClient() throws IOException {
ImageServer.Client newClient = null;
try {
- TTransport transport;
- transport = new TNonblockingSocket(
+ TTransport transport = new TFramedTransport( new TSocket(
Globals.getMasterserverHost(),
- Globals.getThriftPort());
+ Globals.getThriftPort()));
transport.open();
TProtocol protocol = new TBinaryProtocol(transport);
newClient = new ImageServer.Client(protocol);
log.debug("ThriftConnection: Made a new Client");
} catch (TException x) {
+ // TODO: Exception handling
log.error("ThriftConnection coudn't create new client.");
x.printStackTrace();
return null;