Merge pull request #1446 from Project-OSRM/fix/sharedmemory-default

Fix/sharedmemory default
This commit is contained in:
Patrick Niklaus 2015-04-22 09:50:46 +02:00
commit d2a19ec8ec
2 changed files with 5 additions and 3 deletions

View File

@ -35,13 +35,13 @@ struct libosrm_config
libosrm_config(const libosrm_config &) = delete; libosrm_config(const libosrm_config &) = delete;
libosrm_config() libosrm_config()
: max_locations_distance_table(100), max_locations_map_matching(-1), : max_locations_distance_table(100), max_locations_map_matching(-1),
use_shared_memory(false) use_shared_memory(true)
{ {
} }
libosrm_config(const ServerPaths &paths, const bool flag, const int max_table, const int max_matching) libosrm_config(const ServerPaths &paths, const bool sharedmemory_flag, const int max_table, const int max_matching)
: server_paths(paths), max_locations_distance_table(max_table), : server_paths(paths), max_locations_distance_table(max_table),
max_locations_map_matching(max_matching), use_shared_memory(flag) max_locations_map_matching(max_matching), use_shared_memory(sharedmemory_flag)
{ {
} }

View File

@ -74,6 +74,8 @@ int main(int argc, const char *argv[])
int ip_port, requested_thread_num; int ip_port, requested_thread_num;
libosrm_config lib_config; libosrm_config lib_config;
// make the behaviour of routed backward compatible
lib_config.use_shared_memory = false;
const unsigned init_result = GenerateServerProgramOptions( const unsigned init_result = GenerateServerProgramOptions(
argc, argv, lib_config.server_paths, ip_address, ip_port, requested_thread_num, argc, argv, lib_config.server_paths, ip_address, ip_port, requested_thread_num,