cURL cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[curl:bugs] #1464 FTP transfer fails on Windows Embedded Compact 7 (November 2014 Update)

From: Nikolay Vakhlyarskiy <nvakhlyarskiy_at_users.sf.net>
Date: Fri, 12 Dec 2014 10:59:33 +0000

---
** [bugs:#1464] FTP transfer fails on Windows Embedded Compact 7 (November 2014 Update)**
**Status:** open
**Created:** Fri Dec 12, 2014 10:59 AM UTC by Nikolay Vakhlyarskiy
**Last Updated:** Fri Dec 12, 2014 10:59 AM UTC
**Owner:** nobody
FTP transfer fails on Windows Embedded Compact 7 November 2014 Update, 
when library is built without USE_BLOCKING_SOCKETS.
CURL library version is 7.23.1
The bug is caused due to change in behavior of Windows Sockets, which has been introduced
in November 2014.
When library is compiled without USE_BLOCKING_SOCKET define, the sequence of function calls:
shutdown(...);
closesocket(...);
drops underlying socket data buffers and file transfer is interrupted. FTP server responds
with code 450 on shuch client behavior.
Previously (before Windows Update), the underlying socket data buffers was not dropped by
function call sequence mentoned above.
For non-blocking socket the BUG can be fixed with setting SO_LINGER option with non-zero
timeout, but in this case 'closesocket' function returns -1 and some loop should be
introduced to wait for successful call to 'closesocket'.
Lines in 'ftp.c' file where "the bug lives":
// these lines close access to socket from application
3165: #ifdef _WIN32_WCE
3166:   shutdown(conn->sock[SECONDARYSOCKET],2);  /* SD_BOTH */
3167: #endif
// socket buffers are dropped by this call
3188: Curl_closesocket(conn, conn->sock[SECONDARYSOCKET]);
Thanks, Nikolay Vakhlyarskiy.
---
Sent from sourceforge.net because curl-tracker@cool.haxx.se is subscribed to https://sourceforge.net/p/curl/bugs/
To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/curl/admin/bugs/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.
Received on 2014-12-12

These mail archives are generated by hypermail.