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
|
@ -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>
|
||||
|
||||
* 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
|
||||
// };
|
||||
//
|
||||
// int tentacleRet = new tentacle_client().tentacle_client(tentacleData);
|
||||
// int tentacleRet = new tentacle_client().send(tentacleData);
|
||||
//
|
||||
// // Deleting the file after send it
|
||||
// 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) {
|
||||
putSharedData("PANDROID_DATA", "contactError", "0", "integer");
|
||||
|
|
|
@ -24,7 +24,7 @@ import java.net.UnknownHostException;
|
|||
class tentacle_client {
|
||||
|
||||
// Return 0 when success, -1 when error
|
||||
public int tentacle_client(String args[]) {
|
||||
public int send(String args[]) {
|
||||
|
||||
int port = 41121;
|
||||
String send = null;
|
||||
|
@ -36,17 +36,18 @@ class tentacle_client {
|
|||
boolean verbose = false;
|
||||
File file = new File("");
|
||||
|
||||
for (int i=0;i<args.length;i++) {
|
||||
if(i == (args.length - 1)) {
|
||||
for (int i = 0; i < args.length; i++) {
|
||||
if (i == (args.length - 1)) {
|
||||
filePath = args[i];
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
// Get the param if is -* format or empty string otherwise
|
||||
String last_parameter = parameter;
|
||||
parameter = isParameter(args[i]);
|
||||
|
||||
// If is not -* param check the previous param
|
||||
if(parameter.equals("")) {
|
||||
if(last_parameter.equals("-a")) {
|
||||
if (parameter.equals("")) {
|
||||
if (last_parameter.equals("-a")) {
|
||||
address = args[i];
|
||||
}
|
||||
else if(last_parameter.equals("-p")) {
|
||||
|
@ -55,7 +56,7 @@ class tentacle_client {
|
|||
}
|
||||
|
||||
// The solo params are checked otherwise
|
||||
if(parameter.equals("-v")) {
|
||||
if (parameter.equals("-v")) {
|
||||
verbose = true;
|
||||
}
|
||||
}
|
||||
|
@ -125,12 +126,14 @@ class tentacle_client {
|
|||
send = "SEND <" + file.getName() + "> SIZE " + Integer.toString(data.length) + '\n';
|
||||
getInfo("Client -> Server: " + send, verbose);
|
||||
serverOutput.writeBytes(send);
|
||||
} catch (IOException e) {
|
||||
}
|
||||
catch (IOException e) {
|
||||
getError("Could not write on server");
|
||||
}
|
||||
try {
|
||||
serverResponse = serverInput.readLine();
|
||||
} catch (IOException e) {
|
||||
}
|
||||
catch (IOException e) {
|
||||
getError("Could not get server response");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue