]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/metar_main.cxx
Merge branch 'next' into comm-subsystem
[flightgear.git] / src / Main / metar_main.cxx
index a80c1da2c0200be9a79427274288bbbbe13b880f..7b904d3a245f492f97246ca1a2613c766926557e 100644 (file)
@@ -34,7 +34,6 @@
 #include <simgear/io/HTTPClient.hxx>
 #include <simgear/io/HTTPRequest.hxx>
 #include <simgear/timing/timestamp.hxx>
-#include <simgear/misc/sg_sleep.hxx>
 
 using namespace std;
 using namespace simgear;
@@ -576,6 +575,7 @@ int main(int argc, char *argv[])
 
                        try {
                 MetarRequest* mr = new MetarRequest(argv[i]);
+                HTTP::Request_ptr own(mr);
                 http.makeRequest(mr);
                 
             // spin until the request completes, fails or times out
@@ -585,7 +585,7 @@ int main(int argc, char *argv[])
                     if (mr->complete || mr->failed) {
                         break;
                     }
-                    sleepForMSec(1);
+                    SGTimeStamp::sleepForMSec(1);
                 }
                 
                 if (!mr->complete) {