From 6cd084a3b5129d9ab8db3e5bc0f094943d7eef89 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 10 Jun 2012 23:39:04 +0200 Subject: Curl_pgrsDone: return int and acknowledge return code Since Curl_pgrsDone() itself calls Curl_pgrsUpdate() which may return an abort instruction or similar we need to return that info back and subsequently properly handle return codes from Curl_pgrsDone() where used. (Spotted by a Coverity scan) --- lib/ssh.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/ssh.c') diff --git a/lib/ssh.c b/lib/ssh.c index 90c8013c2..a1abc5b08 100644 --- a/lib/ssh.c +++ b/lib/ssh.c @@ -2820,7 +2820,8 @@ static CURLcode ssh_done(struct connectdata *conn, CURLcode status) if(sftp_scp) Curl_safefree(sftp_scp->path); - Curl_pgrsDone(conn); + if(Curl_pgrsDone(conn)) + return CURLE_ABORTED_BY_CALLBACK; conn->data->req.keepon = 0; /* clear all bits */ return result; -- cgit v1.2.3