2013-08-08 Miguel de Dios <miguel.dedios@artica.es>
* src/pandroid/agent/PandroidAgentListener.java, src/pandroid/agent/PandroidAgentTentacle.java: removed the java warning that the class of tentacle have a method with the same name as a constructor. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8646 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
a36f4b89e8
commit
1e95f6eb64
pandora_agents/android
|
@ -1,3 +1,10 @@
|
||||||
|
2013-08-08 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
|
* src/pandroid/agent/PandroidAgentListener.java,
|
||||||
|
src/pandroid/agent/PandroidAgentTentacle.java: removed the java
|
||||||
|
warning that the class of tentacle have a method with the same name
|
||||||
|
as a constructor.
|
||||||
|
|
||||||
2013-07-03 Miguel de Dios <miguel.dedios@artica.es>
|
2013-07-03 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
* Pandroid Agent v3.0_iso-8859-1.apk, Pandroid Agent v3.0_UTF8.apk:
|
* Pandroid Agent v3.0_iso-8859-1.apk, Pandroid Agent v3.0_UTF8.apk:
|
||||||
|
|
|
@ -149,7 +149,7 @@ public class PandroidAgentListener extends Service {
|
||||||
// "/data/data/pandroid.agent/files/" + destFileName
|
// "/data/data/pandroid.agent/files/" + destFileName
|
||||||
// };
|
// };
|
||||||
//
|
//
|
||||||
// int tentacleRet = new tentacle_client().tentacle_client(tentacleData);
|
// int tentacleRet = new tentacle_client().send(tentacleData);
|
||||||
//
|
//
|
||||||
// // Deleting the file after send it
|
// // Deleting the file after send it
|
||||||
// File file = new File("/data/data/pandroid.agent/files/" + destFileName);
|
// File file = new File("/data/data/pandroid.agent/files/" + destFileName);
|
||||||
|
@ -301,7 +301,7 @@ public class PandroidAgentListener extends Service {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
tentacleRet = new tentacle_client().tentacle_client(tentacleData);
|
tentacleRet = new tentacle_client().send(tentacleData);
|
||||||
|
|
||||||
if (tentacleRet == 0) {
|
if (tentacleRet == 0) {
|
||||||
putSharedData("PANDROID_DATA", "contactError", "0", "integer");
|
putSharedData("PANDROID_DATA", "contactError", "0", "integer");
|
||||||
|
|
|
@ -24,7 +24,7 @@ import java.net.UnknownHostException;
|
||||||
class tentacle_client {
|
class tentacle_client {
|
||||||
|
|
||||||
// Return 0 when success, -1 when error
|
// Return 0 when success, -1 when error
|
||||||
public int tentacle_client(String args[]) {
|
public int send(String args[]) {
|
||||||
|
|
||||||
int port = 41121;
|
int port = 41121;
|
||||||
String send = null;
|
String send = null;
|
||||||
|
@ -39,7 +39,8 @@ class tentacle_client {
|
||||||
for (int i = 0; i < args.length; i++) {
|
for (int i = 0; i < args.length; i++) {
|
||||||
if (i == (args.length - 1)) {
|
if (i == (args.length - 1)) {
|
||||||
filePath = args[i];
|
filePath = args[i];
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
// Get the param if is -* format or empty string otherwise
|
// Get the param if is -* format or empty string otherwise
|
||||||
String last_parameter = parameter;
|
String last_parameter = parameter;
|
||||||
parameter = isParameter(args[i]);
|
parameter = isParameter(args[i]);
|
||||||
|
@ -125,12 +126,14 @@ class tentacle_client {
|
||||||
send = "SEND <" + file.getName() + "> SIZE " + Integer.toString(data.length) + '\n';
|
send = "SEND <" + file.getName() + "> SIZE " + Integer.toString(data.length) + '\n';
|
||||||
getInfo("Client -> Server: " + send, verbose);
|
getInfo("Client -> Server: " + send, verbose);
|
||||||
serverOutput.writeBytes(send);
|
serverOutput.writeBytes(send);
|
||||||
} catch (IOException e) {
|
}
|
||||||
|
catch (IOException e) {
|
||||||
getError("Could not write on server");
|
getError("Could not write on server");
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
serverResponse = serverInput.readLine();
|
serverResponse = serverInput.readLine();
|
||||||
} catch (IOException e) {
|
}
|
||||||
|
catch (IOException e) {
|
||||||
getError("Could not get server response");
|
getError("Could not get server response");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue