Page 1 of 1
NNDK Release 2.7.0
Posted: Sun Dec 28, 2014 1:54 pm
by ecasey
There seems to be a missing function definition in the ftpd.cpp file in the library. Before an after rebuilding the system files, I get:
C:\nburn\system/ftpd.cpp:1131: undefined reference to `FTPD_Size'
There is a declaration in ftpd.h
Code: Select all
int FTPD_Size( const char *full_directory, const char *file_name, int socket );
It is used once in ftpd.cpp, but there is no definition that I can find.
I am using a MOD5282 on a carrier board V1.12.
Thanks
Ed
Re: NNDK Release 2.7.0
Posted: Mon Dec 29, 2014 7:02 am
by dciliske
FTPD_Size was added to support Chrome's ftp browser (it wouldn't work without it because the Chrome dev's are obnoxious). Given that reporting the file size is highly dependent on what you're actually doing, this function is not part of the core library. This function was however added to the FTP example code for the EFFS examples.
I thought we added enough commentary in the change notes to explain what was going on here, but maybe not. Does this answer the concern?
-Dan
Re: NNDK Release 2.7.0
Posted: Mon Dec 29, 2014 7:28 am
by ecasey
Hi Dan,
The compile error I get is in the library file. FTPD_Size is called in the library file, but has no definition in the library file for it. I can't compile code that worked fine in 2.6.8 and prior.
The FTPD_Size function in the examples is fine, but that is not the issue. Now that the function is called in the library file the reference is unresolved.
The release notes just say
◦Added support for chrome ftp browser
Not much to go by.
Ed
Re: NNDK Release 2.7.0
Posted: Mon Dec 29, 2014 9:39 am
by dciliske
I'll agree that the change note is insufficient. However, it is not an issue that this function is not defined in the system. It is a communication problem, not an implementation issue.
You'll note that the library file you mention also has reference to a lot of other functions not present in any library files. Specifically, but not limited to:
- FTPD_DirectoryExists
- FTPD_CreateSubDirectory
- FTPD_DeleteSubDirectory
- FTPD_ListSubDirectories
- FTPD_FileExists
- FTPD_SendFileToClient
- FTPD_AbleToCreateFile
- FTPD_GetFileFromClient
- FTPD_DeleteFile
- FTPD_ListFile
- FTPD_Rename
These are functions that must be implemented by the final application for the FTP server to function.
-Dan
Re: NNDK Release 2.7.0
Posted: Mon Dec 29, 2014 12:00 pm
by ecasey
Ok, then the answer is that the implementation for FTP_Size() was added to the EFFS-FTP Example code. I didn't look there. Also added was the
for the fdprintf() to work.
Got it now.
Thanks
Ed
Re: NNDK Release 2.7.0
Posted: Wed Apr 08, 2015 2:38 pm
by sblair
I just got bit by this one big time too. I always read the Release Notes (MULTIPLE times) and totally missed anything indicating the impact of this.
It also didn't help that I didn't even know I had FTP in my project, thanks to a colleague that buried ftps.cpp in a completely unrelated folder. Oh look, we're running an FTP server! Then I had to go on the easter egg hunt to find that ftps.cpp isn't in the FTP examples but in the Factory App example...
Also, it's another case of having to do a conditional compile based on NNDK since what compiles under 2.7.0 won't compile under 2.6.7 and vice-versa. Maintaining those #define NNDK versions to the patch level really is critical!
Thanks,
Scott