Skip to content
Permalink
Browse files

Bugfix for waypoint generation (race condition)

  • Loading branch information...
ocoliver
ocoliver committed Nov 5, 2012
1 parent 874bfa3 commit 9ce354a5c903bdf27d74c81ca65616cb5df0e0f6
Showing with 1 addition and 1 deletion.
  1. +1 −1 htdocs/lib/clicompatbase.inc.php
@@ -92,7 +92,7 @@ function setCacheWaypoint($cacheid)
sql("DELETE FROM `cache_waypoint_pool` WHERE `cache_id`='&1'", $cacheid);
// reserve a waypoint
sql("UPDATE `cache_waypoint_pool` SET `cache_id`='&1' ORDER BY WPTODEC(`wp_oc`, '&2') ASC LIMIT 1", $cacheid, $opt['logic']['waypoint_pool']['prefix']);
sql("UPDATE `cache_waypoint_pool` SET `cache_id`='&1' WHERE `cache_id` IS NULL ORDER BY WPTODEC(`wp_oc`, '&2') ASC LIMIT 1", $cacheid, $opt['logic']['waypoint_pool']['prefix']);
// TODO: cronjob for waypoint pool generation may not run on development systems
// add a fix to generate a new waypoints on demand (insert this new waypoint to cache_waypoint_pool with reserved cache_id

0 comments on commit 9ce354a

Please sign in to comment.
You can’t perform that action at this time.