NNDK Release 2.7.0

Discussion to talk about software related topics only.
Post Reply
ecasey
Posts: 164
Joined: Sat Mar 26, 2011 9:34 pm

NNDK Release 2.7.0

Post 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
User avatar
dciliske
Posts: 624
Joined: Mon Feb 06, 2012 9:37 am
Location: San Diego, CA
Contact:

Re: NNDK Release 2.7.0

Post 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
Dan Ciliske
Project Engineer
Netburner, Inc
ecasey
Posts: 164
Joined: Sat Mar 26, 2011 9:34 pm

Re: NNDK Release 2.7.0

Post 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
User avatar
dciliske
Posts: 624
Joined: Mon Feb 06, 2012 9:37 am
Location: San Diego, CA
Contact:

Re: NNDK Release 2.7.0

Post 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
Dan Ciliske
Project Engineer
Netburner, Inc
ecasey
Posts: 164
Joined: Sat Mar 26, 2011 9:34 pm

Re: NNDK Release 2.7.0

Post 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

Code: Select all

]#include <fdprintf.h> 
for the fdprintf() to work.

Got it now.

Thanks
Ed
sblair
Posts: 162
Joined: Mon Sep 12, 2011 1:54 pm

Re: NNDK Release 2.7.0

Post 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
Post Reply