]> Joshua Wise's Git repositories - dumload.git/commitdiff
Fix port usage and always try to add the generated key
authorasmw <asmw@asmw.de>
Mon, 20 Feb 2012 09:54:23 +0000 (10:54 +0100)
committerasmw <asmw@asmw.de>
Mon, 20 Feb 2012 09:54:23 +0000 (10:54 +0100)
src/com/joshuawise/dumload/Uploader.java

index e7725e9603f967282f5b59f8e60f6c7772b03ed4..d81441afdeeacb34a207d409963f9db3ecead785 100644 (file)
@@ -284,10 +284,14 @@ public class Uploader extends Service implements Runnable, UserInfo, UIKeyboardI
                                jsch.addIdentity(homedir + "/id_dsa");
                        } catch (java.lang.Exception e) {
                        }
                                jsch.addIdentity(homedir + "/id_dsa");
                        } catch (java.lang.Exception e) {
                        }
+                       try {
+                               jsch.addIdentity(homedir + "/id_dsa_generated");
+                       } catch (java.lang.Exception e) {
+                       }
                        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
                        String server = prefs.getString("server", "").trim();
                        String userName = prefs.getString("userName", "").trim();
                        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
                        String server = prefs.getString("server", "").trim();
                        String userName = prefs.getString("userName", "").trim();
-                       Integer port = prefs.getInt("serverPort", 22);
+                       Integer port = Integer.valueOf(prefs.getString("port", "22"));
                        Log.d("dbg", userName + "@" + server + ":" + port);
                        Session s = jsch.getSession(userName, server, port);
                        s.setUserInfo(this);
                        Log.d("dbg", userName + "@" + server + ":" + port);
                        Session s = jsch.getSession(userName, server, port);
                        s.setUserInfo(this);
This page took 0.057163 seconds and 4 git commands to generate.