platform/core/system/setup-adaptor.git
7 years agoFix for SVACE (WGID 322531) in setup-adaptor 29/167029/4 accepted/tizen_4.0_unified tizen_4.0 accepted/tizen/4.0/unified/20180115.135648 submit/tizen_4.0/20180115.073731 tizen_4.0.IoT.p2_release
nshero.lee [Mon, 15 Jan 2018 05:29:03 +0000 (14:29 +0900)]
Fix for SVACE (WGID 322531) in setup-adaptor

The issue is caused by g_main_loop_new.
If the thread is completed, it should be freed.
In case of error like unitializing case, it should be properly freed.

Change-Id: I224ffe56b2badaca2387a2e9fd30df940969dae3
Signed-off-by: nshero.lee <nshero.lee@samsung.com>
7 years agoFix for Coverity defect(CID 104926) 89/166989/1 submit/tizen_4.0/20180115.023822
nshero.lee [Mon, 15 Jan 2018 01:57:57 +0000 (10:57 +0900)]
Fix for Coverity defect(CID 104926)

Due to conditional free, the defect was occured.
Change the code to free properly.
If memory is alloced, it will be freed at the end of 'if'

Change-Id: I1285128e68378ddcaa9b07005dbc09b41c0ae8bf
Signed-off-by: nshero.lee <nshero.lee@samsung.com>
7 years agoChange the path to manage config and flag files for setup-adaptor 75/166375/1 accepted/tizen/4.0/unified/20180111.051300 submit/tizen_4.0/20180110.020137
nshero.lee [Wed, 10 Jan 2018 01:57:12 +0000 (10:57 +0900)]
Change the path to manage config and flag files for setup-adaptor

from /etc/setup-adaptor -> /opt/etc/setup-adaptor
the file will be written on running time therefore, it should be rw area

Change-Id: Ia0af560cc9d7071a67bb36e639ec636486152cd2
Signed-off-by: nshero.lee <nshero.lee@samsung.com>
7 years agoFixed coverity(prevent) issue 85/166185/1 accepted/tizen/4.0/unified/20180111.051104 submit/tizen_4.0/20180108.133329
nshero.lee [Mon, 8 Jan 2018 13:26:20 +0000 (22:26 +0900)]
Fixed coverity(prevent) issue

Change-Id: Id9a815ac6b925dd2c69fc33870663a1a526e9c15
Signed-off-by: nshero.lee <nshero.lee@samsung.com>
7 years agoModify handling case for not found ssid 49/166049/1 submit/tizen_4.0/20180105.090251
nshero.lee [Fri, 5 Jan 2018 08:57:28 +0000 (17:57 +0900)]
Modify handling case for not found ssid

If ssid is not able to find, setup-adaptor has to be retried to re connect next booting.
In order to provide the scenario __Wifl_scan_finished_ca() would be waited forever.
And systemd kills the service.

Change-Id: I13ab448b1627a5ceb1ef08df18f274c3bd26a2b9
Signed-off-by: nshero.lee <nshero.lee@samsung.com>
7 years agoUpdate version v0.3.0 23/165723/1 submit/tizen_4.0/20180104.080035
nshero.lee [Wed, 3 Jan 2018 11:09:43 +0000 (20:09 +0900)]
Update version v0.3.0

Change-Id: Ib7ac4add088d56f9d5223c8fb1f7de55c2dc1fca
Signed-off-by: nshero.lee <nshero.lee@samsung.com>
7 years agoFixed TPLDOCKER-382 related to ethernet cable 19/165719/1
nshero.lee [Wed, 3 Jan 2018 10:42:18 +0000 (19:42 +0900)]
Fixed TPLDOCKER-382 related to ethernet cable

If the cable is detached, config.json is removed.
In this case, it has to be retried when the cable is connected.
Therefore, the flag file has to be kept

Change-Id: Ic1b52e8cc5a1e4a00acb59ca48e53c30381873e1
Signed-off-by: nshero.lee <nshero.lee@samsung.com>
Removed unnecessary value in print log

Change-Id: Ib0c6adc03c672b672aedd2ad5fbd5face3074725
Signed-off-by: nshero.lee <nshero.lee@samsung.com>
7 years agoFixed TPLDOCKER-381 defect regarding invalid ssid connection 05/165705/1
nshero.lee [Wed, 3 Jan 2018 08:41:02 +0000 (17:41 +0900)]
Fixed TPLDOCKER-381 defect regarding invalid ssid connection

If setup-adaptor tries to connection with invalid ssid,
it will not be completed properly.

1) wifi ssid : docker, password : dockerdocker111 => Okay (invaild password case)
2) wifi ssid : docker11, password : dockerdocker => Fail (invalid ssid case)

setup-adaptor uses __wifi_scan_finished_cb function to connect.
wifi_manager_foreach_found_ap will be worked according to __wifi_connect_ap_cb() return
If all of ssids are searched and compared, it will go down and has to meet
__wifi_exit_loop() function to be completed properly.

Change-Id: Ic93e5b9e8bf4cbeed20af2ca8a1c0982f13c7e65
Signed-off-by: nshero.lee <nshero.lee@samsung.com>
7 years agoFixed the defect TPLDPCLER-380 98/165598/1
nshero.lee [Tue, 2 Jan 2018 10:48:58 +0000 (19:48 +0900)]
Fixed the defect TPLDPCLER-380

wifi connection is not established if wifi is already activated.
Wifi has steps to connect, before connection, it has to be activated.
If the device is activated and not connected, it would be return 'alreay
exists'. Therefore it must cover to deal with

Change-Id: I19d679dfc5cc49bec9a7cea47748e6fc8fbeb112
Signed-off-by: nshero.lee <nshero.lee@samsung.com>
7 years agoFixed coding rule due to white space 80/165580/1
nshero.lee [Tue, 2 Jan 2018 08:13:43 +0000 (17:13 +0900)]
Fixed coding rule due to white space

Change-Id: I480cc528ec7d279f57dd4e735d7032c7d2d8163a
Signed-off-by: nshero.lee <nshero.lee@samsung.com>
7 years agoFixed SVACE bug 79/165579/1
nshero.lee [Tue, 2 Jan 2018 08:11:18 +0000 (17:11 +0900)]
Fixed SVACE bug

Locally, the codes are checked with SVACE tool and fixed critical
and major issues

Change-Id: I01e6ec3ff8daa48363795eddb43446805c7995bc
Signed-off-by: nshero.lee <nshero.lee@samsung.com>
7 years agoApplied coding rule 70/165570/1
nshero.lee [Tue, 2 Jan 2018 07:21:44 +0000 (16:21 +0900)]
Applied coding rule

Not to make coding rule error, check tizen coding rule

Change-Id: I98996dccc7b8ddda07b46caaba41e1f9be040dd5
Signed-off-by: nshero.lee <nshero.lee@samsung.com>
7 years agoMerge pull request #4 from RS7-DeviceManagement/v0.1-resolve-duplication
박지환/Advanced DX Lab(SR)/Principal Engineer/삼성전자 [Tue, 2 Jan 2018 06:29:11 +0000 (15:29 +0900)]
Merge pull request #4 from RS7-DeviceManagement/v0.1-resolve-duplication

V0.1 resolve duplication

7 years agoMerge branch 'master' of https://github.sec.samsung.net/RS7-DeviceManagement/setup...
jiehwan.park [Tue, 2 Jan 2018 06:13:03 +0000 (15:13 +0900)]
Merge branch 'master' of https://github.sec.samsung.net/RS7-DeviceManagement/setup-adaptor into v0.1-resolve-duplication

Signed-off-by: jiehwan.park <jiehwan.park@samsung.com>
7 years agoMerge pull request #3 from RS7-DeviceManagement/v0.1-enable_ethernet
박지환/Advanced DX Lab(SR)/Principal Engineer/삼성전자 [Tue, 2 Jan 2018 05:01:31 +0000 (14:01 +0900)]
Merge pull request #3 from RS7-DeviceManagement/v0.1-enable_ethernet

enable ethernet setting

7 years agoRemoved delay for checking network state v0.1-enable_ethernet
wansu.yoo [Tue, 2 Jan 2018 04:38:09 +0000 (13:38 +0900)]
Removed delay for checking network state

there need some delay for sync after network setting
but delay is not proper method for waiting
so, remove delay and check routine
it have to be considered through callback or others

Signed-off-by: wansu.yoo <wansu.yoo@samsung.com>
7 years agoFixed excption when it prints logs
nshero.lee [Tue, 2 Jan 2018 03:03:17 +0000 (12:03 +0900)]
Fixed excption when it prints logs

In case of dynamic allocation, it needs to check memory and print out
It was missed and added it before printing logs

Signed-off-by: nshero.lee <nshero.lee@samsung.com>
7 years agoFix ethernet setting errors
wansu.yoo [Thu, 28 Dec 2017 01:22:40 +0000 (10:22 +0900)]
Fix ethernet setting errors

1. fix parsing error of "secondaryDnsServer" key
ethernet is being enabled successfully with correct "secondaryDnsServer" value.

2. increase delay time for sync after setting. (2 -> 5 sec)
currently, __network_get_state is returning wrong value using previous connection handle.
there need more delay time after setting network to get new connection.

3. remove temporary blocked code / add some debug info

Signed-off-by: wansu.yoo <wansu.yoo@samsung.com>
7 years agoconsider re-entrance issue.
jiehwan.park [Wed, 27 Dec 2017 11:21:33 +0000 (20:21 +0900)]
consider re-entrance issue.

delete config file if completed.
add each flag of configuration items because wifi has async return.

Signed-off-by: jiehwan.park <jiehwan.park@samsung.com>
7 years agoenable ethernet setting
sy1124.kim [Wed, 27 Dec 2017 10:09:15 +0000 (19:09 +0900)]
enable ethernet setting

Signed-off-by: sy1124.kim <sy1124.kim@samsung.com>
7 years agoMerge pull request #2 from RS7-DeviceManagement/v0.1-enable_wifi
박지환/Advanced DX Lab(SR)/Principal Engineer/삼성전자 [Wed, 27 Dec 2017 07:01:04 +0000 (16:01 +0900)]
Merge pull request #2 from RS7-DeviceManagement/v0.1-enable_wifi

enable wifi setting

7 years agoenable wifi setting v0.1-enable_wifi
jiehwan.park [Wed, 27 Dec 2017 06:43:01 +0000 (15:43 +0900)]
enable wifi setting

Signed-off-by: jiehwan.park <jiehwan.park@samsung.com>
7 years agoUpdate readme
nshero.lee [Thu, 21 Dec 2017 08:28:18 +0000 (17:28 +0900)]
Update readme

Signed-off-by: nshero.lee <nshero.lee@samsung.com>
7 years agoUpdate readme
nshero.lee [Thu, 21 Dec 2017 06:28:24 +0000 (15:28 +0900)]
Update readme

Signed-off-by: nshero.lee <nshero.lee@samsung.com>
7 years agoUpdate sample config
nshero.lee [Thu, 21 Dec 2017 06:27:09 +0000 (15:27 +0900)]
Update sample config

Signed-off-by: nshero.lee <nshero.lee@samsung.com>
7 years agoUpdate
nshero.lee [Thu, 21 Dec 2017 01:17:31 +0000 (10:17 +0900)]
Update

Signed-off-by: nshero.lee <nshero.lee@samsung.com>
7 years agoUpdate
nshero.lee [Thu, 21 Dec 2017 01:16:52 +0000 (10:16 +0900)]
Update

Signed-off-by: nshero.lee <nshero.lee@samsung.com>
7 years agoUpdate
nshero.lee [Thu, 21 Dec 2017 01:11:09 +0000 (10:11 +0900)]
Update

Signed-off-by: nshero.lee <nshero.lee@samsung.com>
7 years agoUpdate
nshero.lee [Wed, 20 Dec 2017 17:11:38 +0000 (02:11 +0900)]
Update

Signed-off-by: nshero.lee <nshero.lee@samsung.com>
7 years agoFixed parsing issue
nshero.lee [Wed, 20 Dec 2017 12:50:30 +0000 (21:50 +0900)]
Fixed parsing issue

Signed-off-by: nshero.lee <nshero.lee@samsung.com>
7 years agoChange parsing structure
nshero.lee [Wed, 20 Dec 2017 11:09:27 +0000 (20:09 +0900)]
Change parsing structure

Signed-off-by: nshero.lee <nshero.lee@samsung.com>
7 years agoUpdate implementaion
nshero.lee [Wed, 20 Dec 2017 10:08:02 +0000 (19:08 +0900)]
Update implementaion

Signed-off-by: nshero.lee <nshero.lee@samsung.com>
7 years agoUpdate build error according to resturctuing
nshero.lee [Wed, 20 Dec 2017 00:23:43 +0000 (09:23 +0900)]
Update build error according to resturctuing

Signed-off-by: nshero.lee <nshero.lee@samsung.com>
7 years agoModify design and apply
nshero.lee [Tue, 19 Dec 2017 07:23:21 +0000 (16:23 +0900)]
Modify design and apply

Signed-off-by: nshero.lee <nshero.lee@samsung.com>
7 years agoChange file name
nshero.lee [Tue, 19 Dec 2017 03:29:20 +0000 (12:29 +0900)]
Change file name

Signed-off-by: nshero.lee <nshero.lee@samsung.com>
7 years agoImplement 18th Dec
nshero.lee [Mon, 18 Dec 2017 13:10:41 +0000 (22:10 +0900)]
Implement 18th Dec

Signed-off-by: nshero.lee <nshero.lee@samsung.com>
7 years agoUpdate parsing code in sa_systemdata.c
nshero.lee [Mon, 18 Dec 2017 11:17:45 +0000 (20:17 +0900)]
Update parsing code in sa_systemdata.c

Signed-off-by: nshero.lee <nshero.lee@samsung.com>
7 years agoUpdate setup-adaptor implementation
nshero.lee [Mon, 18 Dec 2017 10:23:58 +0000 (19:23 +0900)]
Update setup-adaptor implementation

Signed-off-by: nshero.lee <nshero.lee@samsung.com>
7 years agoModify coding rule
nshero.lee [Fri, 15 Dec 2017 08:39:33 +0000 (17:39 +0900)]
Modify coding rule

Signed-off-by: nshero.lee <nshero.lee@samsung.com>
7 years agoMerge pull request #1 from RS7-DeviceManagement/v0.1-Skeleton_Developement
이남수/Developer Experience Lab(S/W센터)/Senior Engineer/삼성전자 [Mon, 20 Nov 2017 07:30:56 +0000 (16:30 +0900)]
Merge pull request #1 from RS7-DeviceManagement/v0.1-Skeleton_Developement

Skeleton developement

7 years agoSkeleton developement v0.1-Skeleton_Developement
nshero.lee [Mon, 20 Nov 2017 07:28:42 +0000 (16:28 +0900)]
Skeleton developement

Signed-off-by: nshero.lee <nshero.lee@samsung.com>
7 years agoInitial commit
이남수/Developer Experience Lab(S/W센터)/Senior Engineer/삼성전자 [Fri, 17 Nov 2017 07:40:29 +0000 (16:40 +0900)]
Initial commit