diff options
author | Yuta Doi <yuta-d@witz-inc.co.jp> | 2018-06-20 22:26:57 +0900 |
---|---|---|
committer | Yuta Doi <yuta-d@witz-inc.co.jp> | 2018-06-20 22:26:57 +0900 |
commit | a8edb67ada57540c67cb3c4dcb840509173bef81 (patch) | |
tree | 8587c7793605056a3a54c872b8ca2acde2c130ea /src | |
parent | 7e9df0b2f5a8d910ee7cb973ffd775fb15022858 (diff) |
Use default area when area is not requested
Change-Id: I397987d15b17a7fe0049362e998dee12afa894ca
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
Diffstat (limited to 'src')
-rw-r--r-- | src/policy_manager/policy_manager.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/policy_manager/policy_manager.cpp b/src/policy_manager/policy_manager.cpp index 9b8670c..0dd5974 100644 --- a/src/policy_manager/policy_manager.cpp +++ b/src/policy_manager/policy_manager.cpp @@ -733,10 +733,12 @@ int PolicyManager::setInputEventData(json_object* json_in) { const char* area = this->getStringFromJson(json_in, "area"); int area_no = 0; if (nullptr != area) { - // Convert name to number - area_no = areaname2no[area]; - HMI_DEBUG("wm:pm", "area(%s:%d)", area, area_no); + area_no = this->areaname2no[area]; + } + else if (nullptr != role) { + area_no = this->areaname2no[this->role2defaultarea[role]]; } + HMI_DEBUG("wm:pm", "area(%s:%d)", area, area_no); // Set event info to the queue EventInfo event_info; |