]> git.mxchange.org Git - simgear.git/blobdiff - simgear/io/SVNRepository.cxx
SGPath: fix creating paths with permission checker.
[simgear.git] / simgear / io / SVNRepository.cxx
index d3635fe811f884c376637b54e15f4feffb45d82e..39114b1f172d93de878cfa39251bbd0569f583a6 100644 (file)
@@ -163,8 +163,10 @@ namespace { // anonmouse
         virtual void onFail()
         {
             HTTP::Request::onFail();
-            _repo->propFindFailed(this, SVNRepository::SVN_ERROR_SOCKET);
-            _repo = NULL;
+                       if (_repo) {
+                               _repo->propFindFailed(this, SVNRepository::SVN_ERROR_SOCKET);
+                               _repo = NULL;
+                       }
         }
         
     private:
@@ -227,8 +229,8 @@ protected:
         _failed = true;
     } else {
         SG_LOG(SG_IO, SG_WARN, "SVN: request for:" << url() <<
-        " return code " << responseCode());
-        _repo->updateFailed(this, SVNRepository::SVN_ERROR_SOCKET);
+        " got HTTP status " << responseCode());
+        _repo->updateFailed(this, SVNRepository::SVN_ERROR_HTTP);
         _failed = true;
     }
   }
@@ -246,7 +248,7 @@ protected:
     SVNRepository::ResultCode err = _parser.parseXML(s, n);
     if (err) {
         _failed = true;
-        SG_LOG(SG_IO, SG_WARN, _repo->p << ": SVN: request for:" << url() << " failed:" << err);
+        SG_LOG(SG_IO, SG_WARN, this << ": SVN: request for:" << url() << " failed:" << err);
         _repo->updateFailed(this, err);
         _repo = NULL;
     }