On the topic of SFTP, am I right in thinking that there's no way to retrieve 
the error code from an SFTP quote command that has failed?

It seems that the error string returned by sftp_libssh2_strerror is output, but 
not the code itself. 

It seems a little bit fiddly to have to parse the strings to figure out the 
error, so I was wondering if the code can be returned in data->info.httpCode. 

I've done a little experimental hack to try this, and it seems to work ok, but 
I wondered if there's something I'm missing? A slight abuse of the httpCode 
field perhaps - but it doesn't appear to be used for anything else with SFTP.

Have enclosed a small patch illustrating what I mean. It's probably in the 
wrong format (sorry), but I can clean it up and send you a proper patch if you 
think it's a sensible approach.


Attachment: patch.diff
Description: Binary data


- Sam -


sam deane / @samdeane | elegantchaos.com / @elegantchaoscom | mac and ios 
software development

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to