 |
|
 |
Hi Nipun,
Have you got a similar class for SFTP (not just FTP?).
Regards
Nick
|
|
|
|
 |
|
 |
HI,
At present I don't have this but can develop for you.
Regards
Nipun
|
|
|
|
 |
|
 |
thank you for this x-cellent code! I gave you a 5
best regards
|
|
|
|
 |
|
 |
This project helped me to get an MFC FTP client app working in very little time. Apart from the bug found (and fixed by another user) this workd pretty well. The code is a little untidy, but it got the job done.
Thanks Nipun.
Regards
Nick
|
|
|
|
 |
|
 |
I got error message on the : void Ctreedlg::OnList()
---->> strcpy( datef, date1 );
The error message after executing this line when debugging was: " Unhandled exeption in mfcClient.exe (MSVCRTD.DLL): 0x0000005: Access violation. "
Anybody knows the solution of this bug?
/Regards
Leo
|
|
|
|
 |
|
 |
Hi Leo,
could you just send me the output of ls -l on ftp prompt.
|
|
|
|
 |
|
 |
Here is my copy of the data.txt file gathering from ls 06-14-05|06:38PM|102400|00100kb.txt 06-10-05|11:09AM|5119064|05000kb.zip 06-15-05|10:15AM|102384|100k.txt 06-07-05|08:34AM|<DIR>|dan 06-01-05|03:02PM|<DIR>|eva 05-11-05|09:10AM|<DIR>|emia 04-07-05|01:24PM|<DIR>|lota 03-29-05|09:28AM|<DIR>|berg 03-29-05|09:24AM|<DIR>|josh /regards Leo
|
|
|
|
 |
|
 |
then in function void Ctreedlg::OnList() change the logic for the output given by ur server.Or if u can change the server configuration to give standard output.
which is :
drwx------ 2 nipun root 4096 Jun 20 12:35 nsmail
-rw-r--r-- 1 nipun root 0 Jun 28 14:44 panic.lo
drwxr-xr-x 6 nipun root 4096 Jun 15 10:01 pcb
drwxr-xr-x 2 nipun root 4096 Jun 20 15:37 pcbenv
drwxr-xr-x 4 nipun root 4096 Jun 20 16:02 purify
-rwxr----- 1 nipun root 13453 Jul 4 14:21 sipDMSym
just try it and let me know the outcome.
|
|
|
|
 |
|
 |
then in function void Ctreedlg::OnList() change the logic for the output given by ur server.Or if u can change the server configuration to give standard output.
which is :
drwx------ 2 nipun root 4096 Jun 20 12:35 nsmail
-rw-r--r-- 1 nipun root 0 Jun 28 14:44 panic.lo
drwxr-xr-x 6 nipun root 4096 Jun 15 10:01 pcb
drwxr-xr-x 2 nipun root 4096 Jun 20 15:37 pcbenv
drwxr-xr-x 4 nipun root 4096 Jun 20 16:02 purify
-rwxr----- 1 nipun root 13453 Jul 4 14:21 sipDMSym
just try it and let me know the outcome.
|
|
|
|
 |
|
 |
I can´t change the logic for the server output cause I don´t have admin rights. So any configurations for applying another outputs would be not possible for me. Any idea for solving this by changing OnList() function?
Thx
Leo
|
|
|
|
 |
|
 |
just send me the backtrace and the file data.txt that this exe has created on my mail id asap so that I can provide u the fix.
U can send me ur mailid so that I can send u fix directly and u can test so that I can updated site with tested fix my mail id is sharma_nipun@yahoo.com
|
|
|
|
 |
|
 |
U can download the tailored exe from here.
click here
please let me know in case of any issue.please add the call stack and the ls -l output.
Nipun
|
|
|
|
 |
|
 |
hello Nipun
Thx for your commitments on this problem. I have already solve the problems by changing the OnList() function and the IDC_LISTFILE outputs and it works fine for my server output now.
|
|
|
|
 |
|
 |
Dear Nipun:
I downloaded and modified your excellent little program but was having some difficulty in consistently seeing the remote list of files. I tracked the problem down in ftp.cpp.
Within the loop where you are retrieving the data from the ftp (from the data.txt file) you enter another loop that checks for spaces and skips over them. Because of this it is possible for the i counter to be incremented past 1023. The fix goes in two places:
if(szBuffer[i]==32)
{
newbuffer[j++]='|';
while(szBuffer[i]==32) {
if(i == 1024) // don't exceed buffer counter
break;
i++;
}
}
if(i == 1024) // don't exceed buffer counter
break;
newbuffer[j++]= szBuffer[i];
This will prevent the count exceeding the buffer size and make the data display correct.
Thanks for an excellent program!
Best Regards,
Bob
|
|
|
|
 |
|
 |
Thanks a lot buddy for your fix.
|
|
|
|
 |
|
 |
Dear Nipun:
I was a bit premature in my fix - there was another problem. The full fix within the while loop should be as follows:
while( ReadDataMsg(szBuffer,1024) > 0) {
fflush(stdout);
printf(szBuffer);
int j=0;
for(int i=0;i< 1024;i++) // instead of 1023
{
if(szBuffer[i]==13)
{
newbuffer[j++]= '\n';
i++;
}
else
{
if(szBuffer[i]==32)
{
newbuffer[j++]='|';
while(szBuffer[i]==32) {
i++;
if(i == 1024) // instead of 1023
break;
}
}
if(i == 1024) // instead of 1023
break; newbuffer[j++]= szBuffer[i];
}
}
Now it seems to work perfectly (at least with my ftp site).
Best Regards,
Bob
|
|
|
|
 |
|
 |
Hi,
zip file just has the exe, no source code.
Please upload source.
|
|
|
|
 |
|
 |
Hi,
I see that you "updated" but, there still is no source code.
Please check,
Thanks,
Dave
|
|
|
|
 |
|
 |
The client doesn't display the remote directory listing.
Even if I change the directory to say: /pub it still doesn't work.
WM.
What about weapons of mass-construction?
|
|
|
|
 |
|
 |
right now it's showing only remote files listing.not the remote directories
|
|
|
|
 |
|
 |
Where's the source code? the exe file looks pretty.
shotgun
|
|
|
|
 |
|
 |
I am in process of updating it.I will post code as soon as i will be through.
|
|
|
|
 |