platform/core/system/buxton2.git
7 years agousing vconf_lock in restore_connection 72/104772/1 accepted/tizen/3.0/common/20161216.122740 accepted/tizen/3.0/ivi/20161216.013909 accepted/tizen/3.0/mobile/20161216.013744 accepted/tizen/3.0/tv/20161216.013837 accepted/tizen/3.0/wearable/20161216.013852 submit/tizen_3.0/20161215.010253
Jiwoong Im [Wed, 14 Dec 2016 06:53:36 +0000 (15:53 +0900)]
using vconf_lock in restore_connection

- To protect noti_tbl & client data in multi-thread situations

Change-Id: Ic1d2d29a86bffdfd5872c74109e2e92e51d1be5e
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
7 years agoextend lock in buxton_open_full 09/103709/3 submit/tizen_3.0/20161213.042049
Jiwoong Im [Fri, 9 Dec 2016 07:54:26 +0000 (16:54 +0900)]
extend lock in buxton_open_full

- If call free_client function without taking lock,
  it can cause an infinite loop in recv_cb.

Change-Id: I7ebf99c0eb745e142a0e3b0ebb4bb4fc4f5e7eb8
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
7 years agorestore connection in vconf api, if socket connection is closed 72/103372/3
Jiwoong Im [Thu, 8 Dec 2016 06:55:09 +0000 (15:55 +0900)]
restore connection in vconf api, if socket connection is closed

Change-Id: I620b41bdc28bb6aa1dffa9df35727047fdc58042
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
7 years agoadd EINTR exception handling in poll 63/96763/3 accepted/tizen/3.0/common/20161208.153808 accepted/tizen/3.0/ivi/20161208.063757 accepted/tizen/3.0/mobile/20161208.063729 accepted/tizen/3.0/tv/20161208.063741 accepted/tizen/3.0/wearable/20161208.063750 submit/tizen_3.0/20161208.010952
Jiwoong Im [Thu, 10 Nov 2016 06:04:02 +0000 (15:04 +0900)]
add EINTR exception handling in poll

Change-Id: I9bc64c756417f3a4a378356c4ea2b364de2948d7
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
7 years agoChange upgrade script number 58/101858/2 accepted/tizen/3.0/common/20161205.091857 accepted/tizen/3.0/ivi/20161204.235837 accepted/tizen/3.0/mobile/20161204.235637 accepted/tizen/3.0/tv/20161204.235740 accepted/tizen/3.0/wearable/20161204.235807 submit/tizen_3.0/20161202.085638
Jiwoong Im [Fri, 2 Dec 2016 08:46:20 +0000 (17:46 +0900)]
Change upgrade script number

Change-Id: I206cf57c5b84f806475fcd013459d86436f32be0
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
7 years agofix _open in vconf api 86/101386/1 submit/tizen_3.0/20161202.062936
Jiwoong Im [Thu, 1 Dec 2016 05:18:26 +0000 (14:18 +0900)]
fix _open in vconf api

- If buxton_open fails, reduce refcnt.

Change-Id: I5eb923b3e127116bb9b28a400aa5eb3db73f8e65
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
7 years agoFix memory leak in example codes 28/101228/1 accepted/tizen/3.0/common/20161203.012055 accepted/tizen/3.0/ivi/20161202.005458 accepted/tizen/3.0/mobile/20161202.005402 accepted/tizen/3.0/tv/20161202.005416 accepted/tizen/3.0/wearable/20161202.005435 submit/tizen_3.0/20161201.021013
Jiwoong Im [Wed, 30 Nov 2016 12:05:03 +0000 (21:05 +0900)]
Fix memory leak in example codes

Change-Id: I460a67233e1069c3f906c461f716d1596404eea0
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
7 years agoUse journal mode WAL only in R/W normal db 02/100902/2 accepted/tizen/3.0/common/20161130.133602 accepted/tizen/3.0/ivi/20161130.091219 accepted/tizen/3.0/mobile/20161130.091124 accepted/tizen/3.0/tv/20161130.091146 accepted/tizen/3.0/wearable/20161130.091203 submit/tizen_3.0/20161130.023420
Jiwoong Im [Tue, 29 Nov 2016 14:16:38 +0000 (23:16 +0900)]
Use journal mode WAL only in R/W normal db

Change-Id: I4e0eb34e73f02b49c52695b81d465ec6ab02024b
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
7 years agoadd security-disable in upgrade script 16/99816/1 accepted/tizen/3.0/common/20161125.101654 accepted/tizen/3.0/ivi/20161125.081212 accepted/tizen/3.0/mobile/20161125.081104 accepted/tizen/3.0/tv/20161125.081134 accepted/tizen/3.0/wearable/20161125.081150 submit/tizen_3.0/20161124.111024
Jiwoong Im [Thu, 24 Nov 2016 07:37:22 +0000 (16:37 +0900)]
add security-disable in upgrade script

Change-Id: Ic677a324eeed5ebc474e0d8805be6ef2fcad7932
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
7 years agomodify 3.0 upgrade script and tool 61/99661/3 accepted/tizen/3.0/common/20161124.181720 accepted/tizen/3.0/ivi/20161124.025756 accepted/tizen/3.0/mobile/20161124.025658 accepted/tizen/3.0/tv/20161124.025726 accepted/tizen/3.0/wearable/20161124.025741 accepted/tizen/common/20161125.095242 accepted/tizen/ivi/20161125.004204 accepted/tizen/mobile/20161125.003647 accepted/tizen/tv/20161125.003922 accepted/tizen/wearable/20161125.004045 submit/tizen/20161124.000829 submit/tizen_3.0/20161123.100537
Jiwoong Im [Wed, 23 Nov 2016 13:02:20 +0000 (22:02 +0900)]
modify 3.0 upgrade script and tool

- remove 2.4 vconf directroy after upgrade
- add a missing memory layer

Change-Id: If6c7c0126983a48aed07fb25c08ff56eef55a312
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
7 years agofix wrong errno return issue 70/99570/1
Jiwoong Im [Wed, 23 Nov 2016 09:12:15 +0000 (18:12 +0900)]
fix wrong errno return issue

Change-Id: Ie8e4b19304a577645f9b3ab3c21d5cbf6f500832
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
7 years agoadd sqlite3 backend 32/95832/6 accepted/tizen/3.0/common/20161122.063740 accepted/tizen/3.0/ivi/20161121.234444 accepted/tizen/3.0/mobile/20161121.234348 accepted/tizen/3.0/tv/20161121.234402 accepted/tizen/3.0/wearable/20161121.234422 submit/tizen_3.0/20161118.014051
Jiwoong Im [Fri, 4 Nov 2016 01:18:56 +0000 (10:18 +0900)]
add sqlite3 backend

- Because gdbm doesn't have restore mechanism, replace backend to sqlite3

Change-Id: Ib0148e5c4932a5c563a081621497ac62bd3aedaa
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
7 years agofix dereference without checking and uninitialized data issue 93/97193/1 accepted/tizen/3.0/common/20161116.143526 accepted/tizen/3.0/ivi/20161116.022245 accepted/tizen/3.0/mobile/20161116.022026 accepted/tizen/3.0/tv/20161116.022129 accepted/tizen/3.0/wearable/20161116.022208 submit/tizen_3.0/20161111.111420 submit/tizen_3.0/20161115.024443
Jiwoong Im [Fri, 11 Nov 2016 10:54:20 +0000 (19:54 +0900)]
fix dereference without checking and uninitialized data issue

Change-Id: Ieafa8553bcd791f621daa9e9f4715c87d96a5250
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
7 years agofix buxton_update_client_label step 84/97184/2
Jiwoong Im [Fri, 11 Nov 2016 10:16:23 +0000 (19:16 +0900)]
fix buxton_update_client_label step

- In update_client_label request, find all clients by pid and update
each client's label.

Change-Id: I4465d3a2df8b7427a4ce305da71e081c8387f77e
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
8 years agoRevert "Revert "share buxton connection in vconf get/set api"" 53/92253/3 accepted/tizen/3.0/common/20161114.082420 accepted/tizen/3.0/ivi/20161103.131750 accepted/tizen/3.0/mobile/20161103.131654 accepted/tizen/3.0/tv/20161103.131712 accepted/tizen/3.0/wearable/20161103.131732 accepted/tizen/common/20161109.140340 accepted/tizen/ivi/20161110.000432 accepted/tizen/mobile/20161110.000326 accepted/tizen/tv/20161110.000356 accepted/tizen/wearable/20161110.000415 submit/tizen/20161101.112858 submit/tizen/20161109.002425 submit/tizen_3.0/20161102.064015 submit/tizen_3.0_common/20161110.084657
Jiwoong Im [Fri, 14 Oct 2016 06:51:09 +0000 (15:51 +0900)]
Revert "Revert "share buxton connection in vconf get/set api""

This reverts commit c84229499da8c0583d9d53f3647e792c98e440ec.

Change-Id: Ib1bb601b255de1bce4e3ce6a1e20d6d0893f8519
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
8 years agoAdd buxton_update_client_label api 51/92251/9
Jiwoong Im [Fri, 14 Oct 2016 06:44:39 +0000 (15:44 +0900)]
Add buxton_update_client_label api

- Because candidate app has "User" label, buxton2d should update buxton
  client label after candidate app changes smack label.
  To solve this, buxton2 provide api to update app's client label.

Change-Id: I57820f6d83197bc8059dd7b1e5d41007a313045f
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
8 years agomodify log level in buxton/vconf api 85/92685/1 accepted/tizen/3.0/ivi/20161028.133952 accepted/tizen/3.0/mobile/20161028.133106 accepted/tizen/3.0/tv/20161028.133412 accepted/tizen/3.0/wearable/20161028.133717 accepted/tizen/common/20161018.175258 accepted/tizen/ivi/20161018.235353 accepted/tizen/mobile/20161018.235331 accepted/tizen/tv/20161018.235343 accepted/tizen/wearable/20161018.235338 submit/tizen/20161018.072833 submit/tizen_3.0/20161028.062323 submit/tizen_3.0/20161028.082423 submit/tizen_3.0_common/20161104.104000
Jiwoong Im [Tue, 18 Oct 2016 06:40:18 +0000 (15:40 +0900)]
modify log level in buxton/vconf api

Change-Id: I53297c268240a0ff5731e832256843260521c6e8
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
8 years agoRevert "share buxton connection in vconf get/set api" 17/92117/1 accepted/tizen/common/20161013.160710 accepted/tizen/ivi/20161013.095002 accepted/tizen/mobile/20161013.094916 accepted/tizen/tv/20161013.094932 accepted/tizen/wearable/20161013.094944 submit/tizen/20161013.092412 submit/tizen/20161013.092521
Jiwoong Im [Thu, 13 Oct 2016 09:21:38 +0000 (18:21 +0900)]
Revert "share buxton connection in vconf get/set api"

This reverts commit d1af0d545b8b65b7f747466e61602e63ebc3a009.

Change-Id: Ibe2a5d33f65d262b6fec9eca5963dcecad2b52f2
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
8 years agoshare buxton connection in vconf get/set api 37/90237/4 accepted/tizen/common/20161010.145807 accepted/tizen/ivi/20161011.233924 accepted/tizen/mobile/20161011.233912 accepted/tizen/tv/20161011.233920 accepted/tizen/wearable/20161011.233918 submit/tizen/20161010.024800
Jiwoong Im [Thu, 29 Sep 2016 06:35:31 +0000 (15:35 +0900)]
share buxton connection in vconf get/set api

Change-Id: Ic8525cfd607b11543c8cb8c5f9d95bfd3da1d7a7
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
8 years agoAdd an exception handling 04/87604/1 accepted/tizen/3.0/ivi/20161011.053529 accepted/tizen/3.0/mobile/20161015.032318 accepted/tizen/3.0/tv/20161016.003451 accepted/tizen/3.0/wearable/20161015.080346 accepted/tizen/common/20160912.180711 accepted/tizen/ivi/20160912.093239 accepted/tizen/mobile/20160912.093152 accepted/tizen/tv/20160912.093205 accepted/tizen/wearable/20160912.093223 submit/tizen/20160911.233959 submit/tizen_3.0_ivi/20161010.000000 submit/tizen_3.0_ivi/20161010.000010 submit/tizen_3.0_mobile/20161015.000000 submit/tizen_3.0_tv/20161015.000000 submit/tizen_3.0_wearable/20161015.000000
Hwankyu Jhun [Fri, 9 Sep 2016 00:15:46 +0000 (09:15 +0900)]
Add an exception handling

Change-Id: Ifd4f889cdb3c214485e5f5f77c5b2c8a2fb8ed03
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
8 years agoRemove destructor function 30/86830/1 accepted/tizen/common/20160905.171445 accepted/tizen/ivi/20160905.235915 accepted/tizen/mobile/20160905.235752 accepted/tizen/tv/20160905.235822 accepted/tizen/wearable/20160905.235848 submit/tizen/20160905.010800
Semun Lee [Mon, 5 Sep 2016 06:26:38 +0000 (15:26 +0900)]
Remove destructor function

Some program may use vconf-buxton api not in main thread.
When main threads exits the destructor may cause crash.

Change-Id: I97df4c234078e305083f5c9514c234ffb6eccc19
Signed-off-by: Semun Lee <sm79.lee@samsung.com>
8 years agoadd missing mutex unlock 24/86424/1
Jiwoong Im [Thu, 1 Sep 2016 06:45:56 +0000 (15:45 +0900)]
add missing mutex unlock

Change-Id: I2eef917e6a342bce33eb32b8c9300610afff98f7
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
8 years agoadd vconf key migration tool (2.4 -> 3.0) 27/85827/3
Jiwoong Im [Mon, 29 Aug 2016 08:06:19 +0000 (17:06 +0900)]
add vconf key migration tool (2.4 -> 3.0)

Change-Id: I1e78d043b712e6667ad981cf80f1ac842ade2140
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
8 years agoextend lock scope of clients_lock & vconf_lock in library 74/85474/2 accepted/tizen/common/20160830.150004 accepted/tizen/ivi/20160830.061237 accepted/tizen/mobile/20160830.061104 accepted/tizen/tv/20160830.061149 accepted/tizen/wearable/20160830.061232 submit/tizen/20160829.073018
Jiwoong Im [Thu, 25 Aug 2016 08:40:28 +0000 (17:40 +0900)]
extend lock scope of clients_lock & vconf_lock in library

Change-Id: Ibdecd0e326e8b4f965f10dc4e08dfa7acd58f27e
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
8 years agoadd platform upgrade script 79/85179/4 accepted/tizen/common/20160824.154832 accepted/tizen/ivi/20160825.050818 accepted/tizen/mobile/20160825.050719 accepted/tizen/tv/20160825.050741 accepted/tizen/wearable/20160825.050756 submit/tizen/20160824.065208
Jiwoong Im [Wed, 24 Aug 2016 05:21:20 +0000 (14:21 +0900)]
add platform upgrade script

Change-Id: If4e92db59b39af2f662d1e6266c86b943c650665
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
8 years agoremove unnecessary error check 35/85135/1
Jiwoong Im [Wed, 24 Aug 2016 02:07:12 +0000 (11:07 +0900)]
remove unnecessary error check

- check only the existence of the key before create key

Change-Id: Ieff93c62f36f0e13fa65e02c84edd9b0f9ede9ac
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
8 years agofix direct_create logic 32/84932/1 accepted/tizen/common/20160823.132743 submit/tizen/20160823.094233
Jiwoong Im [Tue, 23 Aug 2016 01:38:12 +0000 (10:38 +0900)]
fix direct_create logic

- close db and reopen with R/W flag after get key.

Change-Id: I4ea13d4da66af694c1fe906183f95782db74ccc1
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
8 years agomove base db data file path to R/O 63/84763/3 submit/tizen/20160822.123706
Jiwoong Im [Mon, 22 Aug 2016 08:18:11 +0000 (17:18 +0900)]
move base db data file path to R/O

Change-Id: I85ddc7c4ade851ca0e4657c0ae2da528400ecb3c
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
8 years agoextend lock scope of vconf_lock in notify/ignore api 18/83518/1 accepted/tizen/common/20160823.132554 accepted/tizen/ivi/20160824.021604 accepted/tizen/mobile/20160824.021431 accepted/tizen/tv/20160824.021529 accepted/tizen/wearable/20160824.021637 submit/tizen/20160822.060113
Jiwoong Im [Thu, 11 Aug 2016 09:43:21 +0000 (18:43 +0900)]
extend lock scope of vconf_lock in notify/ignore api

- 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>
8 years agoSet SmackProcessLabel to System 82/80882/1 accepted/tizen/common/20160721.175642 accepted/tizen/ivi/20160721.090728 accepted/tizen/mobile/20160721.090447 accepted/tizen/tv/20160721.091305 accepted/tizen/wearable/20160721.090917 submit/tizen/20160721.003054
Yunjin Lee [Wed, 20 Jul 2016 12:07:33 +0000 (21:07 +0900)]
Set SmackProcessLabel to System

Change-Id: I8c0d09558698877148f7cd1658b4b3b0bc9d009a
Signed-off-by: Yunjin Lee <yunjin-.lee@samsung.com>
8 years ago vconf-compat : modify calling noti callback in idler 15/79815/2 accepted/tizen/common/20160714.152559 accepted/tizen/ivi/20160713.125925 accepted/tizen/mobile/20160713.125833 accepted/tizen/tv/20160713.125850 accepted/tizen/wearable/20160713.125906 submit/tizen/20160713.123903
Jiwoong Im [Wed, 13 Jul 2016 05:38:33 +0000 (14:38 +0900)]
 vconf-compat : modify calling noti callback in idler

- 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>
8 years agoreassign PATH env in shell script 12/77012/1 accepted/tizen/common/20160703.130005 accepted/tizen/ivi/20160629.070841 accepted/tizen/mobile/20160629.071004 accepted/tizen/tv/20160629.070734 accepted/tizen/wearable/20160629.070821 submit/tizen/20160629.021322 submit/tizen_common/20160701.180000
Jiwoong Im [Tue, 28 Jun 2016 08:41:55 +0000 (17:41 +0900)]
reassign PATH env in shell script

Change-Id: I1c392d4562de0ed58262ad08fc80ea317cdb5686
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
8 years agovconf-compat : add idler to call noti callback 92/76192/6 accepted/tizen/common/20160703.125833 accepted/tizen/ivi/20160629.015702 accepted/tizen/mobile/20160629.015622 accepted/tizen/tv/20160629.015750 accepted/tizen/wearable/20160629.015552 submit/tizen/20160627.042541
Jiwoong Im [Thu, 23 Jun 2016 06:10:36 +0000 (15:10 +0900)]
vconf-compat : add idler to call noti callback

Change-Id: Idb62ea2a72413d4719ffad8033fe8fd30f027fdd
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
8 years agovconf-compat : add lcov exclude comment for not supported api in tc 78/75678/1 accepted/tizen/common/20160627.191114 accepted/tizen/common/20160629.222152 accepted/tizen/ivi/20160624.064116 accepted/tizen/mobile/20160624.063716 accepted/tizen/tv/20160624.063735 accepted/tizen/wearable/20160624.064001 submit/tizen/20160621.225650 submit/tizen/20160623.110452
Jiwoong Im [Tue, 21 Jun 2016 03:53:07 +0000 (12:53 +0900)]
vconf-compat : add lcov exclude comment for not supported api in tc

Change-Id: Ic840702d21303b072e011e3bfc96bafdf7b4249d
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
8 years agolibrary : fix wrong use of mutex lock 20/74120/2 accepted/tizen/common/20160614.143651 accepted/tizen/ivi/20160614.041205 accepted/tizen/mobile/20160614.041112 accepted/tizen/tv/20160614.041150 accepted/tizen/wearable/20160614.041135 submit/tizen/20160613.023047 submit/tizen/20160613.062107
Jiwoong Im [Mon, 13 Jun 2016 02:11:55 +0000 (11:11 +0900)]
library : fix wrong use of mutex lock

Change-Id: I4968b8a7847d759b1d7bc14b7eb2fa8cace0dc29
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
8 years agodaemon : modify gdbm cache size to reduce memory usage 82/73882/2
Jiwoong Im [Fri, 10 Jun 2016 02:09:42 +0000 (11:09 +0900)]
daemon : modify gdbm cache size to reduce memory usage

Change-Id: I292c3ae041b0dd6df3c6e470c342206a62e92879
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
8 years agodaemon : add buxton group in systemd service file 41/73541/1
Jiwoong Im [Wed, 8 Jun 2016 11:44:01 +0000 (20:44 +0900)]
daemon : add buxton group in systemd service file

Change-Id: Ice6082e4a67e87fbe2d75d24ba374e1e1be1671f
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
8 years agoFix issue related to noti_tbl hash table 55/73155/2 accepted/tizen/common/20160610.175821 accepted/tizen/ivi/20160609.090151 accepted/tizen/mobile/20160609.090122 accepted/tizen/tv/20160609.090225 accepted/tizen/wearable/20160609.090139 submit/tizen/20160608.045259
Semun Lee [Tue, 7 Jun 2016 03:53:23 +0000 (12:53 +0900)]
Fix issue related to noti_tbl hash table

- 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>
8 years agochange smack label of db files in posttrans script 09/72809/4 accepted/tizen/common/20160607.194645 accepted/tizen/ivi/20160607.235244 accepted/tizen/ivi/20160607.235329 accepted/tizen/mobile/20160607.235227 accepted/tizen/mobile/20160607.235301 accepted/tizen/tv/20160607.235239 accepted/tizen/tv/20160607.235320 accepted/tizen/wearable/20160607.235231 accepted/tizen/wearable/20160607.235311 submit/tizen/20160607.081957 submit/tizen/20160607.082137
Jiwoong Im [Thu, 2 Jun 2016 11:36:17 +0000 (20:36 +0900)]
change smack label of db files in posttrans script

Change-Id: Icce3597d5f09b4b45427363d2b8c9d1a422f88ad
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
8 years agolibrary : remove idler function which frees noti callback 64/72564/5
Jiwoong Im [Wed, 1 Jun 2016 12:34:02 +0000 (21:34 +0900)]
library : remove idler function which frees noti callback

- change deleted flag to refcnt in noti_cb structure to manage callback

Change-Id: Ib95d2e8f21522268751d9788061e95859af5b705
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
8 years agolibrary : addd mutex lock for GHashTable 53/69753/10 accepted/tizen/common/20160526.145811 accepted/tizen/ivi/20160523.103112 accepted/tizen/mobile/20160523.103116 accepted/tizen/tv/20160523.103031 accepted/tizen/wearable/20160523.103108 submit/tizen/20160523.082558
Jiwoong Im [Mon, 16 May 2016 12:44:11 +0000 (21:44 +0900)]
library : addd mutex lock for GHashTable

Change-Id: Ibc16e37680250ebac7cc045951d4511889579950
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
8 years agodaemon : increase open fd limit 19/68819/2 accepted/tizen/common/20160511.141831 accepted/tizen/ivi/20160511.080521 accepted/tizen/mobile/20160511.080421 accepted/tizen/tv/20160511.080440 accepted/tizen/wearable/20160511.080457 submit/tizen/20160510.090610
Jiwoong Im [Tue, 10 May 2016 02:58:55 +0000 (11:58 +0900)]
daemon : increase open fd limit

- vconf api changed to make connection in every set/get operation.
  This can cause that the number of open files exceed the maximum number(1024)
  and accept() returns EMFILE in buxton2 daemon.
  To resolve this, increase the maximum number of open file.

Change-Id: I5c2c213551367f84fb4ddc7d31bb6e915e1d8c0e
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
8 years agomodify file mod of vconftool and buxton2ctl 36/68236/1 accepted/tizen/common/20160504.130529 accepted/tizen/ivi/20160504.114948 accepted/tizen/mobile/20160504.114514 accepted/tizen/tv/20160504.114446 accepted/tizen/wearable/20160504.114659 submit/tizen/20160504.022352
Jiwoong Im [Tue, 3 May 2016 06:16:05 +0000 (15:16 +0900)]
modify file mod of vconftool and buxton2ctl

Change-Id: I3f0929523ed5018fe2bb45f9417710575f506271
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
8 years agolibrary : add buxton_open_full api 20/67520/3 accepted/tizen/common/20160428.144215 accepted/tizen/ivi/20160503.010558 accepted/tizen/mobile/20160503.010511 accepted/tizen/tv/20160503.010523 accepted/tizen/wearable/20160503.010541 submit/tizen/20160427.083148 submit/tizen/20160502.025527
Jiwoong Im [Wed, 27 Apr 2016 06:29:06 +0000 (15:29 +0900)]
library : add buxton_open_full api

Change-Id: I878608e041cbcaf7c0d763619d02fda206991d9b
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
8 years agovconf-compat : fix possible atomicity violation 81/67181/1 accepted/tizen/common/20160427.053710 accepted/tizen/ivi/20160426.234048 accepted/tizen/mobile/20160426.233938 accepted/tizen/tv/20160426.234029 accepted/tizen/wearable/20160426.234010 submit/tizen/20160426.022112
Jiwoong Im [Mon, 25 Apr 2016 08:58:55 +0000 (17:58 +0900)]
vconf-compat : fix possible atomicity violation

Change-Id: I50d56d26ffd227c17a55ecd014c2db554d12c959
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
8 years agovconf-compat : fix multi-thread issue 31/65631/14 accepted/tizen/common/20160425.144814 accepted/tizen/ivi/20160423.060635 accepted/tizen/mobile/20160423.055726 accepted/tizen/tv/20160423.060122 accepted/tizen/wearable/20160423.060402 submit/tizen/20160422.142435
Jiwoong Im [Tue, 12 Apr 2016 01:58:11 +0000 (10:58 +0900)]
vconf-compat : fix multi-thread issue

- 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>
8 years agolibrary : fix wrong use of clients mutex lock 11/66611/1 accepted/tizen/common/20160421.161334 accepted/tizen/ivi/20160421.010118 accepted/tizen/mobile/20160421.005957 accepted/tizen/tv/20160421.010052 accepted/tizen/wearable/20160421.010004 submit/tizen/20160420.003955
Jiwoong Im [Wed, 20 Apr 2016 00:33:59 +0000 (09:33 +0900)]
library : fix wrong use of clients mutex lock

Change-Id: I8073f2dc09b3b00f158a570295f8a344c0750ab8
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
8 years agoMerge "backend : call gdbm_sync for data integrity" into tizen accepted/tizen/common/20160419.142837 accepted/tizen/ivi/20160418.235113 accepted/tizen/mobile/20160418.235039 accepted/tizen/tv/20160418.235056 accepted/tizen/wearable/20160418.235053 submit/tizen/20160418.050235
Semun Lee [Mon, 18 Apr 2016 05:01:21 +0000 (22:01 -0700)]
Merge "backend : call gdbm_sync for data integrity" into tizen

8 years agoMerge "library : reduce timeout value in poll using buxton sync call" into tizen
Semun Lee [Mon, 18 Apr 2016 05:01:12 +0000 (22:01 -0700)]
Merge "library : reduce timeout value in poll using buxton sync call" into tizen

8 years agobackend : call gdbm_sync for data integrity 71/66071/2
Jiwoong Im [Fri, 15 Apr 2016 05:09:33 +0000 (14:09 +0900)]
backend : call gdbm_sync for data integrity

Change-Id: Ie3d6ecfc4c2ef2355c115760ea7a93aee542efec
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
8 years agolibrary : reduce timeout value in poll using buxton sync call 58/65958/1
Jiwoong Im [Thu, 14 Apr 2016 07:39:48 +0000 (16:39 +0900)]
library : reduce timeout value in poll using buxton sync call

Change-Id: Ie842289ff12ef96e4b8991017e87c3aed6fb8194
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
8 years agolibrary: add client mutex lock for noti callbacks 59/65059/2
Jiwoong Im [Thu, 7 Apr 2016 05:53:13 +0000 (14:53 +0900)]
library: add client mutex lock for noti callbacks

Change-Id: I6c999b37bb84b7ef78dda8a27d8bdcc0fc9839a3
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
8 years agocommon : fix ENOENT handling in direct_get 68/63568/2 accepted/tizen/common/20160325.135450 accepted/tizen/ivi/20160325.032241 accepted/tizen/mobile/20160325.032144 accepted/tizen/tv/20160325.032156 accepted/tizen/wearable/20160325.032213 submit/tizen/20160324.142129
Jiwoong Im [Thu, 24 Mar 2016 13:16:16 +0000 (22:16 +0900)]
common : fix ENOENT handling in direct_get

Change-Id: I86a06a79f92543a74564a940c1cce525531608c7
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
8 years agomodify to get errno using vconf_notify_key_changed 89/63289/1 accepted/tizen/common/20160324.084237 accepted/tizen/common/20160325.134913 accepted/tizen/ivi/20160324.131645 accepted/tizen/mobile/20160324.132922 accepted/tizen/tv/20160324.132743 accepted/tizen/wearable/20160324.132707 submit/tizen/20160323.065638 submit/tizen/20160323.235918
Jiwoong Im [Wed, 23 Mar 2016 05:28:10 +0000 (14:28 +0900)]
modify to get errno using vconf_notify_key_changed

- 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>
8 years agoUse thread-safe functions 56/62256/8 accepted/tizen/common/20160321.145913 accepted/tizen/ivi/20160321.004613 accepted/tizen/ivi/20160322.023144 accepted/tizen/mobile/20160321.004507 accepted/tizen/tv/20160321.004535 accepted/tizen/wearable/20160321.004554 submit/tizen/20160318.074817 submit/tizen_ivi/20160322.020156
SukHyung, Kang [Tue, 15 Mar 2016 05:44:43 +0000 (14:44 +0900)]
Use thread-safe functions

Change-Id: I4c57beb60bc601072b27b1af869e83c45db54602
Signed-off-by: SukHyung, Kang <shine.kang@samsung.com>
8 years agofix build warning 62/61862/4 accepted/tizen/common/20160315.220629 accepted/tizen/ivi/20160313.114411 accepted/tizen/mobile/20160313.113304 accepted/tizen/tv/20160313.113624 accepted/tizen/wearable/20160313.114027 submit/tizen/20160311.052143
Jiwoong Im [Fri, 11 Mar 2016 04:19:28 +0000 (13:19 +0900)]
fix build warning

- warning: passing argument 1 of 'gdbm_open' discards 'const' qualifier
from pointer target type

Change-Id: Ib9ec7b0e34027ffccd25f9efd5c6244d238bb791
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
8 years agoadd security enable/disable mode 21/60121/5 submit/tizen/20160311.051851
Jiwoong Im [Tue, 23 Feb 2016 12:00:28 +0000 (21:00 +0900)]
add security enable/disable mode

Change-Id: I8ab4bcb7b4d335b1f12759322389fa17be16cb38
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
8 years agovconf-compat : fix bug in setting last_result 26/61126/1 accepted/tizen/common/20160304.203747 accepted/tizen/ivi/20160305.094157 accepted/tizen/mobile/20160305.094102 accepted/tizen/tv/20160305.094120 accepted/tizen/wearable/20160305.094140 submit/tizen/20160304.074224
Jiwoong Im [Fri, 4 Mar 2016 06:24:54 +0000 (15:24 +0900)]
vconf-compat : fix bug in setting last_result

Change-Id: I90cf1c4c2f7aa4d98abdac9be6b3bad74b0ce718
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
8 years agoTurn off buxton-cynara permissive mode 69/60069/2 accepted/tizen/common/20160301.120625 accepted/tizen/ivi/20160225.080410 accepted/tizen/mobile/20160225.080324 accepted/tizen/tv/20160225.080338 accepted/tizen/wearable/20160225.080354 submit/tizen/20160224.044114 submit/tizen_common/20160229.190608
Jiwoong Im [Tue, 23 Feb 2016 06:11:49 +0000 (15:11 +0900)]
Turn off buxton-cynara permissive mode

Change-Id: Ief30b94ad6682258dced7de2f5eb2227d36812f4
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
8 years agodaemon : modify code in getting client socket label 54/58454/6 accepted/tizen/ivi/20160218.023927 accepted/tizen/mobile/20160203.051343 accepted/tizen/tv/20160203.051409 accepted/tizen/wearable/20160203.051438 submit/tizen/20160202.130330 submit/tizen_common/20160218.142243 submit/tizen_ivi/20160217.000000 submit/tizen_ivi/20160217.000003
Jiwoong Im [Mon, 1 Feb 2016 07:28:23 +0000 (16:28 +0900)]
daemon : modify code in getting client socket label

Change-Id: I67117bca6e7c70e625fa6d1d38527d019e59018f
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
8 years agodaemon : log more information in cynara denied message 39/58239/1 accepted/tizen/mobile/20160129.083656 accepted/tizen/tv/20160129.083717 accepted/tizen/wearable/20160129.083738 submit/tizen/20160129.050607
Jiwoong Im [Thu, 28 Jan 2016 12:45:17 +0000 (21:45 +0900)]
daemon : log more information in cynara denied message

Change-Id: Ibb6fa7d2180842612e702be733826a54a9d117cf
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
8 years agodaemon: add user-memory layer 75/57475/7
Jiwoong Im [Wed, 20 Jan 2016 08:36:37 +0000 (17:36 +0900)]
daemon: add user-memory layer

To store per-user and run-time settings, add user-memory layer.
Buxton2 daemon adds handler for user removed signal to manage user memory db.

Change-Id: Iba1b5c0b9f39d50527afea497a6fdabc9d90f200
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
8 years agovconf-compat : sync vconf api with tizen_2.4 75/56875/3
Jiwoong Im [Wed, 13 Jan 2016 07:32:13 +0000 (16:32 +0900)]
vconf-compat : sync vconf api with tizen_2.4

Add missing api and sync vconf.h with tizen_2.4

Change-Id: I10ce8495ba8298603263276ef0135315b89b4bd4
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
8 years agoAdd doc files for APi references 51/56951/1 accepted/tizen/mobile/20160114.063242 accepted/tizen/wearable/20160114.073447 submit/tizen/20160114.013004
SukHyung, Kang [Thu, 14 Jan 2016 00:01:06 +0000 (09:01 +0900)]
Add doc files for APi references

Change-Id: Iaa0754558f6c7dc60d3a5e6ecd45a8fdfd3adc5e
Signed-off-by: SukHyung, Kang <shine.kang@samsung.com>
8 years agocommon: block sig pipe during send call 68/55268/1 accepted/tizen/common/20151229.103118 accepted/tizen/mobile/20151223.051829 accepted/tizen/tv/20151223.051858 accepted/tizen/wearable/20151223.051957 submit/tizen/20151222.225336 submit/tizen_common/20151223.093544
Bartlomiej Grzelewski [Tue, 22 Dec 2015 15:59:05 +0000 (16:59 +0100)]
common: block sig pipe during send call

Change-Id: I05d44ac963cfa85878d83526d7143b5d6e8efe55

8 years agocommon: fix coding style 84/55084/1
Suchang Woo [Mon, 21 Dec 2015 23:06:18 +0000 (08:06 +0900)]
common: fix coding style

Change-Id: If8d54a5f380a62c18db6609200bbcc1373614509
Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
8 years agodaemon: add addrlen initialization 36/54936/1 accepted/tizen/mobile/20151221.052318 accepted/tizen/tv/20151221.052338 accepted/tizen/wearable/20151221.052351 submit/tizen/20151221.015730
Suchang Woo [Mon, 21 Dec 2015 01:55:21 +0000 (10:55 +0900)]
daemon: add addrlen initialization

Change-Id: I7903ac1749d4de7af7a05caf15db515992963303
Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
8 years agocommon: add PIE option for Address space layout randomization 73/53873/1 accepted/tizen/mobile/20151210.082120 accepted/tizen/tv/20151210.082222 accepted/tizen/wearable/20151210.082442 submit/tizen/20151210.044754
Suchang Woo [Thu, 10 Dec 2015 02:47:45 +0000 (11:47 +0900)]
common: add PIE option for Address space layout randomization

Change-Id: Ib7c0684c78143070cae6f12abb79e621b45c962e
Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
9 years agodaemon: log denied message only when an access is denied 78/49978/1 accepted/tizen/mobile/20151022.225914 accepted/tizen/tv/20151022.225924 accepted/tizen/wearable/20151022.225934 submit/tizen/20151022.073531
Suchang Woo [Thu, 22 Oct 2015 02:09:53 +0000 (11:09 +0900)]
daemon: log denied message only when an access is denied

Change-Id: I01856e81e5fb552f509b412632eb9a0fef234459
Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
9 years agocommon: use syslog 72/49672/2
Suchang Woo [Sat, 17 Oct 2015 11:47:57 +0000 (20:47 +0900)]
common: use syslog

Change-Id: I09fed3b93903d614da4cb77e31b8870a4048265a
Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
9 years agocommon: fix 'TAINTED_SCALAR' issue 12/49312/1 accepted/tizen/mobile/20151012.223240 accepted/tizen/tv/20151012.223257 accepted/tizen/wearable/20151012.223308 submit/tizen/20151012.120943 tizen_3.0.m2.a1_mobile_release tizen_3.0.m2.a1_tv_release
Suchang Woo [Mon, 12 Oct 2015 11:52:24 +0000 (20:52 +0900)]
common: fix 'TAINTED_SCALAR' issue

The message length from received packet should be checked.

Change-Id: I27127409080e2a4244c96f6fb2b4d1f641911d11
Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
9 years agolibrary: fix 'RESOURCE_LEAK' issue 81/49281/1
Suchang Woo [Mon, 12 Oct 2015 08:25:02 +0000 (17:25 +0900)]
library: fix 'RESOURCE_LEAK' issue

Change-Id: I42fffdde771aaa5ebe50d3940b5b94c8e65c465b
Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
9 years agocommon: fix 'FORWARD_NULL' issue 80/49280/1
Suchang Woo [Mon, 12 Oct 2015 08:13:02 +0000 (17:13 +0900)]
common: fix 'FORWARD_NULL' issue

If mod is NULL, it makes segfault issue.

Change-Id: Iac10ab796bcf6e3dfcfb29d6f1babeed72d98a14
Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
9 years agocommon: fix 'NO_EFFECT' issue 79/49279/1
Suchang Woo [Mon, 12 Oct 2015 08:06:41 +0000 (17:06 +0900)]
common: fix 'NO_EFFECT' issue

Because 'len' is an unsigned value, "assert(len >= 0)" is always true.

Change-Id: I969c24b70e70e10ce928a88b10705fe94c307dca
Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
9 years agodaemon: fix USE_AFTER_FREE issue 68/49268/2
Suchang Woo [Mon, 12 Oct 2015 07:59:56 +0000 (16:59 +0900)]
daemon: fix USE_AFTER_FREE issue

Change-Id: I0ac80b247c38ced376a0fbf37d132247ef97bd9b
Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
9 years agolibrary: add doxygen comment 07/49207/1
Suchang Woo [Thu, 8 Oct 2015 12:04:33 +0000 (21:04 +0900)]
library: add doxygen comment

Change-Id: Idf93ccaecec6b30cb1f0d2dfd444e6609ea265f2
Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
9 years agoexample: add example code using buxton APIs 42/48442/2
Suchang Woo [Tue, 22 Sep 2015 01:31:01 +0000 (10:31 +0900)]
example: add example code using buxton APIs

Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
Change-Id: I72baca75a616b4b18957af1fd60155d9b9bb7957

9 years agoclient, vconf-compat: remove undefined variable in link libraries 87/48387/1
Suchang Woo [Mon, 21 Sep 2015 05:28:36 +0000 (14:28 +0900)]
client, vconf-compat: remove undefined variable in link libraries

Change-Id: I04a7de59a988a298d232d7b02a5c561d2ff6bf84
Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
9 years agocommon: remove {} in boilerplate notice 86/48386/1
Suchang Woo [Mon, 21 Sep 2015 05:10:09 +0000 (14:10 +0900)]
common: remove {} in boilerplate notice

It looks like copy & paste mistake.

Change-Id: I6a3d8217fdef9e66dc7b5eaf378bc7e7f28bc585
Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
9 years agocommon: change description of 'memory' layer 24/48324/1 accepted/tizen/mobile/20150920.232233 accepted/tizen/tv/20150920.232247 accepted/tizen/wearable/20150920.232304 submit/tizen/20150918.060743 submit/tizen_common/20151015.190624 submit/tizen_common/20151019.135620
Suchang Woo [Fri, 18 Sep 2015 05:50:40 +0000 (14:50 +0900)]
common: change description of 'memory' layer

Change-Id: I69503d0edfa008dd0a9931b72357105ecbcb59a4
Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
9 years agocommon: use systemd-tmpfiles to create /run/buxton2 23/48323/1
Suchang Woo [Fri, 18 Sep 2015 05:49:17 +0000 (14:49 +0900)]
common: use systemd-tmpfiles to create /run/buxton2

Change-Id: I6dc30788be3c00748f1594ff0fb8d8a89e6c860f
Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
9 years agolibrary: add client mutex lock for multi-thread 73/47973/2 tizen_3.0.m1_mobile tizen_3.0.m1_tv accepted/tizen/mobile/20150911.091309 accepted/tizen/tv/20150911.091316 accepted/tizen/wearable/20150911.091325 submit/tizen/20150910.115012 submit/tizen_common/20151023.083358 submit/tizen_common/20151026.085049 tizen_3.0.m1_mobile_release tizen_3.0.m1_tv_release
Suchang Woo [Thu, 10 Sep 2015 11:26:42 +0000 (20:26 +0900)]
library: add client mutex lock for multi-thread

For multi-thread, a mutex lock is added to the client library.
This patch is workaround. Because a function protected by a lock can
be reentered in a callback function. To prevent dead-lock, a mutex
lock should be unlocked when it calls a callback function.

Change-Id: Ic40a6ba0715c5f9bd9f24bc7fd03bc23f1f9519e

9 years agocommon: recv() is called only in mutex locked for multi-thread 86/47486/1 accepted/tizen/mobile/20150904.063916 accepted/tizen/tv/20150904.063928 accepted/tizen/wearable/20150904.063938 submit/tizen/20150904.005341
Suchang Woo [Thu, 3 Sep 2015 14:01:25 +0000 (23:01 +0900)]
common: recv() is called only in mutex locked for multi-thread

Even the single type message should be received in mutex locked state.

Change-Id: I1656e5d4d9229a0589e271de756d86bebd894ac7
Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
9 years agolibrary: insert request info to hash table before sending request 37/47337/1 accepted/tizen/mobile/20150902.235955 accepted/tizen/tv/20150903.000136 accepted/tizen/wearable/20150903.000403 submit/tizen/20150902.103836
Suchang Woo [Wed, 2 Sep 2015 08:02:50 +0000 (17:02 +0900)]
library: insert request info to hash table before sending request

In multi-thread context, a response can be received before inserting
request info to hash table. In that case, the response is dropped
and it makes timeout of the request.
To prevent a response drop and timeout, request info should be inserted
before sending request to Buxton daemon.

Change-Id: I4663f206c62138fc6076d8286922d29bd814a752
Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
9 years agocommon: fix compile warning message 87/46087/1 accepted/tizen/mobile/20150815.071803 accepted/tizen/tv/20150815.072115 accepted/tizen/wearable/20150815.072525 submit/tizen/20150814.112617
Suchang Woo [Fri, 14 Aug 2015 10:29:06 +0000 (19:29 +0900)]
common: fix compile warning message

Change-Id: I562044593e56ef1fb195099f6576a20185efb515
Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
9 years agocommon: set send timeout 86/46086/1
Suchang Woo [Fri, 14 Aug 2015 10:18:56 +0000 (19:18 +0900)]
common: set send timeout

If the receiver is blocked, Buxton daemon also can be blocked.
To prevent blocking, timeout argument in poll() is set.

Change-Id: I42cc6d8ba18cffebdc9eac6bab74bf3f56ecf24f
Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
9 years agocommon: prevent invalid access 30/45730/1
Suchang Woo [Tue, 11 Aug 2015 01:27:54 +0000 (10:27 +0900)]
common: prevent invalid access

Change-Id: I22a80a4a7afa628e7ca73f28206230b307c8c5ea
Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
9 years agodaemon: fix copy & paste mistake 29/45729/1
Suchang Woo [Tue, 11 Aug 2015 01:27:34 +0000 (10:27 +0900)]
daemon: fix copy & paste mistake

Change-Id: Ie70805565a04cdca4914d6a8b3be9e52dc4f8254
Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
9 years agolibrary: remove request in hash table on timeout 18/45718/1 accepted/tizen/mobile/20150811.014122 accepted/tizen/tv/20150811.014134 accepted/tizen/wearable/20150811.014154 submit/tizen/20150810.141928
Suchang Woo [Mon, 10 Aug 2015 13:24:04 +0000 (22:24 +0900)]
library: remove request in hash table on timeout

Change-Id: I91732c69bc7dec2d26c7fc488a2642e073ad3763
Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
9 years agocommon: enable assert() and leave more detail error log 81/45581/1 accepted/tizen/mobile/20150808.024903 accepted/tizen/tv/20150808.025805 accepted/tizen/wearable/20150808.030158 submit/tizen/20150807.122633
Suchang Woo [Fri, 7 Aug 2015 11:13:09 +0000 (20:13 +0900)]
common: enable assert() and leave more detail error log

Change-Id: I3c2b7ffd056e42b3adc4937aface46af51056ccd
Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
9 years agodaemon: fix infinite loop caused by SIGPIPE 22/44922/1 accepted/tizen/mobile/20150730.014245 accepted/tizen/tv/20150730.014358 accepted/tizen/wearable/20150730.014603 submit/tizen/20150729.114639
Suchang Woo [Wed, 29 Jul 2015 11:21:06 +0000 (20:21 +0900)]
daemon: fix infinite loop caused by SIGPIPE

If bxt_err() makes SIGPIPE, Buxton daemon falls into infinite loop
because bxt_err() is also used in signalfd callback when SIGPIPE is
received.
bxt_err() can makes SIGPIPE if Buxton daemon is launched by systemd
and stderr is redirected to systemd-journal socket.

Change-Id: I112079fdf3c3548f7b0667b595cbd79e985c4d64
Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
9 years agolibrary: destroy hash table after client socket has been closed 61/44861/1 accepted/tizen/mobile/20150729.105248 accepted/tizen/tv/20150729.105411 accepted/tizen/wearable/20150729.111559 submit/tizen/20150729.023839
Suchang Woo [Tue, 28 Jul 2015 12:49:53 +0000 (21:49 +0900)]
library: destroy hash table after client socket has been closed

If the socket is not closed, even during free_client() a receive
callback(recv_cb()) can be invoked by receiving data from socket.
If recv_cb() is invoked after destroying the hash table, the destroyed
hash table is accessed and segfault is occured.
To prevent the segfault, the hash table should be destroyed after
the socket has been closed.

Change-Id: Ifa59608350a281fc8988042482bdd025b8cc6d59
Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
9 years agocommon: add message header to enhance exception handling 60/44860/1
Suchang Woo [Mon, 27 Jul 2015 11:43:25 +0000 (20:43 +0900)]
common: add message header to enhance exception handling

In the previous implementation, fragmented message had no header. If
a message was sent by thread during sending fragmented messages, a
receiver cannot distinguish a single message from fragmented messages.
Adding header to every message, a receiver can distinguish
messages.

Change-Id: I14d0f8ff6b0c0f9d3cf55ac9046da1d1ad8b654c
Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
9 years agoUnset transmutable in /var/lib/buxton2 87/44487/1 accepted/tizen/mobile/20150723.050617 accepted/tizen/tv/20150723.050738 accepted/tizen/wearable/20150723.050807 submit/tizen/20150723.004510
Suchang Woo [Wed, 22 Jul 2015 12:20:02 +0000 (21:20 +0900)]
Unset transmutable in /var/lib/buxton2

Change-Id: I85db289998af0a9013aa714591e46eaab2f0ced5
Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
9 years agolibrary: fix library name in buxton2.pc 86/44486/1
Suchang Woo [Wed, 22 Jul 2015 12:19:01 +0000 (21:19 +0900)]
library: fix library name in buxton2.pc

Change-Id: I3461caf8eb255c77424671c36920fa3ec24d1d4e
Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
9 years agodaemon: stop calling accept() when accept returns EMFILE 85/44485/1
Suchang Woo [Wed, 22 Jul 2015 11:48:33 +0000 (20:48 +0900)]
daemon: stop calling accept() when accept returns EMFILE

When the number of open files exceed the maximum number(usually, 1024),
accept() returns EMFILE (Too many open files). and, it is continued
until the number of open files go below the maximum value.

So, stop calling accept() on EMFILE. and, resume it when a client is
closed.

Change-Id: Ie8f3bfce3506e4ab56e3e8d37bbd573ddfd4685c
Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
9 years agolibrary: add mutex lock for multi-thread 00/44200/1 accepted/tizen/mobile/20150719.234501 accepted/tizen/tv/20150719.234508 accepted/tizen/wearable/20150719.234518 submit/tizen/20150718.100000
Suchang Woo [Sat, 18 Jul 2015 09:57:19 +0000 (18:57 +0900)]
library: add mutex lock for multi-thread

Change-Id: If1c10261f8e4645b8d9cc14283d24dabd6280445
Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
9 years agovconf-compat: fix keynode unknown type 86/44186/1 accepted/tizen/mobile/20150718.081949 accepted/tizen/tv/20150718.082210 accepted/tizen/wearable/20150718.082453 submit/tizen/20150717.121043
Suchang Woo [Fri, 17 Jul 2015 13:04:01 +0000 (22:04 +0900)]
vconf-compat: fix keynode unknown type

In vconf_keylist_add_str() keynode's type is not set.
Setting the type of keynode is added.

Change-Id: I8072749ae7f4225efadbc894b0799585937142f7
Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
9 years agocommon: fix segfault issue 83/44183/1
Suchang Woo [Fri, 17 Jul 2015 12:02:40 +0000 (21:02 +0900)]
common: fix segfault issue

When vconf APIs is invoked in callback function, client's receive buffer
which is already full is used again. This makes an abnormal state.
Before invoking callback function, full buffer should be removed from
receive buffer list.

Change-Id: Ie47cca364dfc03fde14aad3e7d156b394cf0a675
Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
9 years agovconf-compat: add brief comments of keylist APIs 69/44169/1
Suchang Woo [Fri, 17 Jul 2015 10:04:17 +0000 (19:04 +0900)]
vconf-compat: add brief comments of keylist APIs

Change-Id: I031d5dccd9c1ceef3fa966bda929f347ccd65545
Signed-off-by: Suchang Woo <suchang.woo@samsung.com>