summaryrefslogtreecommitdiff
path: root/vconf-compat
AgeCommit message (Collapse)AuthorFilesLines
2020-01-31Fix memory leakJusung Son1-1/+1
Change-Id: Ic61ebe2896f4263b20f8c38c4448a519e9bffa2d Signed-off-by: Jusung Son <jusung07.son@samsung.com>
2019-03-12Add buxton_error_e to return correct errorjusung son1-212/+335
- The global variable 'errno' can be contaminated by other libraries. Change-Id: Iacd03dc7c1d97cec8f80b03d001a52b01620f3f0 Signed-off-by: jusung son <jusung07.son@samsung.com>
2019-03-05Use buxton_errno instead of global variable 'errno'jusung son1-54/+55
- The global variable 'errno' can be contaminated by other libraries. Change-Id: Ie173b0907a8ade50af436c4fd699be1fe1d0033b Signed-off-by: jusung son <jusung07.son@samsung.com> (cherry picked from commit 12742d4a6f6b24fd0a24a75ac18b510e1a888cd2)
2019-03-04vconf: Clarify documentation for vconf_keylist_lookup()Paweł Szewczyk1-1/+6
The returned value was not described correctly and the example ommited checking if the value was actually obtained. This commit add neccessary check to the example code for this function. Change-Id: I507e297338c4c459c99b0cbf8a0b835d71270887 Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
2018-07-10Add "_vconf" prefix to the internal APIs in vconf-compatjusung son1-92/+92
Change-Id: I42d82fc468c849b4f8b357a57a6e25132b64a764 Signed-off-by: jusung son <jusung07.son@samsung.com>
2018-06-15Fix build warningsjusung son1-4/+2
Change-Id: I9b64a06f82d3cb2f92a7ab73c4e1ad83637b2109 Signed-off-by: jusung son <jusung07.son@samsung.com>
2018-06-14Fix wrong resource managementInkyun Kil1-4/+51
If a program is unloaded before GMainContext invoke the 'call_noti_cb', the program is crashed because the 'call_noti_cb' has deleted. To prevent it, remove the source from GMainContext at destructor. Change-Id: I3cdf7e84c055856f58d1797c8444464be585ef0d Signed-off-by: Inkyun Kil <inkyun.kil@samsung.com> Signed-off-by: jusung son <jusung07.son@samsung.com>
2018-05-29Add dump command in vconftooljusung son1-0/+10
Change-Id: I285ace5ad1f01c311e47bc47fc19e2f2464e335e Signed-off-by: jusung son <jusung07.son@samsung.com>
2018-05-09Add codes for defensive programmingInkyun Kil1-0/+16
Before buxton daemon wakes up, some modules can use buxton2ctl directly by using vconftool. Then 'memory.db' file's owner may be wrong. Change-Id: Ieed25b378c1c579d1216f10b590063a910b21a49 Signed-off-by: Inkyun Kil <inkyun.kil@samsung.com>
2018-03-07Fix wrong resource managementjusung son1-12/+23
- callback information protection logic - socket leak Change-Id: If11518db21aefddf8de30dc2463338ccf5d86109 Signed-off-by: jusung son <jusung07.son@samsung.com>
2018-01-17Use direct option in vconf backup/restoreJiwoong Im1-2/+6
Change-Id: I644005ba315581e5604c27049d02f04640443a85 Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com> (cherry picked from commit bd30a3f64e66d63032fa7ed66b848a12279b867e)
2017-11-29Fix vconftool set commandSemun Lee1-7/+5
When the key cannot be retrieved while setting the value, try to create it assuming the key doesn't exist. Checking "No such file" log is not that robust way checking if the key exist or not because it depends on "errno" which can be changed by some libc apis. Change-Id: I0231632a0df104030c90c9cd01af06d8a9d95552 Signed-off-by: Semun Lee <semun.lee@samsung.com>
2017-10-12Fix static analysis issuesInkyun Kil1-2/+4
Change-Id: I3d20f2a137b392debf8d0652ede79ae40bb87504 Signed-off-by: Inkyun Kil <inkyun.kil@samsung.com>
2017-09-28Apply Coding rulejusung son1-1/+1
Change-Id: I1221f7a8cc9cacf0409eed34ca2d84ab6ec677da Signed-off-by: jusung son <jusung07.son@samsung.com>
2017-09-28Add lcov commentjusung son1-0/+6
Change-Id: I29c82c1cd8cabac4cd122f406cc4083089c961be Signed-off-by: jusung son <jusung07.son@samsung.com>
2017-09-08Fix build warningsInkyun Kil1-1/+1
Change-Id: Ibfd8c1a7c43590b09b113680373ea680b0482c15 Signed-off-by: Inkyun Kil <inkyun.kil@samsung.com>
2017-09-07Revert "Make vconftool printing log messages, adding vconftool2 in a secret way"jusung son2-312/+0
This reverts commit d4b6cdf973b18a4d3f7d3d386d8999658314be7b. Change-Id: Iabc7f9a91278f0b64cbcacb39c7cf873c8bffd12
2017-08-24Make vconftool printing log messages, adding vconftool2 in a secret wayMyoungJune Park2-0/+312
Change-Id: I6ae273a92ca3c2ddb81b078ec2429c316ceb1bf9 Signed-off-by: MyoungJune Park <mj2004.park@samsung.com> Signed-off-by: jusung son <jusung07.son@samsung.com>
2017-07-06Fix bug in vconftool restore commandJiwoong Im1-1/+1
- When restoring a string key, there is a problem that a space is added before the value. Change-Id: Idb80518b47c011d16727a52e3268641e03105d6c Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
2017-07-06Add new command in vconftoolJiwoong Im1-0/+69
- Add vconf key backup & restore command Change-Id: Ifdbba1f40460f0bc6b4c5249540701aa97ea41cf Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
2017-03-20Revert "Update vconf cache in notify_cb"Jiwoong Im1-5/+0
This reverts commit 49ad9fca0a58811426d4a96424794e577f94bb7d. Change-Id: Ibc96fc1924fbfb1881f5905a6432ae325626d7df Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
2017-03-20Revert "Restore applying cache in vconf library side"Jiwoong Im1-119/+2
This reverts commit d65a8d7ce879168cdd2009412782bb6b2a505a53. Change-Id: Iddf120e0d6f38fc6799f26fbee747c808d4187e4 Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
2017-03-20Fix some option in vconftoolJiwoong Im1-14/+19
- Enable force option for 2.4 compatibility. Disable Smack option because buxton's access control is based on privilege. Change-Id: I9acee5b0ca8a38e12316e0beb032fe2547ce8c51 Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
2017-03-02Update vconf cache in notify_cbJiwoong Im1-0/+5
- cache should be updated in notify_cb to guarantee accurate value. Change-Id: I47f35e481061462beee602580c449bf56d042063 Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com> (cherry picked from commit 49ad9fca0a58811426d4a96424794e577f94bb7d)
2017-02-23Change priority of idler which calls vconf changed callbackJiwoong Im1-1/+1
- If client is too busy to call vconf changed callback in idler, vconf changed callback is ignored. To guarantee call of vconf changed callback, change priority of idler to G_PRIORITY_HIGH. Change-Id: Ic05bc06734fd674f0ffbc81809acabc11675f604 Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
2017-02-01Fix bug in restore connectionJiwoong Im1-0/+10
- vconf_ignore_key_changed should be called without a connection initialization, if connection is closed and not restored immediately. This situation causes SIGABRT on the client. To prevent this, add _open/_close in vconf_ignore_key_changed. - Increase _refcnt in restoring vconf notify callback. Change-Id: Ief92dd08760b155e2e0ef61b4287decd22e240dd Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
2017-01-31Restore applying cache in vconf library sideJiwoong Im1-2/+119
- Cache is only used if client uses g_main_loop. Change-Id: I7096602f921af78e0547b86678e3a1fc962a3d24 Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
2017-01-24revert performance improvement patch in vconf libray sidesubmit/tizen_3.0/20170124.012351submit/tizen/20170124.012332accepted/tizen/wearable/20170125.085040accepted/tizen/tv/20170125.085036accepted/tizen/mobile/20170125.085031accepted/tizen/ivi/20170125.085044accepted/tizen/common/20170124.181806accepted/tizen/3.0/wearable/20170125.083250accepted/tizen/3.0/tv/20170125.083236accepted/tizen/3.0/mobile/20170125.083218accepted/tizen/3.0/ivi/20170125.083304accepted/tizen/3.0/common/20170125.121508tizen_3.0_tvJiwoong Im1-99/+1
- If a daemon does not use g_main_loop, noti_cb for cache key-value is not invoked. In this case, buxton daemon is blocked in sending noti to the client. Change-Id: Idef9e3d1206bc6f127a72a41061afdb255e7117e Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
2017-01-11Improved performance in get/set operationsubmit/tizen_3.0/20170116.091702accepted/tizen/3.0/wearable/20170118.042631accepted/tizen/3.0/tv/20170118.042614accepted/tizen/3.0/mobile/20170118.042557accepted/tizen/3.0/ivi/20170118.042650accepted/tizen/3.0/common/20170118.130815Jiwoong Im1-1/+99
- Add hashtable in buxton daemon to reduce db access. Add hashtable in client for repeated get operation on the same key. Send notis to client after sending result of set operation. - Brief profiling data +---------------------------------------------------+ | - Gerenal set/get operation | | vconf set average : 5.420375 ms -> 3.430805 ms | | vconf get average : 1.721345 ms -> 0.592360 ms | | | | - Repeated get operation on the same key | | vconf get average : 1.721345 ms -> 0.010990 ms | +---------------------------------------------------+ Change-Id: Ib7ffd75dbd3bb11b76e9729f4177605848c47dfe Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
2016-12-14using vconf_lock in restore_connectionsubmit/tizen_3.0/20161215.010253accepted/tizen/3.0/wearable/20161216.013852accepted/tizen/3.0/tv/20161216.013837accepted/tizen/3.0/mobile/20161216.013744accepted/tizen/3.0/ivi/20161216.013909accepted/tizen/3.0/common/20161216.122740Jiwoong Im1-0/+9
- To protect noti_tbl & client data in multi-thread situations Change-Id: Ic1d2d29a86bffdfd5872c74109e2e92e51d1be5e Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
2016-12-08restore connection in vconf api, if socket connection is closedJiwoong Im1-5/+46
Change-Id: I620b41bdc28bb6aa1dffa9df35727047fdc58042 Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
2016-12-01fix _open in vconf apisubmit/tizen_3.0/20161202.062936Jiwoong Im1-0/+1
- If buxton_open fails, reduce refcnt. Change-Id: I5eb923b3e127116bb9b28a400aa5eb3db73f8e65 Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
2016-11-01Revert "Revert "share buxton connection in vconf get/set api""submit/tizen_3.0_common/20161110.084657submit/tizen_3.0/20161102.064015submit/tizen/20161109.002425submit/tizen/20161101.112858accepted/tizen/wearable/20161110.000415accepted/tizen/tv/20161110.000356accepted/tizen/mobile/20161110.000326accepted/tizen/ivi/20161110.000432accepted/tizen/common/20161109.140340accepted/tizen/3.0/wearable/20161103.131732accepted/tizen/3.0/tv/20161103.131712accepted/tizen/3.0/mobile/20161103.131654accepted/tizen/3.0/ivi/20161103.131750accepted/tizen/3.0/common/20161114.082420Jiwoong Im1-83/+72
This reverts commit c84229499da8c0583d9d53f3647e792c98e440ec. Change-Id: Ib1bb601b255de1bce4e3ce6a1e20d6d0893f8519 Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
2016-10-18modify log level in buxton/vconf apisubmit/tizen_3.0_common/20161104.104000submit/tizen_3.0/20161028.082423submit/tizen_3.0/20161028.062323submit/tizen/20161018.072833accepted/tizen/wearable/20161018.235338accepted/tizen/tv/20161018.235343accepted/tizen/mobile/20161018.235331accepted/tizen/ivi/20161018.235353accepted/tizen/common/20161018.175258accepted/tizen/3.0/wearable/20161028.133717accepted/tizen/3.0/tv/20161028.133412accepted/tizen/3.0/mobile/20161028.133106accepted/tizen/3.0/ivi/20161028.133952Jiwoong Im2-3/+8
Change-Id: I53297c268240a0ff5731e832256843260521c6e8 Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
2016-10-13Revert "share buxton connection in vconf get/set api"submit/tizen/20161013.092521submit/tizen/20161013.092412accepted/tizen/wearable/20161013.094944accepted/tizen/tv/20161013.094932accepted/tizen/mobile/20161013.094916accepted/tizen/ivi/20161013.095002accepted/tizen/common/20161013.160710Jiwoong Im1-72/+83
This reverts commit d1af0d545b8b65b7f747466e61602e63ebc3a009. Change-Id: Ibe2a5d33f65d262b6fec9eca5963dcecad2b52f2 Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
2016-10-10share buxton connection in vconf get/set apisubmit/tizen/20161010.024800accepted/tizen/wearable/20161011.233918accepted/tizen/tv/20161011.233920accepted/tizen/mobile/20161011.233912accepted/tizen/ivi/20161011.233924accepted/tizen/common/20161010.145807Jiwoong Im1-83/+72
Change-Id: Ic8525cfd607b11543c8cb8c5f9d95bfd3da1d7a7 Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
2016-09-09Add an exception handlingsubmit/tizen_3.0_wearable/20161015.000000submit/tizen_3.0_tv/20161015.000000submit/tizen_3.0_mobile/20161015.000000submit/tizen_3.0_ivi/20161010.000010submit/tizen_3.0_ivi/20161010.000000submit/tizen/20160911.233959accepted/tizen/wearable/20160912.093223accepted/tizen/tv/20160912.093205accepted/tizen/mobile/20160912.093152accepted/tizen/ivi/20160912.093239accepted/tizen/common/20160912.180711accepted/tizen/3.0/wearable/20161015.080346accepted/tizen/3.0/tv/20161016.003451accepted/tizen/3.0/mobile/20161015.032318accepted/tizen/3.0/ivi/20161011.053529Hwankyu Jhun1-1/+3
Change-Id: Ifd4f889cdb3c214485e5f5f77c5b2c8a2fb8ed03 Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
2016-08-26extend lock scope of clients_lock & vconf_lock in librarysubmit/tizen/20160829.073018accepted/tizen/wearable/20160830.061232accepted/tizen/tv/20160830.061149accepted/tizen/mobile/20160830.061104accepted/tizen/ivi/20160830.061237accepted/tizen/common/20160830.150004Jiwoong Im1-16/+7
Change-Id: Ibdecd0e326e8b4f965f10dc4e08dfa7acd58f27e Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
2016-08-11extend lock scope of vconf_lock in notify/ignore apisubmit/tizen/20160822.060113accepted/tizen/wearable/20160824.021637accepted/tizen/tv/20160824.021529accepted/tizen/mobile/20160824.021431accepted/tizen/ivi/20160824.021604accepted/tizen/common/20160823.132554Jiwoong Im1-6/+5
- Sometimes buxton client is closed by ohter thread, if vconf_lock is unlocked in notify/ignore API. There is no need to unlock vconf_lock before call buxton api, because noti_cb is called in idler. (noti callback which is called in wait_msg in buxton api causes dead lock) As a result, extend lock scope of vconf_lock. Change-Id: Ib9883af231dc76c888d6b12334da70929169ddc0 Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
2016-07-13 vconf-compat : modify calling noti callback in idlersubmit/tizen/20160713.123903accepted/tizen/wearable/20160713.125906accepted/tizen/tv/20160713.125850accepted/tizen/mobile/20160713.125833accepted/tizen/ivi/20160713.125925accepted/tizen/common/20160714.152559Jiwoong Im1-61/+30
- There is a timing issue that noti callback is called after unregistered To fix this issue, find noti callback in idler and call the noti callback Change-Id: I1299da587bf6f99c3e4955f758e4149306dc0b54 Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
2016-06-28reassign PATH env in shell scriptsubmit/tizen_common/20160701.180000submit/tizen/20160629.021322accepted/tizen/wearable/20160629.070821accepted/tizen/tv/20160629.070734accepted/tizen/mobile/20160629.071004accepted/tizen/ivi/20160629.070841accepted/tizen/common/20160703.130005Jiwoong Im1-0/+1
Change-Id: I1c392d4562de0ed58262ad08fc80ea317cdb5686 Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
2016-06-27vconf-compat : add idler to call noti callbacksubmit/tizen/20160627.042541accepted/tizen/wearable/20160629.015552accepted/tizen/tv/20160629.015750accepted/tizen/mobile/20160629.015622accepted/tizen/ivi/20160629.015702accepted/tizen/common/20160703.125833Jiwoong Im1-24/+76
Change-Id: Idb62ea2a72413d4719ffad8033fe8fd30f027fdd Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
2016-06-21vconf-compat : add lcov exclude comment for not supported api in tcsubmit/tizen/20160623.110452submit/tizen/20160621.225650accepted/tizen/wearable/20160624.064001accepted/tizen/tv/20160624.063735accepted/tizen/mobile/20160624.063716accepted/tizen/ivi/20160624.064116accepted/tizen/common/20160629.222152accepted/tizen/common/20160627.191114Jiwoong Im1-0/+4
Change-Id: Ic840702d21303b072e011e3bfc96bafdf7b4249d Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
2016-06-07Fix issue related to noti_tbl hash tablesubmit/tizen/20160608.045259accepted/tizen/wearable/20160609.090139accepted/tizen/tv/20160609.090225accepted/tizen/mobile/20160609.090122accepted/tizen/ivi/20160609.090151accepted/tizen/common/20160610.175821Semun Lee1-4/+7
- fix wrong copy_noti loop - remove noti from noti_tbl after unregister noti completely Change-Id: Ifd18061783b2c5f2f147dd6c769b6716189be7ba Signed-off-by: Semun Lee <sm79.lee@samsung.com>
2016-06-02library : remove idler function which frees noti callbackJiwoong Im1-43/+65
- change deleted flag to refcnt in noti_cb structure to manage callback Change-Id: Ib95d2e8f21522268751d9788061e95859af5b705 Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
2016-04-27library : add buxton_open_full apisubmit/tizen/20160502.025527submit/tizen/20160427.083148accepted/tizen/wearable/20160503.010541accepted/tizen/tv/20160503.010523accepted/tizen/mobile/20160503.010511accepted/tizen/ivi/20160503.010558accepted/tizen/common/20160428.144215Jiwoong Im1-1/+1
Change-Id: I878608e041cbcaf7c0d763619d02fda206991d9b Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
2016-04-25vconf-compat : fix possible atomicity violationsubmit/tizen/20160426.022112accepted/tizen/wearable/20160426.234010accepted/tizen/tv/20160426.234029accepted/tizen/mobile/20160426.233938accepted/tizen/ivi/20160426.234048accepted/tizen/common/20160427.053710Jiwoong Im1-1/+1
Change-Id: I50d56d26ffd227c17a55ecd014c2db554d12c959 Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
2016-04-22vconf-compat : fix multi-thread issuesubmit/tizen/20160422.142435accepted/tizen/wearable/20160423.060402accepted/tizen/tv/20160423.060122accepted/tizen/mobile/20160423.055726accepted/tizen/ivi/20160423.060635accepted/tizen/common/20160425.144814Jiwoong Im1-73/+132
- use stack value in vconf set/get api - add mutex lock for vconf noti client Change-Id: Ie9477b707abbaf0d712562abca3233216614cd47 Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
2016-03-23modify to get errno using vconf_notify_key_changedsubmit/tizen/20160323.235918submit/tizen/20160323.065638accepted/tizen/wearable/20160324.132707accepted/tizen/tv/20160324.132743accepted/tizen/mobile/20160324.132922accepted/tizen/ivi/20160324.131645accepted/tizen/common/20160325.134913accepted/tizen/common/20160324.084237Jiwoong Im1-0/+4
- modify to get errno by vconf_get_ext_errno, if vconf_notify_key_changed returns error. Change-Id: Ia748405b413296ad8978e2eb59a7608b11cd5b33 Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
2016-03-04vconf-compat : fix bug in setting last_resultsubmit/tizen/20160304.074224accepted/tizen/wearable/20160305.094140accepted/tizen/tv/20160305.094120accepted/tizen/mobile/20160305.094102accepted/tizen/ivi/20160305.094157accepted/tizen/common/20160304.203747Jiwoong Im1-5/+10
Change-Id: I90cf1c4c2f7aa4d98abdac9be6b3bad74b0ce718 Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>