git://git.nikiroo.be
/
fanfix.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update nikiroo-utils
[fanfix.git]
/
src
/
be
/
nikiroo
/
fanfix
/
library
/
RemoteLibrary.java
diff --git
a/src/be/nikiroo/fanfix/library/RemoteLibrary.java
b/src/be/nikiroo/fanfix/library/RemoteLibrary.java
index e7b98282b422786eb95a077056a987039984cbfd..f1ff214d5671f3cf52bc4a82e1472a2d9b9e414f 100644
(file)
--- a/
src/be/nikiroo/fanfix/library/RemoteLibrary.java
+++ b/
src/be/nikiroo/fanfix/library/RemoteLibrary.java
@@
-81,12
+81,12
@@
public class RemoteLibrary extends BasicLibrary {
public RemoteLibrary(String key, String host, int port) {
int index = -1;
if (key != null) {
public RemoteLibrary(String key, String host, int port) {
int index = -1;
if (key != null) {
- key.indexOf('|');
+
index =
key.indexOf('|');
}
if (index >= 0) {
}
if (index >= 0) {
- this.key = key.substring(
index + 1
);
- this.subkey = key.substring(
0, index
);
+ this.key = key.substring(
0, index
);
+ this.subkey = key.substring(
index + 1
);
} else {
this.key = key;
this.subkey = "";
} else {
this.key = key;
this.subkey = "";
@@
-143,11
+143,11
@@
public class RemoteLibrary extends BasicLibrary {
@Override
protected void onError(Exception e) {
@Override
protected void onError(Exception e) {
-
//
if (e instanceof SSLException) {
- result[0] = Status.UNAUTHORIZED;
-
//
} else {
-
//
result[0] = Status.UNAVAILABLE;
-
//
}
+ if (e instanceof SSLException) {
+
result[0] = Status.UNAUTHORIZED;
+ } else {
+
result[0] = Status.UNAVAILABLE;
+ }
}
}.connect();
} catch (UnknownHostException e) {
}
}.connect();
} catch (UnknownHostException e) {