• Help

    From Wayne Steele@3:633/690 to All on Sun Oct 9 07:44:00 2005
    Hi All,

    I'm trying too workout why elebbs ftp server fails to send longfilenames with spaces but will send longfilenames without spaces correctly... When you try and
    send lfn with spaces it sends 0 bytes and resends :( comes back with a 450 error...

    Below is the code for sending the file was hoping to have the file put into " " how does one do this?

    procedure cmdRetr(const CurSlot: Longint; var ParamString: String);
    var ResStr : String;
    WildCardStr : String;
    ListGroup : Longint;
    ListArea : Longint;

    FilesInf : FilesRecord;

    Temp_F : pFileObj;
    InvalidDir : Boolean;
    DidRead : Longint;
    Counter : Longint;
    DidSent : Longint;
    TmpBuf : Array[0..4095] of Char;
    begin
    {-- we default to the current group/area listing -------------------------} ListArea := ftpConnectionRec(Connections[CurSlot].SrvData^).CurArea;
    ListGroup := ftpConnectionRec(Connections[CurSlot].SrvData^).CurGroup;

    {-- make sure we can retrieve the file etc, then actually send it --------} with ftpConnectionRec(Connections[Curslot].SrvData^) do
    begin
    {-- Break it up ------------------------------------------------------} GetPartsFromDir(ParamString,
    WildCardStr,
    CurSlot,
    InvalidDir,
    ListGroup,
    ListArea);

    {-- Get the file path ------------------------------------------------} GetFilesRecord(FilesInf, ListArea, true);

    {-- if we have access to this group ----------------------------------}
    if NOT CheckFileAreaAccess(FilesInf,
    TRUE, { download }
    FALSE, { groupcheck }
    FALSE, { upload check }
    FALSE, { list access }
    ListGroup,
    ftpConnectionRec(
    Connections[CurSlot].SrvData^).Exitinfo){ exitinfo } then
    WildCardStr := ö;

    {-- we should add checks wether the file is unavailable, missing, etc-}
    {-- to it, but currently we only do that at the listing part ---------}

    {-- make sure we have download access --------------------------------}
    if WildcardStr <> ö then
    begin
    {-- Now try opening the file -------------------------------------}
    New(Temp_F, Init);
    Temp_F^.Assign(FilesInf.FilePath + StripIllegal(WildCardStr));
    Temp_F^.FileMode := ReadMode + DenyNone;

    if Temp_F^.Open(1) then
    begin
    {-- open data connections ------------------------------------}
    if OpenDataConnection(CurSlot, ResStr) then
    begin
    {-- we have a working dataconnection, use it as we want --}
    while (NOT Temp_F^.EOF) AND (DataThread.ConnectionAlive) do
    begin
    {-- read the required data ---------------------------}
    DidRead := Temp_F^.BlkRead(TmpBuf, SizeOf(TmpBuf));

    {-- create a small loop to ensure we send everything -}
    Counter := 0;

    while (Counter < DidRead) AND (DataThread.ConnectionAlive) do
    begin
    DataThread.SendBuf(TmpBuf[Counter], (DidRead - Counter), DidSent);

    if DidSent = DidRead then
    Inc(Counter, DidSent)
    else DataThread.DoSleep(100);
    end; { while }

    end; { while }

    {-- and eventually close it again ------------------------} CloseDataConnection(CurSlot, true);
    end; { if }
    end { file open }
    else SendCodeStr(CurSlot, 450);

    {-- and close the file -------------------------------------------} Dispose(Temp_F, Done);
    end { if }
    else begin
    SendCodeStr(CurSlot, 450);
    end; { file is not available (security) }
    end; { with }
    end; { proc. cmdRetr }



    Thanking anyone in adavnce...

    Lata,
    zomorf
    ---
    * Origin: Come & Visit for a Kick@ss EleBBS & EleWEB BBS (3:633/690)
  • From Roelof Beverdam@2:280/5218 to Wayne Steele on Sun Oct 30 10:42:58 2005
    Hello Wayne,

    I'm trying too workout why elebbs ftp server fails to send longfilenames with spaces but will send longfilenames without spaces correctly...

    Quite likely... ;-)

    Below is the code for sending the file was hoping to have the file put
    into " " how does one do this?

    Impossible to tell.

    GetPartsFromDir(ParamString,
    WildCardStr,
    CurSlot,
    InvalidDir,
    ListGroup,
    ListArea);

    This one is probably the origin, but as long as it is unclear what GetPartsFromDir does, it is impossible to help any further. Al depends on the CSI of this procedure.

    Cheers,
    Roelof Beverdam

    --- Dutchie V3.10.11
    * Origin: The Beaver's Nest (2:280/5218)
  • From Scott Adams@1:112/91 to Wayne Steele on Thu Nov 10 20:21:19 2005
    Quoting Wayne Steele to All <=-


    I'm trying too workout why elebbs ftp server fails to send
    longfilenames with spaces but will send longfilenames without spaces correctly... When you try and send lfn with spaces it sends 0 bytes
    and resends :( comes back with a 450 error...
    Below is the code for sending the file was hoping to have the file put into " " how does one do this?
    procedure cmdRetr(const CurSlot: Longint; var ParamString: String);

    450? Which pascal you using?
    Tp? bp? bp7?

    450 is not a standard error I believe if I recall they
    go up to the 170s only. But I'd have to check.

    Also where does it bomb out do you debug it?

    Which line does it stop at?


    ... "Well there is such a thing as privacy." - Ivanova
    --- Fringe BBS
    * Origin: EWOG II - The Fringe - 904-733-1721 (1:112/91)
  • From Wayne Steele@3:633/690 to Scott Adams on Sat Nov 19 07:53:00 2005
    Hi Scott,


    I'm trying too workout why elebbs ftp server fails to send
    longfilenames with spaces but will send longfilenames without
    spaces correctly... When you try and send lfn with spaces it
    sends 0 bytes and resends :( comes back with a 450 error...
    Below is the code for sending the file was hoping to have the
    file put into " " how does one do this? procedure cmdRetr(const
    CurSlot: Longint; var ParamString: String);

    450? Which pascal you using? Tp? bp? bp7?

    That's the error in the ftpserver :) vpis what i compile with it
    compiles aok...

    450 is not a standard error I believe if I recall they
    go up to the 170s only. But I'd have to check.

    probably correct..

    Also where does it bomb out do you debug it?

    don't know how :)

    Which line does it stop at?

    It doesn't...

    Lata, badnewsbbs@westnet.com.au
    zomorf ICQ 12489905 offline
    telnet ftp news http://badnews.bbs.us

    ... Blue Wave - World Tour - 1996

    ---
    * Origin: badnews.bbs.us for a Kick@ss EleBBS & EleWEB BBS (3:633/690)
  • From Wayne Steele@3:633/690 to Roelof Beverdam on Sun Nov 27 07:46:00 2005
    Hi Roelof,

    GetPartsFromDir(ParamString,
    WildCardStr,
    CurSlot,
    InvalidDir,
    ListGroup,
    ListArea);

    This one is probably the origin, but as long as it is unclear
    what GetPartsFromDir does, it is impossible to help any further.
    Al depends on the CSI of this procedure.

    OK I did eventually get the filename in " quotes which actually broke
    all the file downloads:)

    Here is what happens again...

    allfiles send AOK unless there is a space in the filename... If there
    is a space in the file name it seems to try and send the right
    filename but always sends 0 bytes and then tries to resend the file...

    I do have the EleBBS source code as it was publicly available (not at
    present from the authors site which is down) I'd like to learn a
    little more on how to program and also track errors... I have fixed a
    few minor things and tweaked the code for myself but nothing major...

    If you have ever ran an RA based BBS EleBBS is RA on steroids... Would
    be nice to get a group of programmers together to try and kick EleBBS
    into gear again and also track some errors down...

    If anyone would be interested in helping with this project I can email
    the code or can make it available via ftp...

    Thanking anyone in advance...

    Thanks also Roelof

    Lata,
    zomorf
    http ftp news telnet badnews.bbs.us

    ... What do you mean? You actually read this tagline?!?

    ---
    * Origin: badnews.bbs.us for a Kick@ss EleBBS & EleWEB BBS (3:633/690)
  • From Scott Adams@1:112/91 to Wayne Steele on Sat Dec 24 00:05:17 2005
    Quoting Wayne Steele to Scott Adams <=-


    I'm trying too workout why elebbs ftp server fails to send
    longfilenames with spaces but will send longfilenames without
    spaces correctly... When you try and send lfn with spaces it
    sends 0 bytes and resends :( comes back with a 450 error...
    Below is the code for sending the file was hoping to have the
    file put into " " how does one do this? procedure cmdRetr(const
    CurSlot: Longint; var ParamString: String);

    450? Which pascal you using? Tp? bp? bp7?

    That's the error in the ftpserver :) vpis what i compile with it
    compiles aok...

    Doh!...450 web...yeah..got it now :)

    450 is not a standard error I believe if I recall they
    go up to the 170s only. But I'd have to check.

    probably correct..

    :)

    Also where does it bomb out do you debug it?

    don't know how :)

    Don't know how to debug in visual pascal? Most compilers
    come with good debuggers and profilers. Theres tons
    of documents out there on debugging code.

    Which line does it stop at?

    It doesn't...

    Well due to lack of info can't help much :<


    ... "You do know what this entails?" - Ivanova
    --- Fringe BBS
    * Origin: EWOG II - The Fringe - 904-733-1721 (1:112/91)
  • From Wayne Steele@3:633/690 to Scott Adams on Sun Dec 25 08:56:00 2005
    Hi Scott,

    Won't quote anything from our previous post:)

    OK what happens is this once compiled the FTPserver will SEND files
    correctly untill I try and send a

    long file name with spaces.exe

    When this happens it sends 0 bytes and tries to do a resend straight
    away... The filename is created at the other end but the file is never
    sent...

    I was trying to maybe put the filename in quotes " but this didn't
    work either... So for some reason it's sending the right filename but
    not actually sending the file:(

    It does work on DOSfilenames and also longfilenameswithoutspaces.exe
    but not with spaces...

    I can send you the ftpserv.pas file if this may help...

    Lata, badnewsbbs@westnet.com.au
    zomorf ICQ 12489905 offline
    telnet ftp news http://badnews.bbs.us

    ... Pardon me, but would you have any Blue Poupon?

    ---
    * Origin: badnews.bbs.us for a Kick@ss EleBBS & EleWEB BBS (3:633/690)
  • From Scott Adams@1:112/91 to Wayne Steele on Tue Feb 14 00:01:46 2006
    Quoting Wayne Steele to Scott Adams <=-











    Won't quote anything from our previous post:)

    That's bad. I don't know what the conversation was. :)
    I've been to the Bahamas and don't post that often
    I tend to forget with 100 plus posts I do when i do. :)

    OK what happens is this once compiled the FTPserver will SEND files correctly untill I try and send a

    long file name with spaces.exe

    When this happens it sends 0 bytes and tries to do a resend straight away... The filename is created at the other end but the file is never sent...

    I was trying to maybe put the filename in quotes " but this didn't
    work either... So for some reason it's sending the right filename but
    not actually sending the file:(

    It does work on DOSfilenames and also longfilenameswithoutspaces.exe
    but not with spaces...

    I can send you the ftpserv.pas file if this may help...

    That's interesting. I forget the original problem. But
    if its sending the filename then that would be my guess
    as the problem but it is. Weird. Have you converted
    teh spaces to something else (like #) and then converting
    them back on the other side? I could look at the code
    though if you need me to.


    ... "Do you have any idea why we're here?" - Sheridan
    --- Fringe BBS
    * Origin: EWOG II - The Fringe - 904-733-1721 (1:112/91)
  • From Wayne Steele@3:633/690 to Scott Adams on Thu Feb 16 13:22:00 2006
    Hi Scott,

    That's interesting. I forget the original problem. But if its
    sending the filename then that would be my guess as the problem
    but it is. Weird. Have you converted teh spaces to something
    else (like #) and then converting them back on the other side? I
    could look at the code though if you need me to.

    Got the problem solved and Scott Little also added resume download
    support... So alls well that ends well...

    Lata, badnewsbbs@westnet.com.au
    zomorf zomorf @ Yahoo!msngr
    telnet ftp news kdx http://badnews.bbs.us

    ... Mary had a little RAM -- only about a MEG or so.

    ---
    * Origin: badnews.bbs.us for a Kick@ss EleBBS & EleWEB BBS (3:633/690)
  • From Scott Adams@1:112/91 to Wayne Steele on Tue Apr 11 04:28:28 2006
    Quoting Wayne Steele to Scott Adams <=-

    That's interesting. I forget the original problem. But if its
    sending the filename then that would be my guess as the problem
    but it is. Weird. Have you converted teh spaces to something
    else (like #) and then converting them back on the other side? I
    could look at the code though if you need me to.

    Got the problem solved and Scott Little also added resume download support... So alls well that ends well...

    Cool. Resume download....I did that stuff in college even
    before Zmodem had that....the good old days....course
    I recall days of the 14.4 when resume was a godsend!


    ... Anatomically impossible, Mr. Garibaldi...
    --- Fringe BBS
    * Origin: EWOG II - The Fringe - 904-733-1721 (1:112/91)
  • From Wayne Steele@3:633/690 to Scott Adams on Sat Apr 22 07:51:00 2006
    Hi Scott,

    Got the problem solved and Scott Little also added resume
    download support... So alls well that ends well...

    Cool. Resume download....I did that stuff in college even
    before Zmodem had that....the good old days....course

    Well the EleFTP works nicely actually... So thanks for everyone that
    help or sent any info muchly appreciated...

    Lata, badnewsbbs@dodo.com.au
    zomorf zomorf @ Yahoo!msngr
    telnet ftp news kdx http://badnews.bbs.us

    ... We now return to our regularly scheduled flame-throwing.

    ---
    * Origin: badnews.bbs.us for a Kick@ss EleBBS & EleWEB BBS (3:633/690)
  • From Wayne Steele@3:633/690 to Scott Adams on Sat Apr 22 07:51:00 2006
    Hi Scott,

    Got the problem solved and Scott Little also added resume
    download support... So alls well that ends well...

    Cool. Resume download....I did that stuff in college even
    before Zmodem had that....the good old days....course

    Well the EleFTP works nicely actually... So thanks for everyone that
    help or sent any info muchly appreciated...

    Lata, badnewsbbs@dodo.com.au
    zomorf zomorf @ Yahoo!msngr
    telnet ftp news kdx http://badnews.bbs.us

    ... We now return to our regularly scheduled flame-throwing.

    ---
    * Origin: badnews.bbs.us for a Kick@ss EleBBS & EleWEB BBS (3:633/690)
  • From Scott Adams@1:112/91 to Wayne Steele on Sat Jun 17 01:00:31 2006
    Quoting Wayne Steele to Scott Adams <=-

    Got the problem solved and Scott Little also added resume
    download support... So alls well that ends well...

    Cool. Resume download....I did that stuff in college even
    before Zmodem had that....the good old days....course

    Well the EleFTP works nicely actually... So thanks for everyone that
    help or sent any info muchly appreciated...

    No problem.



    ... Never play freeze tag with a White Dragon!
    --- Fringe BBS
    * Origin: EWOG II - The Fringe - 904-733-1721 (1:112/91)