Guidance
指路人
g.yi.org
Guidance Forums / Reginald Rexx / Possible iNetClose bug

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. Possible iNetClose bug
#12658
Posted by: Doug Arndt 2009-01-26 04:14:53
I have two routines (below), controlled by push buttons.
The first one logs in to a web site, changes to another directory, uploads some files, then logs off.
The second, logs in, and pulls a file then logs off.

The problem is, if the second routine is used following the first one, the second login is "coming up" in the same directory that the upload was in. Not the root directory of a fresh login.  Since the file isn't in that directory, this fails.

After a couple of min looking at the program (and the executing one just waiting) I tried it again, this time the log in failed due to "time out".

If I exit the program, restart, and run the second routine, works fine.

Both actions are telling me the iNetClose isn't closing the ftp connection, since a fresh log in would never come up in the directory I last used, nor should a fresh log in "time out" UNLESS the prior login never logged out.

In the code below, the "Web connection closed" is displayed.

ps, Don't forget the current iNet DLL package has other serious problems (see other post) and I'm using the 2007 flavor.


WM_CLICK_Upload_MP3:

  InetErr = "ERROR"
  InetHeading = 1

  DO
    InetOpen()
    Call Web_Login
    Call Web_ChangeDir WebDir
    Call Web_Upload UpdateTapeFN('a')'.mp3'
    Call Web_Upload UpdateTapeFN('b')'.mp3'
    Call Web_DisplayDir '*.MP3'

    CATCH ERROR
      CONDITION("M")
      RETURN
 
    FINALLY
      err = InetClose('hConnect')
      IF err \== ""
        then ConSay(con1, "InetClose failed:" err)
        else ConSay(con1,"Web connection closed")
 
  END

RETURN


WM_CLICK_UpdateWeb:

  InetErr = "ERROR"
  InetHeading = 1

  DO
    InetOpen()
    Call Web_Login
    Call Web_UpdateHTML
    CATCH ERROR
      CONDITION("M")
      RETURN
 
    FINALLY
      err = InetClose('hConnect')
    IF err \== ""
      then ConSay(con1, "InetClose failed:" err)
      else ConSay(con1,"Web connection closed")
 
  END
RETURN
Doug
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Wed 2024-2-21  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0