[OSM-dev] Osmupdate 0.4.5 fails (osmctools)

Florian Lohoff f at zz.de
Mon Feb 22 09:47:54 UTC 2021


On Sun, Feb 21, 2021 at 10:23:55PM +0100, yvecai via dev wrote:
> Keeping a planet.o5m fails from today:
> 
> $osmupdate ${PLANET_DIR}planet.o5m ${TMP_DIR}new-planet.o5m
>     osmupdate Error: Could not get the newest minutely timestamp from the
> Internet.
> 
> Has something changed from the https://planet.openstreetmap.org/ timestamp
> location ?

This is a quick and dirty patch which will remove the check for a "#".

	Works for me(tm)

Could be please ban all people not using a VCS,
not distributing a Makefile, and using "C Obfuscator"
to Elba or something.

Flo

flo at pax:~/projects/osm/build/osmupdate$ git diff 
diff --git a/osmupdate.c b/osmupdate.c
index 7a55fc5..f9119e9 100644
--- a/osmupdate.c
+++ b/osmupdate.c
@@ -719,7 +719,7 @@ exit(1);
     if(loglevel<2)
       unlink(newest_timestamp_file_name);
   #endif
-  if(result[0]=='#') {  // full status information
+  //if(result[0]=='#') {  // full status information
     // get sequence number
     char* sequence_number_p;
     sequence_number_p= strstr(result,"sequenceNumber=");
@@ -737,7 +737,7 @@ exit(1);
       memcpy(result+13,timestamp_p+14,3);
       memcpy(result+16,timestamp_p+18,4);
       }  // found timestamp line
-    }  // full status information
+    //}  // full status information
   changefile_timestamp= strtimetosint64(result);
   if(loglevel>0) {  // verbose mode
     char ts[30];
@@ -825,7 +825,7 @@ static int64_t get_changefile_timestamp(
     }  // could open the file
 
   // parse the timestamp information
-  if(timestamp_contents[0]=='#') {  // full status information
+  //if(timestamp_contents[0]=='#') {  // full status information
     // get timestamp
     char* timestamp_p;
     timestamp_p= strstr(timestamp_contents,"timestamp=");
@@ -839,7 +839,7 @@ static int64_t get_changefile_timestamp(
       memcpy(timestamp_contents+13,timestamp_p+14,3);
       memcpy(timestamp_contents+16,timestamp_p+18,4);
       }  // found timestamp line
-    }  // full status information
+   // }  // full status information
   changefile_timestamp= strtimetosint64(timestamp_contents);
 
   if(loglevel>0) {  // verbose mode

-- 
Florian Lohoff                                                     f at zz.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20210222/bd3360f8/attachment.sig>


More information about the dev mailing list