# FCPutData fails if last

**URL:** <https://forums.digi.com/t/fcputdata-fails-if-last/5671>\
**Category:** NET+OS\
**Created:** [November 24, 2005, 5:42am UTC](https://forums.digi.com/t/fcputdata-fails-if-last/5671 "2005-11-24T05:42:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tschulz05](https://avatars.discourse-cdn.com/v4/letter/t/97f17d/32.png) [@tschulz05](https://forums.digi.com/u/tschulz05)\
**Post date:** [November 24, 2005, 5:42am UTC](https://forums.digi.com/t/fcputdata-fails-if-last/5671/1 "2005-11-24T05:42:29Z")

</div>

I’m using the FTP Client API call to FCPutData to store data on a remote host. Frequently FCPutData fails (return=-1) if the parameter ‘last’ is set. What could cause this and how to prevent it? I’m using NetOS6.0. Thanks for any suggestion. Thomas

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/digi/original/1X/11da31a6a1fbcd03ef21d3f785c317c824009ae2.png) [@system](https://forums.digi.com/u/system)\
**Post date:** [June 8, 2006, 1:51am UTC](https://forums.digi.com/t/fcputdata-fails-if-last/5671/2 "2006-06-08T01:51:27Z")

</div>

More information about this: Often FCPutdata(NAHandle h, char \*buffer, int len, int flag) returns indicating that the number of bytes actually sent is smaller than the number of bytes to send. That seems to be no problem when “flag” was not set (not final call). The data can just be re-sent. But if “flag” was set (final call). What should be done then? Should FCPutdata called again? A second call with flag=1? It always seems to fail. Thomas
