diff options
author | Lev Dragunov <l.dragunov@corp.mail.ru> | 2015-06-04 17:14:22 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:49:54 +0300 |
commit | 2aa4a028cb84c396d8f356885d1e9b5fc5bd373e (patch) | |
tree | 98ae8d71f9fddfeea690174f9cb83067b76245b9 /3party/osrm | |
parent | 8891fcd36962f05784acf2f6f3616a9bca169b4b (diff) |
[online osrm] osrm-routed SIGSEGV fix
Diffstat (limited to '3party/osrm')
-rwxr-xr-x | 3party/osrm/osrm-backend/data_structures/search_engine_data.hpp | 9 | ||||
-rw-r--r-- | 3party/osrm/osrm-backend/plugins/MapsMePlugin.hpp | 6 |
2 files changed, 11 insertions, 4 deletions
diff --git a/3party/osrm/osrm-backend/data_structures/search_engine_data.hpp b/3party/osrm/osrm-backend/data_structures/search_engine_data.hpp index b63910df25..a1c07fbb10 100755 --- a/3party/osrm/osrm-backend/data_structures/search_engine_data.hpp +++ b/3party/osrm/osrm-backend/data_structures/search_engine_data.hpp @@ -28,7 +28,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef SEARCH_ENGINE_DATA_HPP #define SEARCH_ENGINE_DATA_HPP +#ifdef LINUX +#include <boost/thread/tss.hpp> +#else #include <boost/scoped_ptr.hpp> +#endif #include "../typedefs.h" #include "binary_heap.hpp" @@ -42,8 +46,11 @@ struct HeapData struct SearchEngineData { using QueryHeap = BinaryHeap<NodeID, NodeID, int, HeapData, UnorderedMapStorage<NodeID, int>>; +#ifdef LINUX + using SearchEngineHeapPtr = boost::thread_specific_ptr<QueryHeap>; +#else using SearchEngineHeapPtr = boost::scoped_ptr<QueryHeap>; - +#endif static SearchEngineHeapPtr forward_heap_1; static SearchEngineHeapPtr reverse_heap_1; static SearchEngineHeapPtr forward_heap_2; diff --git a/3party/osrm/osrm-backend/plugins/MapsMePlugin.hpp b/3party/osrm/osrm-backend/plugins/MapsMePlugin.hpp index ac06f125e4..d310f6cea9 100644 --- a/3party/osrm/osrm-backend/plugins/MapsMePlugin.hpp +++ b/3party/osrm/osrm-backend/plugins/MapsMePlugin.hpp @@ -28,7 +28,6 @@ #include <string> #include <vector> - template <class DataFacadeT> class MapsMePlugin final : public BasePlugin { class GetByPoint @@ -176,11 +175,12 @@ public: osrm::for_each_pair(phantom_node_pair_list, build_phantom_pairs); - m_searchEngine->alternative_path(raw_route.segment_end_coordinates.front(), raw_route); - + vector<bool> uturns; + m_searchEngine->shortest_path(raw_route.segment_end_coordinates, uturns, raw_route); if (INVALID_EDGE_WEIGHT == raw_route.shortest_path_length) { SimpleLogger().Write(logDEBUG) << "Error occurred, single path not found"; + return 400; } // Get mwm names vector<pair<string, m2::PointD>> usedMwms; |