aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUze Choi <uzchoi@samsung.com>2018-12-14 13:50:20 +0900
committerUze Choi <uzchoi@samsung.com>2018-12-14 07:42:11 +0000
commit7505f12159a84e8164c141976d13635bfb594476 (patch)
treef81038b6ab929d68143eb38bb1dab9088ff708db
parentfc5faa1fad442e940e71c3d9c54c86866171ad6d (diff)
ssid generation rule fixRel_BL_1.10samsung
Previously, sid is mistakenly used for soft ap ssid generation. setup_id is right value for this. Change-Id: I337aa6d5d1bc64ca487769a67cadafe203ad7c60 Signed-off-by: Uze Choi <uzchoi@samsung.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/27775 Tested-by: IoTivity Jenkins <jenkins-daemon@iotivity.org>
-rw-r--r--service/st-app-fw/include/st_data_manager.h2
-rw-r--r--service/st-app-fw/include/st_easy_setup.h2
-rw-r--r--service/st-app-fw/src/st_data_manager.c2
-rw-r--r--service/st-app-fw/src/st_easy_setup.c4
-rw-r--r--service/st-app-fw/src/st_manager.c10
5 files changed, 11 insertions, 9 deletions
diff --git a/service/st-app-fw/include/st_data_manager.h b/service/st-app-fw/include/st_data_manager.h
index c0cf295..d28748c 100644
--- a/service/st-app-fw/include/st_data_manager.h
+++ b/service/st-app-fw/include/st_data_manager.h
@@ -112,7 +112,6 @@ typedef struct
{
struct st_easy_setup_info_t
{
-#ifdef ST_CONF_ENABLED
struct st_conn_info_t
{
int type;
@@ -122,7 +121,6 @@ typedef struct
bool artik;
} soft_ap;
} connectivity;
-#endif /* ST_CONF_ENABLED */
int ownership_transfer_method;
} easy_setup;
#ifdef ST_CONF_ENABLED
diff --git a/service/st-app-fw/include/st_easy_setup.h b/service/st-app-fw/include/st_easy_setup.h
index 76c3ff6..7e0a163 100644
--- a/service/st-app-fw/include/st_easy_setup.h
+++ b/service/st-app-fw/include/st_easy_setup.h
@@ -43,7 +43,7 @@ int st_is_easy_setup_finish(void);
int st_easy_setup_start(sc_properties *vendor_props, st_easy_setup_cb_t cb);
void st_easy_setup_stop(void);
int st_gen_ssid(char *ssid, const char *device_name, const char *mnid,
- const char *sid);
+ const char *setup_id);
#ifdef __cplusplus
}
diff --git a/service/st-app-fw/src/st_data_manager.c b/service/st-app-fw/src/st_data_manager.c
index 4f9c24d..24efd03 100644
--- a/service/st-app-fw/src/st_data_manager.c
+++ b/service/st-app-fw/src/st_data_manager.c
@@ -590,7 +590,6 @@ st_decode_configuration(oc_rep_t *conf_rep)
st_print_log("[ST_DM] can't get easy setup data\n");
goto error;
}
-#ifdef ST_CONF_ENABLED
oc_rep_t *conn_rep = NULL, *softap_rep = NULL;
char *str_value = NULL;
size_t size = 0;
@@ -614,7 +613,6 @@ st_decode_configuration(oc_rep_t *conf_rep)
if (oc_rep_get_bool(softap_rep, ST_CONF_SOFTAP_ARTIK_KEY, &bool_value)) {
conf->easy_setup.connectivity.soft_ap.artik = bool_value;
}
-#endif /* ST_CONF_ENABLED */
if (oc_rep_get_int(conf_es_rep, ST_CONF_ES_OTM_KEY, &int_value)) {
#ifdef OC_SECURITY
if (!check_valid_otm_method(int_value)) {
diff --git a/service/st-app-fw/src/st_easy_setup.c b/service/st-app-fw/src/st_easy_setup.c
index ad2d1d2..46ecd6e 100644
--- a/service/st-app-fw/src/st_easy_setup.c
+++ b/service/st-app-fw/src/st_easy_setup.c
@@ -170,7 +170,7 @@ st_easy_setup_stop(void)
int
st_gen_ssid(char *ssid, const char *device_name, const char *mnid,
- const char *sid)
+ const char *setup_id)
{
unsigned char mac[6] = { 0 };
@@ -180,7 +180,7 @@ st_gen_ssid(char *ssid, const char *device_name, const char *mnid,
}
snprintf(ssid, MAX_SSID_LEN, "%s_%s%s%s%d%02X%02X", device_name,
- EASYSETUP_TAG, mnid, sid, 0, mac[4], mac[5]);
+ EASYSETUP_TAG, mnid, setup_id, 0, mac[4], mac[5]);
st_print_log("[ST_ES] ssid : %s\n", ssid);
return 0;
diff --git a/service/st-app-fw/src/st_manager.c b/service/st-app-fw/src/st_manager.c
index 7ff8cc5..d05857b 100644
--- a/service/st-app-fw/src/st_manager.c
+++ b/service/st-app-fw/src/st_manager.c
@@ -654,9 +654,12 @@ st_manager_stack_init(void)
char ssid[MAX_SSID_LEN + 1];
st_specification_t *spec = st_data_mgr_get_spec_info();
+ st_configuration_t *conf = st_data_mgr_get_config_info();
if (st_gen_ssid(ssid, oc_string(spec->device.device_name),
oc_string(spec->platform.manufacturer_name),
- oc_string(spec->platform.model_number)) != 0) {
+ oc_string(conf->easy_setup.connectivity.soft_ap.setup_id))
+ != 0)
+ {
return -1;
}
st_turn_on_soft_AP(ssid, SOFT_AP_PWD, SOFT_AP_CHANNEL);
@@ -986,9 +989,12 @@ st_manager_stack_start(void)
char ssid[MAX_SSID_LEN + 1];
st_specification_t *spec = st_data_mgr_get_spec_info();
+ st_configuration_t *conf = st_data_mgr_get_config_info();
if (st_gen_ssid(ssid, oc_string(spec->device.device_name),
oc_string(spec->platform.manufacturer_name),
- oc_string(spec->platform.model_number)) != 0) {
+ oc_string(conf->easy_setup.connectivity.soft_ap.setup_id))
+ != 0)
+ {
return -1;
}
st_turn_on_soft_AP(ssid, SOFT_AP_PWD, SOFT_AP_CHANNEL);