Hello community,

here is the log from the commit of package SimGear for openSUSE:Factory checked 
in at 2019-08-22 10:58:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/SimGear (Old)
 and      /work/SRC/openSUSE:Factory/.SimGear.new.22127 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "SimGear"

Thu Aug 22 10:58:04 2019 rev:12 rq:725144 version:2018.3.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/SimGear/SimGear.changes  2019-03-22 
15:11:05.365301439 +0100
+++ /work/SRC/openSUSE:Factory/.SimGear.new.22127/SimGear.changes       
2019-08-22 10:58:09.201653337 +0200
@@ -1,0 +2,8 @@
+Fri Aug 16 22:11:30 UTC 2019 - Stefan BrĂ¼ns <stefan.bru...@rwth-aachen.de>
+
+- Update to 2018.3.4
+  * changelog: 
http://wiki.flightgear.org/Changelog_2018.3#2018.3.4_point_release
+- Drop upstream patches:
+  * 0001-Improve-HTTP-redirect-handling-and-add-test.patch
+
+-------------------------------------------------------------------

Old:
----
  0001-Improve-HTTP-redirect-handling-and-add-test.patch
  simgear-2018.3.2.tar.bz2

New:
----
  simgear-2018.3.4.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ SimGear.spec ++++++
--- /var/tmp/diff_new_pack.67F6tt/_old  2019-08-22 10:58:10.313653188 +0200
+++ /var/tmp/diff_new_pack.67F6tt/_new  2019-08-22 10:58:10.317653187 +0200
@@ -20,10 +20,10 @@
 # in our requirements, i.e. the same version we have built against
 %define openscenegraph_version %(rpm -qa --nosignature --nodigest 
libOpenSceneGraph\*-devel | sed 's/.*-devel-\\(.*\\)-.*/\\1/')
 
-%define libname libSimGearCore-2018_3_2
+%define libname libSimGearCore-2018_3_4
 %define main_version 2018.3
 Name:           SimGear
-Version:        %{main_version}.2
+Version:        %{main_version}.4
 Release:        0
 Summary:        Simulator Construction Gear
 # https://sourceforge.net/p/flightgear/codetickets/1940/
@@ -31,8 +31,6 @@
 Group:          Amusements/Games/3D/Simulation
 Url:            http://www.flightgear.org/
 Source0:        
https://sourceforge.net/projects/flightgear/files/release-%{main_version}/simgear-%{version}.tar.bz2
-# PATCH-FIX-UPSTREAM 0001-Improve-HTTP-redirect-handling-and-add-test.patch
-Patch0:         0001-Improve-HTTP-redirect-handling-and-add-test.patch
 # PATCH-FIX-UPSTREAM 0001-Remove-deprecated-boost-utility.patch
 Patch1:         0001-Remove-deprecated-boost-utility.patch
 # PATCH-FIX-UPSTREAM 0001-boost-enable_if-Support-Boost-versions-1.56.patch
@@ -93,7 +91,6 @@
 
 %prep
 %setup -q -n simgear-%{version}
-%patch0 -p1
 %patch1 -p1
 %patch2 -p1
 

++++++ simgear-2018.3.2.tar.bz2 -> simgear-2018.3.4.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/simgear-2018.3.2/simgear/io/HTTPClient.cxx 
new/simgear-2018.3.4/simgear/io/HTTPClient.cxx
--- old/simgear-2018.3.2/simgear/io/HTTPClient.cxx      2019-01-29 
14:17:36.000000000 +0100
+++ new/simgear-2018.3.4/simgear/io/HTTPClient.cxx      2019-08-09 
13:48:36.000000000 +0200
@@ -472,12 +472,26 @@
   return actualBytes;
 }
 
+bool isRedirectStatus(int code)
+{
+    return ((code >= 300) && (code < 400));
+}
+    
 size_t Client::requestHeaderCallback(char *rawBuffer, size_t size, size_t 
nitems, void *userdata)
 {
   size_t byteSize = size * nitems;
   Request* req = static_cast<Request*>(userdata);
   std::string h = strutils::simplify(std::string(rawBuffer, byteSize));
 
+  if (req->readyState() >= HTTP::Request::HEADERS_RECEIVED) {
+      // this can happen with chunked transfers (secondary chunks)
+      // or redirects
+      if (isRedirectStatus(req->responseCode())) {
+          req->responseStart(h);
+          return byteSize;
+      }
+  }
+    
   if (req->readyState() == HTTP::Request::OPENED) {
     req->responseStart(h);
     return byteSize;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/simgear-2018.3.2/simgear/io/HTTPRequest.cxx 
new/simgear-2018.3.4/simgear/io/HTTPRequest.cxx
--- old/simgear-2018.3.2/simgear/io/HTTPRequest.cxx     2019-01-29 
14:17:36.000000000 +0100
+++ new/simgear-2018.3.4/simgear/io/HTTPRequest.cxx     2019-08-09 
13:48:36.000000000 +0200
@@ -329,6 +329,16 @@
 }
 
 
//------------------------------------------------------------------------------
+void Request::setSuccess(int code)
+{
+    _responseStatus = code;
+    _responseReason.clear();
+    if( !isComplete() ) {
+        setReadyState(DONE);
+    }
+}
+    
+//------------------------------------------------------------------------------
 void Request::setFailure(int code, const std::string& reason)
 {
     SG_LOG(SG_IO, SG_WARN, "HTTP request: set failure:" << code << " reason " 
<< reason);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/simgear-2018.3.2/simgear/io/HTTPRequest.hxx 
new/simgear-2018.3.4/simgear/io/HTTPRequest.hxx
--- old/simgear-2018.3.2/simgear/io/HTTPRequest.hxx     2019-01-29 
14:17:36.000000000 +0100
+++ new/simgear-2018.3.4/simgear/io/HTTPRequest.hxx     2019-08-09 
13:48:36.000000000 +0200
@@ -224,7 +224,7 @@
     virtual void onAlways();
 
     void setFailure(int code, const std::string& reason);
-
+    void setSuccess(int code);
 private:
     friend class Client;
     friend class Connection;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/simgear-2018.3.2/simgear/io/test_HTTP.cxx 
new/simgear-2018.3.4/simgear/io/test_HTTP.cxx
--- old/simgear-2018.3.2/simgear/io/test_HTTP.cxx       2019-01-29 
14:17:36.000000000 +0100
+++ new/simgear-2018.3.4/simgear/io/test_HTTP.cxx       2019-08-09 
13:48:36.000000000 +0200
@@ -273,7 +273,23 @@
             d << "\r\n"; // final CRLF to terminate the headers
             d << contentStr;
             push(d.str().c_str());
-
+        } else if (path == "/test_redirect") {
+            string contentStr("<html>See <a href=\"wibble\">Here</a></html>");
+            stringstream d;
+            d << "HTTP/1.1 " << 302 << " " << "Found" << "\r\n";
+            d << "Location:" << " http://localhost:2000/was_redirected"; << 
"\r\n";
+            d << "Content-Length:" << contentStr.size() << "\r\n";
+            d << "\r\n"; // final CRLF to terminate the headers
+            d << contentStr;
+            push(d.str().c_str());
+        } else if (path == "/was_redirected") {
+            string contentStr(BODY1);
+            stringstream d;
+            d << "HTTP/1.1 " << 200 << " " << reasonForCode(200) << "\r\n";
+            d << "Content-Length:" << contentStr.size() << "\r\n";
+            d << "\r\n"; // final CRLF to terminate the headers
+            d << contentStr;
+            push(d.str().c_str());
         } else {
           TestServerChannel::processRequestHeaders();
         }
@@ -773,6 +789,24 @@
         SG_CHECK_EQUAL(tr2->bodyData, string(BODY1));
         SG_CHECK_EQUAL(tr2->responseBytesReceived(), strlen(BODY1));
     }
+    
+    {
+        cout << "redirect test" << endl;
+        // redirect test
+        testServer.disconnectAll();
+        cl.clearAllConnections();
+        
+        TestRequest* tr = new 
TestRequest("http://localhost:2000/test_redirect";);
+        HTTP::Request_ptr own(tr);
+        cl.makeRequest(tr);
+        
+        waitForComplete(&cl, tr);
+        SG_CHECK_EQUAL(tr->responseCode(), 200);
+        SG_CHECK_EQUAL(tr->responseReason(), string("OK"));
+        SG_CHECK_EQUAL(tr->responseLength(), strlen(BODY1));
+        SG_CHECK_EQUAL(tr->responseBytesReceived(), strlen(BODY1));
+        SG_CHECK_EQUAL(tr->bodyData, string(BODY1));
+    }
 
     cout << "all tests passed ok" << endl;
     return EXIT_SUCCESS;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/simgear-2018.3.2/simgear/io/test_HTTP.hxx 
new/simgear-2018.3.4/simgear/io/test_HTTP.hxx
--- old/simgear-2018.3.2/simgear/io/test_HTTP.hxx       2019-01-29 
14:17:36.000000000 +0100
+++ new/simgear-2018.3.4/simgear/io/test_HTTP.hxx       2019-08-09 
13:48:36.000000000 +0200
@@ -30,7 +30,6 @@
 
     virtual ~TestServerChannel()
     {
-        std::cerr << "dtor test server channel" << std::endl;
     }
 
     virtual void collectIncomingData(const char* s, int n)
@@ -139,8 +138,8 @@
 
     void sendErrorResponse(int code, bool close, std::string content)
     {
-        std::cerr << "sending error " << code << " for " << path << std::endl;
-        std::cerr << "\tcontent:" << content << std::endl;
+     //   std::cerr << "sending error " << code << " for " << path << 
std::endl;
+       // std::cerr << "\tcontent:" << content << std::endl;
 
         std::stringstream headerData;
         headerData << "HTTP/1.1 " << code << " " << reasonForCode(code) << 
"\r\n";
@@ -168,7 +167,6 @@
 
     virtual void handleClose (void)
     {
-        std::cerr << "channel close" << std::endl;
         NetBufferChannel::handleClose();
     }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/simgear-2018.3.2/simgear/nasal/lib.c 
new/simgear-2018.3.4/simgear/nasal/lib.c
--- old/simgear-2018.3.2/simgear/nasal/lib.c    2019-01-29 14:17:36.000000000 
+0100
+++ new/simgear-2018.3.4/simgear/nasal/lib.c    2019-08-09 13:48:36.000000000 
+0200
@@ -302,15 +302,18 @@
     char* buf;
     va_list va;
     int olen, len = 16;
+    va_start(va, f);
     while(1) {
         buf = naAlloc(len);
-        va_start(va, f);
-        olen = vsnprintf(buf, len, f, va);
+        va_list vaCopy;
+        va_copy(vaCopy, va);
+        olen = vsnprintf(buf, len, f, vaCopy);
         if(olen >= 0 && olen < len) {
             va_end(va);
+            va_end(vaCopy);
             return buf;
         }
-        va_end(va);
+        va_end(vaCopy);
         naFree(buf);
         len *= 2;
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/simgear-2018.3.2/simgear/sound/soundmgr_openal.cxx 
new/simgear-2018.3.4/simgear/sound/soundmgr_openal.cxx
--- old/simgear-2018.3.2/simgear/sound/soundmgr_openal.cxx      2019-01-29 
14:17:36.000000000 +0100
+++ new/simgear-2018.3.4/simgear/sound/soundmgr_openal.cxx      2019-08-09 
13:48:36.000000000 +0200
@@ -340,7 +340,7 @@
         for ( auto current = d->_sample_groups.begin();
                    current != d->_sample_groups.end(); ++current ) {
             SGSampleGroup *sgrp = current->second;
-            sgrp->stop();
+            sgrp->suspend();
         }
         _active = false;
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/simgear-2018.3.2/simgear/sound/xmlsound.cxx 
new/simgear-2018.3.4/simgear/sound/xmlsound.cxx
--- old/simgear-2018.3.2/simgear/sound/xmlsound.cxx     2019-01-29 
14:17:36.000000000 +0100
+++ new/simgear-2018.3.4/simgear/sound/xmlsound.cxx     2019-08-09 
13:48:36.000000000 +0200
@@ -83,6 +83,9 @@
     if (_sample)
         _sample->stop();
 
+    if (_sgrp && (_name != ""))
+        _sgrp->remove(_name);
+
     _volume.clear();
     _pitch.clear();
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/simgear-2018.3.2/version new/simgear-2018.3.4/version
--- old/simgear-2018.3.2/version        2019-01-29 14:17:36.000000000 +0100
+++ new/simgear-2018.3.4/version        2019-08-09 13:48:36.000000000 +0200
@@ -1 +1 @@
-2018.3.2
+2018.3.4


Reply via email to