[vlmc-devel] commit: YouTubeService.cpp: Fix connection abort error with suitable error and (Rohit Yadav )

git at videolan.org git at videolan.org
Sun Sep 26 17:09:12 CEST 2010


vlmc | branch: master | Rohit Yadav <rohityadav89 at gmail.com> | Sun Sep 26 20:52:02 2010 +0530| [c318bd3ba2cc2d52bbe2aac09d703694d68c63c3] | committer: Rohit Yadav 

YouTubeService.cpp: Fix connection abort error with suitable error and
ignore it.

Ignore Abort errors, a bug was found, if user clicks upload when not
connected to the internet/network, basically the operation is aborted
and stack blows off because of: reply->deleteLater();

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=c318bd3ba2cc2d52bbe2aac09d703694d68c63c3
---

 src/Services/YouTube/YouTubeService.cpp |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/Services/YouTube/YouTubeService.cpp b/src/Services/YouTube/YouTubeService.cpp
index e17d5b1..89d7350 100644
--- a/src/Services/YouTube/YouTubeService.cpp
+++ b/src/Services/YouTube/YouTubeService.cpp
@@ -180,7 +180,7 @@ YouTubeService::networkError( QNetworkReply::NetworkError e )
 
         case QNetworkReply::OperationCanceledError:
             errString = "Operation Aborted";
-            m_error = NetworkError; break;
+            m_error = Abort; break;
 
         case QNetworkReply::SslHandshakeFailedError:
             errString = "SSL Error";
@@ -215,8 +215,8 @@ YouTubeService::networkError( QNetworkReply::NetworkError e )
     qDebug() << "[NETWORK ERROR]: " << e << ": " << errString;
     emit error( errString );
 
-    /* Ignore Content errors */
-    if( m_error == ContentError )
+    /* Ignore Content and Abort errors */
+    if( m_error == ContentError || m_error == Abort )
         return;
 
     QNetworkReply *reply = static_cast<QNetworkReply *>( sender() );



More information about the Vlmc-devel mailing list