Android Question Library jkSSH2 and sub FileUploadCompleted

Discussion in 'Android Questions' started by AlpVir, Dec 12, 2015.

  1. AlpVir

    AlpVir Well-Known Member Licensed User

    How do you use the sub FileUploadCompleted ?
    I wrote
    Code:
    Sub SSH_FileUploadCompleted(Success As Boolean, RemoteFile As String, LocalTargetDirectory As String, TaskId As Int)
        
    If Success=True Then
            
    msgbox ("OK","")    
        
    Else
           
        
    End If
    End Sub
    but it appears the error :
     
  2. DonManfred

    DonManfred Expert Licensed User

    The signature does not match.
    As seen in XML is must be

    I dont know (not using this lib) but i guess it should be something like

    Code:
    Sub SSH_FileUploadCompleted(Success As Boolean, LocalFile As String, RemoteTargetDirectory As String, Mode As String, TaskId As Int))
        
    If Success=True Then
            
    msgbox ("OK","")  
        
    Else
         
        
    End If
    End Sub
     
    Last edited: Dec 12, 2015
  3. AlpVir

    AlpVir Well-Known Member Licensed User

    Thank you for quick response. I realized that you can read the XML file libraries and obtain useful information.
    However, there remains the error !
    Precise that the similar function SSH2.getFile working properly.
    putFile call like this:

    Code:
    If (File.Exists(File.DirRootExternal,"config.txt")) Then
                    SSH2.putFile  (
    File.DirRootExternal & "/config.txt","/home/UGO","0666" ,22)
                
    Else
                    
    Msgbox ("no","")   
                
    End If
    Code:
    Sub SSH_FileUploadCompleted(Success As Boolean, LocalFile As String, RemoteTargetDirectory As String, TaskId As Int)
        
    Msgbox ("upload completato","")
        
    Dim C            As String
        C=
    "config.txt"
        
    If Success=True Then
            
    File.Delete (File.DirRootExternal ,C)
            
    ExitApplication
        
    Else
           
        
    End If
       
    End Sub
     
  4. DonManfred

    DonManfred Expert Licensed User

    Yes, sure! You DID NOT CHANGED THE SIGNATURE! No wonder then that the error still remains.

    Why you are asking for help and when you get an answer you then totally ignore it?

    It is NOT fun for me if my hints are totally ignored! I´m out here. Dont expect more answers from me.
     
    Last edited: Dec 12, 2015
    AlpVir likes this.
  5. AlpVir

    AlpVir Well-Known Member Licensed User

    I apologize. I read your intervention on my smartphone and I had not done too much attention; it seemed that there were no significant changes compared to what I had written myself.
    I was wrong. Now everything is OK and the procedure works!
    I hope you keep in mind that there is need of the most experienced and continue to improve.
    Sorry again; also for my bad English.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice