m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMagdalena Grodzińska <mag.grodzinska@gmail.com>2020-01-14 23:47:05 +0100
committerMagdalena Grodzińska <mag.grodzinska@gmail.com>2020-01-14 23:47:05 +0100
commit581e6c3aaf418665a9c1254537821f341442b724 (patch)
tree571625a7bfe0faa0e0a83a621c96f3dc74f06d63 /src
parentebee2e36646254983635053ed607436c5ea34eac (diff)
Fix stanik
Diffstat (limited to 'src')
-rw-r--r--src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/Stanik.java27
1 files changed, 16 insertions, 11 deletions
diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/Stanik.java b/src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/Stanik.java
index efc5605..8f0b13f 100644
--- a/src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/Stanik.java
+++ b/src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/Stanik.java
@@ -226,23 +226,28 @@ public class Stanik extends Module {
for (Entry<Attribute, ValueQuery> entry : message.getQueries().entrySet()) {
Attribute attribute = entry.getKey();
ValueQuery query = entry.getValue();
- try {
- if (query.isInstalled()) {
+ System.out.println(query.getSignature());
+ System.out.println(query);
+ System.out.println(query.getCode());
+ if (!attribute.getName().equals("&cardinality") && ! attribute.getName().equals("&contacts")) {
+ try {
+ if (query.isInstalled()) {
QuerySignerApiImplementation.validateInstallQuery(
attribute.getName(),
QueryUtils.constructQueryData(query),
this.publicKey);
- } else {
- QuerySignerApiImplementation.validateUninstallQuery(
- attribute.getName(),
- QueryUtils.constructQueryData(query),
- this.publicKey);
+ } else {
+ QuerySignerApiImplementation.validateUninstallQuery(
+ attribute.getName(),
+ QueryUtils.constructQueryData(query),
+ this.publicKey);
+ }
+ } catch (RemoteException | IllegalBlockSizeException | InvalidKeyException | BadPaddingException | NoSuchAlgorithmException | NoSuchPaddingException | QuerySigner.InvalidQueryException e) {
+ System.out.println("ERROR: Query " + attribute.getName() + " was not updated in Stanik with error message " + e.getMessage());
+ e.printStackTrace();
+ continue;
}
- } catch (RemoteException | IllegalBlockSizeException | InvalidKeyException | BadPaddingException | NoSuchAlgorithmException | NoSuchPaddingException | QuerySigner.InvalidQueryException e) {
- System.out.println("ERROR: Query " + attribute.getName() + " was not updated in Stanik with error message " + e.getMessage());
- e.printStackTrace();
- continue;
}
ValueTime timestamp = new ValueTime(entry.getValue().getTimestamp());
ValueQuery currentTimestampedQuery = queries.get(attribute);