+oma-dm-agent (0.1.66) unstable; urgency=low
+
+ * [SR:oma-dm-agent_0.1.66] SR Release
+ * Vconf key added
+ * FOTA update result popup (item 6EA)
+ * Update FOTA result file path
+ * FMM get my location patch
+ * 959 error patch for FOTA
+ * Git: framework/system/oma-dm-agent
+ * Tag: oma-dm-agent_0.1.66
+
+ -- Junhyung Park <jruss.park@samsung.com> Fri, 12 Apr 2013 14:30:00 +0900
+
+oma-dm-agent (0.1.65) unstable; urgency=low
+
+ * [SR:oma-dm-agent_0.1.65] SR Release
+ * FMM get my location feature added
+ * DoCheckingRooting for FOTA
+ * Git: framework/system/oma-dm-agent
+ * Tag: oma-dm-agent_0.1.65
+
+ -- Junhyung Park <jruss.park@samsung.com> Fri, 5 Apr 2013 22:30:00 +0900
+
+oma-dm-agent (0.1.64) unstable; urgency=low
+
+ * [SR:oma-dm-agent_0.1.64] SR Release
+ * Prevent 26656, 26706 patch.
+ * WiFi only about big delta size, GCF setting patch.
+ * network status checking patch.
+ * IF big delta. WiFi-only download - build feature.
+ * FMM Track my mobile feature added.
+ * Git: framework/system/oma-dm-agent
+ * Tag: oma-dm-agent_0.1.64
+
+ -- Juhaki Park <juhaki.park@samsung.com> Thu, 4 Apr 2013 20:21:00 +0900
+
+oma-dm-agent (0.1.63) unstable; urgency=low
+
+ * [SR:oma-dm-agent_0.1.63] SR Release
+ * DM_GENERIC_ALERT for polling & user_init patch, adding delta.tar decompress for FOTA UA.
+ * Not enough save space for delta. ( adding popup )
+ * Git: framework/system/oma-dm-agent
+ * Tag: oma-dm-agent_0.1.63
+
+ -- Juhaki Park <juhaki.park@samsung.com> Fri, 29 Mar 2013 17:50:00 +0900
+
+oma-dm-agent (0.1.62) unstable; urgency=low
+
+ * [SR:oma-dm-agent_0.1.62] SR Release
+ * FOTA Push app_id , app_sec_id , FOTA SPP_APP_ID patch.
+ * /opt/data/fota -> /opt/usr/data/fota patch.
+ * Git: framework/system/oma-dm-agent
+ * Tag: oma-dm-agent_0.1.62
+
+ -- Juhaki Park <juhaki.park@samsung.com> Wed, 20 Mar 2013 19:42:00 +0900
+
+oma-dm-agent (0.1.61) unstable; urgency=low
+
+ * [SR:oma-dm-agent_0.1.61] SR Release
+ * FMM SPP APP ID applied
+ * Remove samsung-sso api
+ * Fix prevent issues (1EA)
+ * Git: framework/system/oma-dm-agent
+ * Tag: oma-dm-agent_0.1.61
+
+ -- Junhyung Park <jruss.park@samsung.com> Thu, 14 Mar 2013 16:30:00 +0900
+
+oma-dm-agent (0.1.60) unstable; urgency=low
+
+ * [SR:oma-dm-agent_0.1.60] SR Release
+ * Prevent defect fixed.
+ * Ring my mobile patch
+ * FOTA APP_ID, APP_SEC_ID, SPP_APP_ID applied -> rollback. ( FOTA server side is not ready )
+ * Git: framework/system/oma-dm-agent
+ * Tag: oma-dm-agent_0.1.60
+
+ -- Juhaki Park <juhaki.park@samsung.com> Thu, 7 Mar 2013 21:47:00 +0900
+
+oma-dm-agent (0.1.59) unstable; urgency=low
+
+ * [SR:oma-dm-agent_0.1.59] SR Release
+ * FMM Track my mobile feature added
+ * FOTA polling feature added
+ * Remove libwbxml
+ * Git: framework/system/oma-dm-agent
+ * Tag: oma-dm-agent_0.1.59
+
+ -- Junhyung Park <jruss.park@samsung.com> Thu, 28 Feb 2013 17:30:00 +0900
+
+oma-dm-agent (0.1.58) unstable; urgency=low
+
+ * [SR:oma-dm-agent_0.1.58] SR Release
+ * polling version.xml parsing patch.
+ * Git: framework/system/oma-dm-agent
+ * Tag: oma-dm-agent_0.1.58
+
+ -- Juhaki Park <juhaki.park@samsung.com> Thu, 21 Feb 2013 17:05:00 +0900
+
+oma-dm-agent (0.1.57) unstable; urgency=low
+
+ * [SR:oma-dm-agent_0.1.57] SR Release
+ * FOTA Delta download patch
+ * FMM Call logs feature added
+ * Fix prevent issues
+ * Git: framework/system/oma-dm-agent
+ * Tag: oma-dm-agent_0.1.57
+
+ -- Junhyung Park <jruss.park@samsung.com> Thu, 7 Feb 2013 20:30:00 +0900
+
+oma-dm-agent (0.1.56) unstable; urgency=low
+
+ * [SR:oma-dm-agent_0.1.56] SR Release
+ * FMM factory reset feature added
+ * Smack rule applied
+ * Git: framework/system/oma-dm-agent
+ * Tag: oma-dm-agent_0.1.56
+
+ -- Junhyung Park <jruss.park@samsung.com> Tue, 5 Feb 2013 20:30:00 +0900
+
+oma-dm-agent (0.1.55) unstable; urgency=low
+
+ * 1. DB file creation is moved from post to install.
+ * 2. FMM wipe out my mobile.
+ * 3. Apply smack label to booting script.
+ * Git: framework/system/oma-dm-agent
+ * Tag: oma-dm-agent_0.1.55
+
+ -- Juhaki Park <juhaki.park@samsung.com> Thu, 31 Jan 2013 19:18:00 +0900
+
+oma-dm-agent (0.1.54) unstable; urgency=low
+
+ * 1. OMA DM disclaimer.
+ * 2. FMM ring my mobile. - appsvc -> aul_launch
+ * 3. OMA DM delta download patch. - sa_fw_downloader.c
+ * 4. prevent defect patch.
+ * 5. remove sync_agent_get_event_data_param.
+ * 6. FMM Lock patch. - appsvc -> aul_launch
+ * 7. large delta download patch. - prevent rollback.
+ * Git: framework/system/oma-dm-agent
+ * Tag: oma-dm-agent_0.1.54
+
+ -- Juhaki Park <juhaki.park@samsung.com> Fri, 25 Jan 2013 15:28:00 +0900
+
+oma-dm-agent (0.1.53) unstable; urgency=low
+
+ * 1. model info, multi language patch.
+ * 2. prevent defect patch.
+ * Git: framework/system/oma-dm-agent
+ * Tag: oma-dm-agent_0.1.53
+
+ -- Juhaki Park <juhaki.park@samsung.com> Thu, 10 Jan 2013 17:48:00 +0900
+
+oma-dm-agent (0.1.52) unstable; urgency=low
+
+ * 1. sync_agent_deinit() implemented.
+ * 2. vconf value setting patch.
+ * 3. dlog log format unified.
+ * 4. copyright - include directory.
+ * 5. copyright - src directory.
+ * 6. source patch for rsa refactoring.
+ * 7. indent : oma-dm-agent.
+ * 8. dm bootstrap install fail patch.
+ * 9. oma-dm-agent prevent patch.
+ * Git: framework/system/oma-dm-agent
+ * Tag: oma-dm-agent_0.1.52
+
+ -- Juhaki Park <juhaki.park@samsung.com> Thu, 27 Dec 2012 20:00:00 +0900
+
+oma-dm-agent (0.1.51) unstable; urgency=low
+
+ * 1. ipc refactoring - ipc refactoring branch merge to master
+ * 2. Fix prevent issue
+ * 3. License info update
+ * 4. Add gcf plugin
+ * Git: framework/system/oma-dm-agent
+ * Tag: oma-dm-agent_0.1.51
+
+ -- Junhyung Park <jruss.park@samsung.com> Sat, 20 Dec 2012 22:00:00 +0900
+
+oma-dm-agent (0.1.50) unstable; urgency=low
+
+ * 1. ipc refactoring - api name patch for build.
+ * Git: framework/system/oma-dm-agent
+ * Tag: oma-dm-agent_0.1.50
+
+ -- Juhaki Park <juhaki.park@samsung.com> Sat, 08 Dec 2012 11:03:00 +0900
+
+oma-dm-agent (0.1.49) unstable; urgency=low
+
+ * 1. ipc refactoring - api name patch.
+ * Git: framework/system/oma-dm-agent
+ * Tag: oma-dm-agent_0.1.49
+
+ -- Juhaki Park <juhaki.park@samsung.com> Thu, 06 Dec 2012 17:00:00 +0900
+
+oma-dm-agent (0.1.48) unstable; urgency=low
+
+ * 1. ipc refactoring - api name patch.
+ * Git: framework/system/oma-dm-agent
+ * Tag: oma-dm-agent_0.1.48
+
+ -- Juhaki Park <juhaki.park@samsung.com> Thu, 06 Dec 2012 16:50:00 +0900
+
+oma-dm-agent (0.1.47) unstable; urgency=low
+
+ * 1. dmacc password generation.
+ * 2. fota download flow.
+ * 3. oma dm api set.
+ * Git: framework/system/oma-dm-agent
+ * Tag: oma-dm-agent_0.1.47
+
+ -- Junhyung Park <jruss.park@samsung.com> Thu, 03 Dec 2012 15:19:00 +0900
+
+oma-dm-agent (0.1.46) unstable; urgency=low
+
+ * 1. _system_command patch.
+ * 2. prevent defect fix.
+ * 3. uic single/multiple choice patch.
+ * Git: framework/system/oma-dm-agent
+ * Tag: oma-dm-agent_0.1.46
+
+ -- Juhaki Park <juhaki.park@samsung.com> Thu, 29 Nov 2012 21:27:04 +0900
+
+oma-dm-agent (0.1.45) unstable; urgency=low
+
+ * 1. capi-messaging-push removed.
+ * 2. GCF bug fix
+ * 3. add smack option
+ * 4. prevent defect fixed.
+ * Git: framework/system/oma-dm-agent
+ * Tag: oma-dm-agent_0.1.45
+
+ -- Juhaki Park <juhaki.park@samsung.com> Thu, 22 Nov 2012 20:07:04 +0900
+
+oma-dm-agent (0.1.44) unstable; urgency=low
+
+ * 1. GCF
+ * 2. ACL
+ * 3. Prevent dbus auto activation.
+ * Git: framework/system/oma-dm-agent
+ * Tag: oma-dm-agent_0.1.44
+
+ -- Juhaki Park <juhaki.park@samsung.com> Thu, 08 Nov 2012 20:20:04 +0900
+
+oma-dm-agent (0.1.43) unstable; urgency=low
+
+ * 1. gcf patch 1302, 1307
+ * 2. prevent defect fix.
+ * Git: framework/system/oma-dm-agent
+ * Tag: oma-dm-agent_0.1.43
+
+ -- Juhaki Park <juhaki.park@samsung.com> Thu, 01 Nov 2012 17:47:04 +0900
+
+oma-dm-agent (0.1.42) unstable; urgency=low
+
+ * 1. gcf patch. 0701, 0501, 0502, 0503, 0601, 0901, 1307, 1308, 1401, 1501
+ * 2. default symbol visibility to hidden.
+ * Git: framework/system/oma-dm-agent
+ * Tag: oma-dm-agent_0.1.42
+
+ -- Juhaki Park <juhaki.park@samsung.com> Thu, 25 Oct 2012 19:27:04 +0900
+
+oma-dm-agent (0.1.41) unstable; urgency=low
+
+ * 1. Replace include sync-agent.h
+ * 2. Remove warning
+ * 3. Logging macro
+ * 4. User initiated for GCF
+ * 5. UIC patch for GCF
+ * 6. get mo runtime property for GCF
+ * 7. control mo runtime property
+ * Git: framework/system/oma-dm-agent
+ * Tag: oma-dm-agent_0.1.41
+
+ -- Juhaki Park <juhaki.park@samsung.com> Fri, 12 Oct 2012 16:16:04 +0900
+
+oma-dm-agent (0.1.40) unstable; urgency=low
+
+ * 1. Bug fix in manifest file
+ * Git: framework/system/oma-dm-agent
+ * Tag: oma-dm-agent_0.1.40
+
+ -- Juhaki Park <juhaki.park@samsung.com> Thu, 27 Sep 2012 16:33:04 +0900
+
+oma-dm-agent (0.1.39) unstable; urgency=low
+
+ * 1. Bug fix in manifest file
+ * Git: framework/system/oma-dm-agent
+ * Tag: oma-dm-agent_0.1.39
+
+ -- WooJin Yun <suhoangel9@samsung.com> Tue, 25 Sep 2012 13:33:04 +0900
+
+oma-dm-agent (0.1.38) unstable; urgency=low
+
+ * 1. Remove daemon start in post
+ * Git: framework/system/oma-dm-agent
+ * Tag: oma-dm-agent_0.1.38
+
+ -- WooJin Yun <suhoangel9@samsung.com> Mon, 24 Sep 2012 11:20:53 +0900
+
+oma-dm-agent (0.1.37) unstable; urgency=low
+
+ * 1. SMACK applied
+ * 2. preun , postun patch about spec file
+ * Git: framework/system/oma-dm-agent
+ * Tag: oma-dm-agent_0.1.37
+
+ -- Juhaki Park <juhaki.park@samsung.com> Fri, 21 Sep 2012 11:00:17 +0900
+
+oma-dm-agent (0.1.36) unstable; urgency=low
+
+ * 1. Modify check ui alert mode
+ * 2. Modify check roaming call state
+ * 3. Increase ext id in cp
+ * 4. Change network callback regarding management, generic alert circulation
+ * 5. Code clean-up
+ * 6. Execute install / Remind interval execute install
+ * 7. Delete duplicate free_session
+ * Git: framework/system/oma-dm-agent
+ * Tag: oma-dm-agent_0.1.36
+
+ -- WooJin Yun <suhoangel9@samsung.com> Thu, 13 Sep 2012 16:55:17 +0900
+
+oma-dm-agent (0.1.35) unstable; urgency=low
+
+ * 1. Apply changes due to package name change : sync-agent-framework -> sync-agent
+ * 2. g_main_loop_run( ) placed in main thread
+ * 3. Plugins moved to agent daemon
+ * 4. Add pkgname in oma-dm-agent.spec
+ * Git: framework/system/oma-dm-agent
+ * Tag: oma-dm-agent_0.1.35
+
+ -- WooJin Yun <suhoangel9@samsung.com> Thu, 06 Sep 2012 21:14:41 +0900
+
+oma-dm-agent (0.1.34) unstable; urgency=low
+
+ * 1. Fix dm-agent issue
+ * - Change wrong name
+ * - Remove ipc sync response type
+ * - Big size noti, memory full noti, wifi only fail noti
+ * - Roaming, call state
+ * - Remove alarm column in db
+ * 2. Apply Tizen Managed API changes
+ * 3. Remove warning
+ * 4. Check mo acl
+ - Check acl server command
+ - Bug fix xmlinitparser, xmlcleanupparser
+ * 5. Change include expression
+ * 6. Modify sync-agent struct, enum and define api name
+ * Git: framework/system/oma-dm-agent
+ * Tag: oma-dm-agent_0.1.34
+
+ -- WooJin Yun <suhoangel9@samsung.com> Fri, 31 Aug 2012 12:27:34 +0900
+
+oma-dm-agent (0.1.33) unstable; urgency=low
+
+ * 1. Remove module name from external header file name
+ * 2. package name is changed (oma-dm-service -> oma-dm-agent)
+ * 3. Change NULL check expression
+ * 4. Change plugin lib folder path
+ * Git: framework/system/oma-dm-agent
+ * Tag: oma-dm-agent_0.1.33
+
+ -- WooJin Yun <suhoangel9@samsung.com> Thu, 23 Aug 2012 14:19:25 +0900
+
+oma-dm-agent (0.1.32) unstable; urgency=low
+
+ * 1. External header renaming
+ * 2. plugin separation : framework module generic
+ * 3. remove include/agent-framework
+ * 4. Fix libxml2 API multi-thread issue
+ * Git: framework/system/oma-dm-agent
+ * Tag: oma-dm-agent_0.1.32
+
+ -- WooJin Yun <suhoangel9@samsung.com> Fri, 17 Aug 2012 11:26:08 +0900
+
+oma-dm-service (0.1.31) unstable; urgency=low
+
+ * Directory restructuring applied
+ * Git: slp/pkgs/o/oma-dm-service
+ * Tag: oma-dm-service_0.1.31
+
+ -- WooJin Yun <suhoangel9@samsung.com> Tue, 07 Aug 2012 20:40:55 +0900
+
+oma-dm-service (0.1.30) unstable; urgency=low
+
+ * local test done. pkg upload. doxygen , maintainer , system function
+ * Git: slp/pkgs/o/oma-dm-service
+ * Tag: oma-dm-service_0.1.30
+
+ -- Juhaki Park <juhaki.park@samsung.com> Wed, 18 Jul 2012 18:28:56 +0900
+
+oma-dm-service (0.1.29) unstable; urgency=low
+
+ * pkg upload.
+ * Git: slp/pkgs/o/oma-dm-service
+ * Tag: oma-dm-service_0.1.29
+
+ -- Juhaki Park <juhaki.park@samsung.com> Tue, 10 Jul 2012 10:28:56 +0900
+
+oma-dm-service (0.1.28) unstable; urgency=low
+
+ * filename update, secure coding, user initiate, changelog & spec file update.
+ * Git: slp/pkgs/o/oma-dm-service
+ * Tag: oma-dm-service_0.1.28
+
+ -- Juhaki Park <juhaki.park@samsung.com> Wed, 04 Jul 2012 15:48:56 +0900
+
+oma-dm-service (0.1.27) unstable; urgency=low
+
+ * sh file permission update, dm bootstrap.
+ * Git: slp/pkgs/o/oma-dm-service
+ * Tag: oma-dm-service_0.1.27
+
+ -- Juhaki Park <juhaki.park@samsung.com> Wed, 27 Jun 2012 17:48:56 +0900
+
+oma-dm-service (0.1.26) unstable; urgency=low
+
+ * fota ux1.2 - 10page remind interval update.
+ * Git: slp/pkgs/o/oma-dm-service
+ * Tag: oma-dm-service_0.1.26
+
+ -- Juhaki Park <juhaki.park@samsung.com> Tue, 26 Jun 2012 13:48:56 +0900
+
+oma-dm-service (0.1.25) unstable; urgency=low
+
+ * fota download bug fix & spec , changelog update.
+ * Git: slp/pkgs/o/oma-dm-service
+ * Tag: oma-dm-service_0.1.25
+
+ -- Juhaki Park <juhaki.park@samsung.com> Mon, 25 Jun 2012 14:48:56 +0900
+
+oma-dm-service (0.1.24) unstable; urgency=low
+
+ * fota directory changing.
+ * Git: slp/pkgs/o/oma-dm-service
+ * Tag: oma-dm-service_0.1.24
+
+ -- Juhaki Park <juhaki.park@samsung.com> Fri, 15 Jun 2012 15:28:56 +0900
+
+oma-dm-service (0.1.20) unstable; urgency=low
+
+ * pkg upload
+ * Git: slp/pkgs/o/oma-dm-service
+ * Tag: oma-dm-service_0.1.20
+
+ -- Sunbong Ha <sunbong.ha@samsung.com> Tue, 12 Jun 2012 17:28:56 +0900
+
+oma-dm-service (0.1.19) unstable; urgency=low
+
+ * vconf-key update - pkg upload
+ * Git: slp/pkgs/o/oma-dm-service
+ * Tag: oma-dm-service_0.1.19
+
+ -- Juhaki Park <juhaki.park@samsung.com> Thu, 24 May 2012 19:35:33 +0900
+
+oma-dm-service (0.1.18) unstable; urgency=low
+
+ * pkg upload
+ * Git: slp/pkgs/o/oma-dm-service
+ * Tag: oma-dm-service_0.1.18
+
+ -- Juhaki Park <juhaki.park@samsung.com> Mon, 21 May 2012 17:55:33 +0900
+
+oma-dm-service (0.1.17) unstable; urgency=low
+
+ * 1. bug fixed admin set reset db_open
+ * 2. implement uic module
+ * Git: slp/pkgs/o/oma-dm-service
+ * Tag: oma-dm-service_0.1.17
+
+ -- Junhyuk Lee <junhyuk7.lee@samsung.com> Wed, 09 May 2012 13:35:33 +0900
+
+oma-dm-service (0.1.16) unstable; urgency=low
+
+ * 1. bug fixed hmac , replace acl property
+ * 2. bug fixed get acl property
+ * Git: slp/pkgs/o/oma-dm-service
+ * Tag: oma-dm-service_0.1.16
+
+ -- Junhyuk Lee <junhyuk7.lee@samsung.com> Thu, 26 Apr 2012 15:56:27 +0900
+
+oma-dm-service (0.1.15) unstable; urgency=low
+
+ * bug fixed oma dm admin ui
+ * Git: slp/pkgs/o/oma-dm-service
+ * Tag: oma-dm-service_0.1.15
+
+ -- Junhyuk Lee <junhyuk7.lee@samsung.com> Tue, 17 Apr 2012 20:54:34 +0900
+
+oma-dm-service (0.1.14) unstable; urgency=low
+
+ * pkg upload for sync-agent-framework upload
+ * Git: slp/pkgs/o/oma-dm-service
+ * Tag: oma-dm-service_0.1.14
+
+ -- Junhyuk Lee <junhyuk7.lee@samsung.com> Mon, 09 Apr 2012 14:55:56 +0900
+
+oma-dm-service (0.1.13) unstable; urgency=low
+
+ * pkg upload
+ * Git: slp/pkgs/o/oma-dm-service
+ * Tag: oma-dm-service_0.1.13
+
+ -- Joohark Park <juhaki.park@samsung.com> Tue, 03 Apr 2012 14:18:47 +0900
+
+oma-dm-service (0.1.12) unstable; urgency=low
+
+ * pkg upload
+ * Git: slp/pkgs/o/oma-dm-service
+ * Tag: oma-dm-service_0.1.12
+
+ -- Juhak Park <juhaki.park@samsung.com> Tue, 03 Apr 2012 12:18:47 +0900
+
+oma-dm-service (0.1.11) unstable; urgency=low
+
+ * pkg upload for sync-agent-framework
+ * Git: slp/pkgs/o/oma-dm-service
+ * Tag: oma-dm-service_0.1.11
+
+ -- Junhyuk Lee <junhyuk7.lee@samsung.com> Thu, 29 Mar 2012 13:25:47 +0900
+
+oma-dm-service (0.1.10) unstable; urgency=low
+
+ * add alarm & fota register
+ * Git: slp/pkgs/o/oma-dm-service
+ * Tag: oma-dm-service_0.1.10
+
+ -- Junhyuk Lee <junhyuk7.lee@samsung.com> Thu, 22 Mar 2012 19:49:20 +0900
+
+oma-dm-service (0.1.9) unstable; urgency=low
+
+ * bug fixed & pkg upload
+ * Git: slp/pkgs/o/oma-dm-service
+ * Tag: oma-dm-service_0.1.9
+
+ -- Junhyuk Lee <junhyuk7.lee@samsung.com> Wed, 21 Mar 2012 16:33:11 +0900
+
+oma-dm-service (0.1.8) unstable; urgency=low
+
+ * pkg upload for sync-agent-fw pkg upload
+ * Git: slp/pkgs/o/oma-dm-service
+ * Tag: oma-dm-service_0.1.8
+
+ -- Junhyuk Lee <junhyuk7.lee@samsung.com> Thu, 15 Mar 2012 17:07:40 +0900
+
+oma-dm-service (0.1.7) unstable; urgency=low
+
+ * crash fixed
+ * Git: slp/apps/o/oma-dm-service
+ * Tag: oma-dm-service_0.1.7
+
+ -- leejunhyuk <junhyuk7.lee@samsung.com> Fri, 09 Mar 2012 17:51:21 +0900
+
+oma-dm-service (0.1.6) unstable; urgency=low
+
+ * spp module bug fixed & pkg upload
+ * Git: slp/apps/o/oma-dm-service
+ * Tag: oma-dm-service_0.1.6
+
+ -- Junhyuk Lee <junhyuk7.lee@samsung.com> Thu, 08 Mar 2012 11:29:39 +0900
+
oma-dm-agent (0.1.5) unstable; urgency=low
* [SR : oma-dm-agent_0.1.5] SR Release
--- /dev/null
+#!/bin/sh
+
+#sdb -d shell rm /root/app/*.rpm
+
+rm -rf /home/juhaki/gbs-build-pkg/*.rpm
+
+gbs -d -v build -A armv7l --include-all
+
+cp -rf /home/juhaki/GBS-ROOT/local/scratch.armv7l.0/.build.packages/RPMS/armv7l/*.rpm /home/juhaki/gbs-build-pkg/
+
+#sdb -d push /home/juhaki/gbs-build-pkg /root/app/
+
+#sdb -d shell change-booting-mode.sh --update
+
+#sdb -d shell rpm -Uvh --force --nodeps /root/*.rpm
+
+
void delete_account_registration_alarm(char *alarm_str, CONFIG_TYPE alarm_type);
/**
+ *@par Description: API to set fota polling registration alarm
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par par Method of function operation:
+ * @par Important notes:
+ * @param[in] polling period (period day)
+ * @param[in] polling start hour (0~23)
+ * @param[in] polling range hour (1~24)
+ * @param[in] alarm type string(fumo, fmm)
+ * @param[in] alarm type(fumo, fmm)
+ *
+ * @return DM_OK on success
+ * DM_ERROR on error
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+DM_ERROR set_polling_registration_alarm(int poll_period, int poll_time, int poll_range, char *alarm_str, CONFIG_TYPE alarm_type);
+
+/**
+ * @par Description: API to delete fota polling registration alarm
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par par Method of function operation:
+ * @par Important notes:
+ * @param[in] alarm type string
+ * @param[in] alarm type
+ *
+ * @return
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+void delete_polling_registration_alarm(char *alarm_str, CONFIG_TYPE alarm_type);
+
+/**
+ * @par Description: API to set alarm schedule
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par par Method of function operation:
+ * @par Important notes:
+ * @param[in] polling period (period day)
+ * @param[in] polling start hour (0~23)
+ * @param[in] polling range hour (1~24)
+ * @param[in] alarm type
+ * @param[in] config type
+ *
+ * @return DM_OK on success
+ * DM_ERROR on error
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+DM_ERROR add_polling_alarm_item(int poll_period, int poll_time, int poll_range, char *alarm_type, CONFIG_TYPE conf_type);
+
+/**
* @par Description: API to set alarm schedule
*
*
void get_roaming_state(int *roaming_state);
/**
+ * @par Description: API to get roaming state
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par par Method of function operation:
+ * @par Important notes:
+ * @param[in] wifi_state
+ *
+ * @return
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+void get_wifi_connected_state(int *wifi_state);
+
+/**
* @par Description: API to get call state
*
*
*/
char *get_new_uri(char *old_object_uri);
+/**
+ *@par Description: API to set FMM Mobile tracking alarm
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par par Method of function operation:
+ * @par Important notes:
+ * @param[in] polling period (period day)
+ * @param[in] polling start hour (0~23)
+ * @param[in] polling range hour (1~24)
+ * @param[in] alarm type string(fumo, fmm)
+ * @param[in] alarm type(fumo, fmm)
+ *
+ * @return DM_OK on success
+ * DM_ERROR on error
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+DM_ERROR set_lawmo_mobile_tracking_start_alarm(int poll_period, int poll_time, int poll_range, char *alarm_str, CONFIG_TYPE alarm_type);
+
+/**
+ * @par Description: API to delete FMM Mobile tracking alarm
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par par Method of function operation:
+ * @par Important notes:
+ * @param[in] alarm type string
+ * @param[in] alarm type
+ *
+ * @return
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+void delete_lawmo_mobile_tracking_alarm(char *alarm_str, CONFIG_TYPE alarm_type);
+
+/**
+ * @par Description: API to set FMM Mobile tracking alarm item
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par par Method of function operation:
+ * @par Important notes:
+ * @param[in] polling period (period day)
+ * @param[in] polling start hour (0~23)
+ * @param[in] polling range hour (1~24)
+ * @param[in] alarm type
+ * @param[in] config type
+ *
+ * @return DM_OK on success
+ * DM_ERROR on error
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+DM_ERROR add_lawmo_mobile_tracking_alarm_item(int poll_period, int poll_time, int poll_range, char *alarm_type, CONFIG_TYPE conf_type);
+
+
+
#endif /* OMA_DM_COMMON_H_ */
/*for slp fota*/
/*
-#define OMA_DM_FUMO_APPID "bc2d5906ebefbb66"
+#define OMA_DM_FUMO_APPID "xxxxxxxxxx"
#define OMA_DM_FUMO_APPSECRETID "rLIrPQYjzNOgkSU6gQME+b2J8Ro="
#define OMA_DM_LAWMO_APPID "ed7b8510eb22050e"
#define LAWMO_ACCOUNT_FLAG "lawmo_account_flag"
#define LAWMO_ACCOUNT_ALARM "lawmo_account_alarm"
+#define FOTA_POLLING_ALARM "fumo_polling_alarm"
+#define LAWMO_TRACKING_START_ALARM "lawmo_tracking_start_alarm"
+
#define IPC_DS "/tmp/agent_fw_event_omads"
#define FOTA_DELTA_INTERNAL_STORAGE "/opt/data/fota"
#define FOTA_DELTA_SD_INTERNAL_STORAGE "/opt/media"
FUMO_ACCOUNT_FLAG_TYPE = 2,
FUMO_ACCOUNT_ALARM_TYPE = 3, //alarm
LAWMO_ACCOUNT_FLAG_TYPE = 4,
- LAWMO_ACCOUNT_ALARM_TYPE = 5 //alarm
+ LAWMO_ACCOUNT_ALARM_TYPE = 5, //alarm
+ FOTA_POLLING_ALARM_TYPE = 6,
+ LAWMO_TRACKING_START_ALARM_TYPE = 7
} CONFIG_TYPE;
/*
DM_ERR_FOTA_ACCOUNT_REGISTRATION = 1335,
DM_ERR_LAWMO_ACCOUNT_REGISTRATION = 1336,
+ /*fota polling */
+ DM_ERR_FOTA_POLL = 1350,
+
/*cp */
DM_ERR_EVENT_DS = 1400,
char *icon_uri;
char *object_vender;
char *DD_version;
- char *install_param;
+ char *install_param; /* ex) binaryType=FULL displayLanguage=kor-KR */
char *medea_object;
} Download_Descriptor;
#include "framework/platform-event-handler/dm_platform_event_handler_internal.h"
#include "framework/platform-event-handler/dm_platform_event_handler.h"
+//#include "serviceadapter/sa_define.h"
+#include "serviceadapter/sa_elements_internal.h"
+
#define CHECK_OPERATION 1
#define NON_CHECK_OPERATION 0
DM_ERROR engine_start(char *server_id, char *full_path, char *correlator, ENGINE_ID * service_engine_id, int *resultCode);
/**
+ * @par Description: API to engine Start about MO replace command.
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] server id server id
+ * @param[in] full_path full path
+ * @param[in] resultCode resultCode
+ * @param[in] item item
+ *
+ * @return DM_OK success
+ * DM_ERRORS fail
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+DM_ERROR engine_replace_start(char *server_id, char *full_path, ENGINE_ID * service_engine_id, int *resultCode, Item * item);
+
+/**
* @par Description: API to service_engine_Start
*
*
#ifndef FOTA_ACCOUNT_H_
#define FOTA_ACCOUNT_H_
+#define VERSION_URL_KEY "db/SyncML/oma-dm-service/versionurl"
+#define VERSION_FILENAME_KEY "db/SyncML/oma-dm-service/versionfilename"
+
/*dm-agent*/
#include "common/dm_error.h"
*/
int register_fota_account();
+int register_fota_polling(char *str_url, char *file_name, int *exist_version);
+
#endif /* FOTA_ACCOUNT_H_ */
DM_ERROR fumo_exec(char *full_path, char *value, FUMO_Error * fumo_return);
/**
+ * @par Description: API to execute fumo operation about fumo MO replace cmd.
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] full_path mo full path
+ * @param[in] value value
+ * @param[out] fumo_return fumo return value
+ *
+ * @return DM_OK success
+ * DM_ERRORS fail
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+DM_ERROR fumo_replace(char *full_path, char *value, FUMO_Error * fumo_return);
+
+/**
* @par Description: API to operate firmware download
*
*
DM_ERROR lawmo_exec(char *full_path, char *correlator, LAWMO_Result_code * lawmo_return, int check_operation);
/**
+ * @par Description: API to execute lawmo operation for lawmo MO replace cmd.
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] full_path mo full path
+ * @param[in] value value
+ * @param[in] check operation check operation
+ *
+ * @return DM_OK success
+ * DM_ERRORS fail
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+DM_ERROR lawmo_replace(char *full_path, char *value, LAWMO_Result_code * lawmo_return, int check_operation);
+
+/**
* @par Description: API to execute lawmo operation
*
*
IP_PUSH_EVENT = 0,
WAP_PUSH_EVENT,
UI_EVENT,
- SERVER_BOOTSTRAP_EVENT
+ SERVER_BOOTSTRAP_EVENT,
+ POLL_EVENT
} Event_Type;
typedef enum {
NOTI_TYPE_NOT_SPECIFIED = 0,
NOTI_TYPE_BACKGRUOUND,
NOTI_TYPE_INFOMATIVE,
- NOTI_TYPE_USERINTERACTION
+ NOTI_TYPE_USERINTERACTION,
+ NOTI_TYPE_POLLINTERACTION
} NotI_Type;
typedef struct {
#define EC_MSG_TYPE_BOOTSTRAP_TASK_REQUEST 3
#define EC_MSG_TYPE_NAME_BOOTSTRAP_TASK_REQUEST "dm_bootstrap"
-#define EC_MSG_TYPE_DM_FUMO_COMMON_TASK_REQUEST 4
-#define EC_MSG_TYPE_NAME_DM_FUMO_COMMON_TASK_REQUEST "dm_ fumo_common"
+#define EC_MSG_TYPE_DM_FUMO_COMMON_TASK_REQUEST 4
+#define EC_MSG_TYPE_NAME_DM_FUMO_COMMON_TASK_REQUEST "dm_fumo_common"
-#define EC_MSG_TYPE_DM_FUMO_UI_TASK_REQUEST 5
-#define EC_MSG_TYPE_NAME_DM_FUMO_UI_TASK_REQUEST "dm_ fumo_ui"
+#define EC_MSG_TYPE_DM_FUMO_UI_TASK_REQUEST 5
+#define EC_MSG_TYPE_NAME_DM_FUMO_UI_TASK_REQUEST "dm_fumo_ui"
#define EC_MSG_TYPE_DM_LAWMO_COMMON_TASK_REQUEST 6
#define EC_MSG_TYPE_NAME_DM_LAWMO_COMMON_TASK_REQUEST "dm_lawmo_common"
* @par Typical use case:
* @par Method of function operation:
* @par Important notes:
+ * @param[in] int type, file size
*
* @return RESPONSE_TYPE_OK success
RESPONSE_TYPE_NONE , RESPONSE_TYPE_CANCEL, RESPONSE_TYPE_TIMEOVER fail
* @code
* @endcode
*/
-int noti_download();
+int noti_download(int file_size);
/**
* @par Description: API to noti install
int noti_low_battery(char *battery_level);
/**
+ * @par Description: API to noti firmware update result.
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] int type, file size
+ *
+ * @return RESPONSE_TYPE_OK success
+ RESPONSE_TYPE_NONE , RESPONSE_TYPE_CANCEL, RESPONSE_TYPE_TIMEOVER fail
+ *
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+int noti_update_result(int result);
+
+/**
* @par Description: API to alert uic display
*
*
* @par Typical use case:
* @par Method of function operation:
* @par Important notes:
+ * @param[in] int type, file size
*
* @return RESPONSE_TYPE_OK success
RESPONSE_TYPE_NONE , RESPONSE_TYPE_CANCEL, RESPONSE_TYPE_TIMEOVER fail
* @code
* @endcode
*/
-int noti_over_max_file_size();
+int noti_over_max_file_size(int file_size);
#endif /* IPC_AGENT_H_ */
typedef enum {
NOTI_UNKNOWN = 0,
- NOTI_DOWNLOAD = 1, // Type 0
- NOTI_INSTALL, // Type 0
- NOTI_DOWNLOAD_INFO, // Type 0
-
- NOTI_ENGINE_START = 4, // Type 0
- NOTI_ENGINE_FAIL, // Type 0
- NOTI_WIFI_ONLY_DOWNLOAD_FAIL, // Type 0
- NOTI_MEMORY_FULL, // Type 0
- NOTI_OVER_BIG_SIZE, // Type 0
- NOTI_LOW_BATTERY, // Type 0
-
- NOTI_ALERT_DISPLAY = 10, // Type 0, response event
- NOTI_ALERT_CONFIRMATION, // Type 0, response event
- NOTI_ALERT_INPUTTEXT, // Type 0, response event
- NOTI_ALERT_SINGLE_CHOICE, // Type 0, response event
- NOTI_ALERT_MULTIPLE_CHOICE, // Type 0, response event
-
+ NOTI_DOWNLOAD = 1, // Type 0
+ NOTI_INSTALL, // Type 0
+ NOTI_DOWNLOAD_INFO, // Type 0
+
+ NOTI_ENGINE_START = 4, // Type 0
+ NOTI_ENGINE_FAIL, // Type 0
+ NOTI_WIFI_ONLY_DOWNLOAD_FAIL, // Type 0
+ NOTI_MEMORY_FULL, // Type 0
+ NOTI_OVER_BIG_SIZE, // Type 0
+ NOTI_LOW_BATTERY, // Type 0
+
+ NOTI_ALERT_DISPLAY = 10, // Type 0, response event
+ NOTI_ALERT_CONFIRMATION, // Type 0, response event
+ NOTI_ALERT_INPUTTEXT, // Type 0, response event
+ NOTI_ALERT_SINGLE_CHOICE, // Type 0, response event
+ NOTI_ALERT_MULTIPLE_CHOICE, // Type 0, response event
+
+ NOTI_POLL_INTERACTION = 15,
+ NOTI_UPDATE_RESULT, // Type 0
NOTI_NUM
} NOTI_ID;
PUSH_NOT_SPECIFIED = 0,
PUSH_BACKGROUND,
PUSH_INFORMATIVE,
- PUSH_INTERACTION
+ PUSH_INTERACTION,
+ POLL_INTERACTION
} PUSH_TYPE;
typedef enum {
#define DM_DEVINFO "./DevInfo"
#define DM_DEVDETAIL "./DevDetail"
+#define DM_DEVDETAIL_FWV "./DevDetail/FwV"
+
#define DM_DMACC_MSCSERVER "./DMAcc/MSCserver"
#define DM_DMACC_MSCTESTSERVER "./DMAcc/MSCTestserver"
#define DM_DMACC_GCF "./DMAcc/gcf"
#define DM_FUMO_STATE_OP "/State"
#define DM_FUMO_EXT_OP "/Ext"
+#define DM_FUMO_EXT_OP_DOCHECKINGROOTING "/Ext/DoCheckingRooting"
+
#define DM_LAWMO_STATE_OP "/State"
#define DM_LAWMO_AVAILABLEWIPELIST_LISTITEMNAME "/AvailableWipeList/omadm/ListItemName"
#define DM_LAWMO_AVAILABLEWIPELIST_TOBEWIPED "/AvailableWipeList/omadm/ToBeWipe"
#define DM_FUMO_STATE "./FUMO/State"
#define DM_FUMO_EXT "./FUMO/Ext"
+#define DM_FUMO_EXT_DO_CHECKING_ROOTING "./FUMO/Ext/DoCheckingRooting"
+
#define DM_LAWMO "./LAWMO"
#define DM_LAWMO_STATE "./LAWMO/State"
#define DM_LAWMO_AVAILABLEWIPELIST "./LAWMO/AvailableWipeList"
<filesystem path="/usr/share/oma_dm_cfg/ddf/slp_mscserver_dmacc_ddf.txt" label="oma-dm-agent::ddf"/>
<filesystem path="/usr/share/oma_dm_cfg/ddf/slp_msctestserver_dmacc_ddf.txt" label="oma-dm-agent::ddf"/>
<filesystem path="/usr/share/oma_dm_cfg/ddf/slp_ddfs.txt" label="oma-dm-agent::ddf"/>
+ <filesystem path="/opt/dbspace/.dm_service.db" label="oma-dm-agent::db"/>
+ <filesystem path="/opt/dbspace/.dm_service.db-journal" label="oma-dm-agent::db"/>
+ <filesystem path="/opt/dbspace/.omadmagent.db" label="oma-dm-agent::db"/>
+ <filesystem path="/opt/dbspace/.omadmagent.db-journal" label="oma-dm-agent::db"/>
+ <filesystem path="/opt/dbspace/.momanager.db" label="oma-dm-agent::db"/>
+ <filesystem path="/opt/dbspace/.momanager.db-journal" label="oma-dm-agent::db"/>
+ <filesystem path="/etc/rc.d/rc3.d/S91oma-dm-agent" label="_" exec_label="none"/>
+ <filesystem path="/etc/rc.d/rc5.d/S91oma-dm-agent" label="_" exec_label="none"/>
+ <filesystem path="/etc/init.d/oma-dm" label="_" exec_label="none"/>
</assign>
<request>
<domain name="oma-dm-agent" />
#!/bin/sh
+vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/ConfVersion "0.1"
vconftool set -t int -f db/SyncML/oma-dm-service/DevManagement/NbDevManagement 1
vconftool set -t int -f db/SyncML/oma-dm-service/DevManagement/1/AuthType 1
vconftool set -t int -f db/SyncML/oma-dm-service/DevManagement/1/Port 80
+vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/UserName "RSuser"
+vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ClientPwd "RSpass"
+
+
<MgmtTree>\r
<VerDTD>1.2</VerDTD>\r
<Man>Samsung Electronics</Man>\r
- <Mod>GT-I9500</Mod>\r
+ <Mod>GT-I8800</Mod>\r
<Node>\r
<NodeName>DevDetail</NodeName>\r
<!--The '.' shows that this node is located immediately under the root.-->\r
<MgmtTree>\r
<VerDTD>1.2</VerDTD>\r
<Man>Samsung Electronics</Man>\r
- <Mod>GT-I9500</Mod>\r
+ <Mod>GT-I8800</Mod>\r
<Node>\r
<NodeName>DevInfo</NodeName>\r
<!--The '.' shows that this node is located immediately under the root.-->\r
<MgmtTree> \r
<VerDTD>1.2</VerDTD>\r
<Man>Samsung Electronics</Man>\r
- <Mod>GT-I9500</Mod>\r
+ <Mod>GT-I8800</Mod>\r
<Node>\r
<NodeName>FUMO</NodeName>\r
<!--The node is located in a location specified below in the Path element -->\r
</DFType>\r
</DFProperties>\r
</Node>\r
+ <Node>\r
+ <NodeName>DoCheckingRooting</NodeName>\r
+ <!--This node is used for Vendor specific extensions -->\r
+ <DFProperties>\r
+ <AccessType>\r
+ <Get/><Replace/>\r
+ </AccessType>\r
+ <DFFormat>\r
+ <chr/>\r
+ </DFFormat>\r
+ <Occurrence>\r
+ <ZeroOrMore/>\r
+ </Occurrence>\r
+ <Scope>\r
+ <Permanent/>\r
+ </Scope>\r
+ <DFTitle>A node that can be used to provide vendor-specific extensions </DFTitle>\r
+ <DFType>\r
+ <MIME>text/plain</MIME>\r
+ </DFType>\r
+ </DFProperties>\r
+ </Node>\r
</Node>\r
</Node>\r
</MgmtTree> \r
<MgmtTree>\r
<VerDTD>1.2</VerDTD>\r
<Man>Samsung Electronics</Man>\r
- <Mod>GT-I9500</Mod>\r
+ <Mod>GT-I8800</Mod>\r
<Node>\r
<NodeName>DMAcc</NodeName>\r
<!--The Path element must be used here so that the SyncML management object can be correctly positioned in the management tree.-->\r
<MgmtTree>
<VerDTD>1.2</VerDTD>
<Man>Samsung Electronics</Man>
- <Mod>GT-I9500</Mod>
+ <Mod>GT-I8800</Mod>
<Node>
<NodeName>Ext</NodeName>
<!--The node is located in a location specified below in the Path element -->
11, 0, 3, 30, NOTI_ALERT_CONFIRMATION
12, 0, 3, 30, NOTI_ALERT_INPUTEXT
13, 0, 3, 30, NOTI_ALERT_SINGLE_CHOICE
-14, 0, 3, 30, NOTI_ALERT_MULTIPLE_CHOICE
\ No newline at end of file
+14, 0, 3, 30, NOTI_ALERT_MULTIPLE_CHOICE15, 0, 0, 30, NOTI_POLL_INTERACTION
+16, 0, 0, 30, NOTI_UPDATE_RESULT
Name: oma-dm-agent
Summary: oma-dm-agent daemon for FOTA,DM,CP,FMM Service
-Version: 0.1.5
+Version: 0.1.66
Release: 1
Group: TO_BE/FILLED_IN
License: Apache License, Version 2.0
%install
rm -rf %{buildroot}
+
+if [ ! -d %{buildroot}/opt/dbspace ]
+then
+ mkdir -p %{buildroot}/opt/dbspace
+fi
+
+sqlite3 %{buildroot}/opt/dbspace/.dm_service.db "PRAGMA journal_mode = PERSIST; create table a(a); drop table a;" > /dev/null
+sqlite3 %{buildroot}/opt/dbspace/.omadmagent.db "PRAGMA journal_mode = PERSIST; create table a(a); drop table a;" > /dev/null
+sqlite3 %{buildroot}/opt/dbspace/.momanager.db "PRAGMA journal_mode = PERSIST; create table a(a); drop table a;" > /dev/null
+
%make_install
%post
-if [ ! -d /opt/dbspace ]
-then
- mkdir /opt/dbspace
-fi
if [ ! -d /etc/rc.d/rc3.d ]
then
- mkdir /etc/rc.d/rc3.d
+ mkdir -p /etc/rc.d/rc3.d
fi
if [ ! -d /etc/rc.d/rc5.d ]
then
- mkdir /etc/rc.d/rc5.d
+ mkdir -p /etc/rc.d/rc5.d
fi
-ln -s /etc/init.d/oma-dm /etc/rc.d/rc3.d/S91oma-dm-agent
-ln -s /etc/init.d/oma-dm /etc/rc.d/rc5.d/S91oma-dm-agent
-
-sqlite3 /opt/dbspace/.dm_service.db "PRAGMA journal_mode = PERSIST; create table a(a); drop table a;" > /dev/null
-sqlite3 /opt/dbspace/.omadmagent.db "PRAGMA journal_mode = PERSIST; create table a(a); drop table a;" > /dev/null
-sqlite3 /opt/dbspace/.momanager.db "PRAGMA journal_mode = PERSIST; create table a(a); drop table a;" > /dev/null
-
-chmod 600 /opt/dbspace/.dm_service.db
-chmod 600 /opt/dbspace/.dm_service.db-journal
-chmod 600 /opt/dbspace/.omadmagent.db
-chmod 600 /opt/dbspace/.omadmagent.db-journal
-chmod 600 /opt/dbspace/.momanager.db
-chmod 600 /opt/dbspace/.momanager.db-journal
-
-if [ -f /usr/lib/rpm-plugins/msm.so ]
+if [ ! -f /etc/rc.d/rc3.d/S91oma-dm-agent ]
then
- chsmack -a oma-dm-agent::db /opt/dbspace/.dm_service.db
- chsmack -a oma-dm-agent::db /opt/dbspace/.dm_service.db-journal
- chsmack -a oma-dm-agent::db /opt/dbspace/.omadmagent.db
- chsmack -a oma-dm-agent::db /opt/dbspace/.omadmagent.db-journal
- chsmack -a oma-dm-agent::db /opt/dbspace/.momanager.db
- chsmack -a oma-dm-agent::db /opt/dbspace/.momanager.db-journal
+ ln -s /etc/init.d/oma-dm /etc/rc.d/rc3.d/S91oma-dm-agent
+fi
+if [ ! -f /etc/rc.d/rc5.d/S91oma-dm-agent ]
+then
+ ln -s /etc/init.d/oma-dm /etc/rc.d/rc5.d/S91oma-dm-agent
fi
#/etc/init.d/oma-dm start
%files
+%attr(600,root,root) /opt/dbspace/.dm_service.db
+%attr(600,root,root) /opt/dbspace/.dm_service.db-journal
+%attr(600,root,root) /opt/dbspace/.omadmagent.db
+%attr(600,root,root) /opt/dbspace/.omadmagent.db-journal
+%attr(600,root,root) /opt/dbspace/.momanager.db
+%attr(600,root,root) /opt/dbspace/.momanager.db-journal
+
%manifest oma-dm-agent.manifest
%defattr(-,root,root,-)
/usr/share/dbus-1/services/*
/usr/bin/oma-dm-agent
-/usr/share/oma-dm-cfg/*
/usr/share/oma-dm-cfg/ddf/*
-/usr/share/oma-dm-cfg/ddf/slp/*
+/usr/share/oma-dm-cfg/delta_size/*
+/usr/share/oma-dm-cfg/fw-init/*
/usr/share/oma-dm-cfg/ipc/*
+
%defattr(700,root,root)
/usr/share/oma-dm-cfg/csc-setting/change_csc_value.sh
/usr/share/oma-dm-cfg/imei-setting/change_imei_callnum.sh
_EXTERN_FUNC_ENTER;
retvm_if(status == NULL, DM_ERR_UNKNOWN, "engine status is NULL !!");
+ _DEBUG_INFO("status [%d]", status);
DB_HANDLER *db_handler = _get_agent_handler(GET_THREAD_ID);
if (db_handler == NULL) {
_EXTERN_FUNC_EXIT;
return dm_add_engine_status(db_handler, status);
} else {
+ _DEBUG_INFO("status->engine_id [%d]", status->engine_id);
+ _DEBUG_INFO("status->download_click [%d]", status->download_click);
_EXTERN_FUNC_EXIT;
return dm_update_engine_status(db_handler, status);
}
_DEBUG_INFO("success register wap push : %d ", ret);
}
+
ret = register_fumo_ip_push();
if (ret == -1) {
_DEBUG_INFO("fail register fumo ip push : %d ", ret);
} else {
_DEBUG_INFO("success register fumo ip push : %d ", ret);
- /*todo temp code
- * will integrate notification UI */
- /*ret = register_fota_account();
-
- if (ret == -1) {
- _DEBUG_INFO("fail register fota account : %d ", ret);
- } else {
- _DEBUG_INFO("success register fota account : %d ", ret);
- } */
+ //todo temp code
+ // will integrate notification UI
+ //ret = register_fota_account();
+ //if (ret == -1) {
+ // _DEBUG_INFO("fail register fota account : %d ", ret);
+ //} else {
+ // _DEBUG_INFO("success register fota account : %d ", ret);
+ //}
}
ret = register_lawmo_samsung_account();
_EXTERN_FUNC_EXIT;
}
+
+void delete_polling_alarm_item(char *alarm_type, CONFIG_TYPE conf_type)
+{
+ _EXTERN_FUNC_ENTER;
+
+ delete_alarm_item(alarm_type, conf_type);
+ _EXTERN_FUNC_EXIT;
+
+}
+
DM_ERROR add_alarm_item(Reminder_Interval interval, char *alarm_type, CONFIG_TYPE conf_type)
{
_EXTERN_FUNC_ENTER;
DM_ERROR ret = DM_OK;
- /*int week[] = {DAY_SUN, DAY_MON, DAY_TUE, DAY_WED, DAY_THU, DAY_FRI, DAY_SAT}; */
+ //int week[] = {DAY_SUN, DAY_MON, DAY_TUE, DAY_WED, DAY_THU, DAY_FRI, DAY_SAT};
time_t current_time;
struct tm *struct_time;
engine_status *status = NULL;
ret = Get_Engine_Status(FUMO_SERVICE_ENGINE, &status);
if (ret != DM_OK) {
+ if(status != NULL)
+ Free_Memory_Engine_Status(&status, 1);
+
_EXTERN_FUNC_EXIT;
return ret;
}
_EXTERN_FUNC_EXIT;
}
+void get_wifi_connected_state(int *wifi_state)
+{
+ _EXTERN_FUNC_ENTER;
+
+ int wifi_connection = VCONFKEY_WIFI_OFF;
+ int nRes_wifistatus = vconf_get_int(VCONFKEY_WIFI_STATE, &wifi_connection);
+ *wifi_state = -1;
+
+ if (nRes_wifistatus != 0) {
+ _DEBUG_INFO("vconf_get_int get wificonnection fail\n");
+ *wifi_state = -1;
+ _EXTERN_FUNC_EXIT;
+ return;
+ }
+
+ if(wifi_connection >= VCONFKEY_WIFI_CONNECTED) {
+ _DEBUG_INFO("vconf_get_int get wificonnection success\n");
+ *wifi_state = 0;
+ _EXTERN_FUNC_EXIT;
+ return;
+ }
+
+ _EXTERN_FUNC_EXIT;
+}
+
void get_call_sate(int *call_state)
{
_EXTERN_FUNC_ENTER;
return DM_MEMORY_ERROR;
}
- _DEBUG_INFO("memory free size : %f, total size : %f ", sizeFree, sizeTotal);
+ _DEBUG_INFO("need free size [%f], memory free size [%f], total size [%f] ", file_size, sizeFree, sizeTotal);
if (file_size > sizeFree) {
_EXTERN_FUNC_EXIT;
return DM_OVER_MEMORY_ERROR;
_EXTERN_FUNC_EXIT;
return NOTI_DOWNLOAD; //connect to server
break;
+ case NOTI_TYPE_POLLINTERACTION:
+ _EXTERN_FUNC_EXIT;
+ return NOTI_POLL_INTERACTION; //connect to server
+ break;
default:
return NOTI_UNKNOWN; //none type
break;
}
} else if (WBXML_STRCMP("SERVICE", wbxml_attribute_get_xml_value(param_attr)) == 0) {
String_Node *target_ptr = ___get_Last_String_Node(port->service);
+
+ if(target_ptr == NULL) {
+ _DEBUG_ERROR("___get_Last_String_Node fail - target_ptr NULL ERROR");
+ free_cp_pxlogical(pxLogical);
+ pxLogical = NULL;
+ _INNER_FUNC_EXIT;
+ return 0;
+ }
+
___set_Param(pCursor_Port, &(target_ptr->data));
if(target_ptr->data != NULL) {
_DEBUG_VERBOSE("SERVICE : %s", target_ptr->data);
String_Node *target_ptr = ___get_Last_String_Node(pxPhysical->domain);
if(target_ptr == NULL) {
_DEBUG_VERBOSE("___get_Last_String_Node fail");
- free_cp_pxlogical(pxLogical);
- pxLogical = NULL;
+ free_cp_pxlogical(pxLogical);
+ pxLogical = NULL;
_INNER_FUNC_EXIT;
return 0;
}
String_Node *target_ptr = ___get_Last_String_Node(pxPhysical->to_napid);
if(target_ptr == NULL) {
_DEBUG_VERBOSE("___get_Last_String_Node fail");
- free_cp_pxlogical(pxLogical);
- pxLogical = NULL;
+ free_cp_pxlogical(pxLogical);
+ pxLogical = NULL;
_INNER_FUNC_EXIT;
return 0;
}
String_Node *target_ptr = ___get_Last_String_Node(port->service);
if(target_ptr==NULL) {
_DEBUG_VERBOSE("___get_Last_String_Node fail");
- free_cp_pxlogical(pxLogical);
- pxLogical = NULL;
+ free_cp_pxlogical(pxLogical);
+ pxLogical = NULL;
_INNER_FUNC_EXIT;
return 0;
}
DD_NODE_DESCRIPTION,
DD_NODE_OBJECT_URI,
DD_NODE_SIZE,
- DD_NODE_INSTALL_NOTIFY_URI
+ DD_NODE_INSTALL_NOTIFY_URI,
+ DD_NODE_INSTALL_PARAM
} DD_NODE_TYPE;
static DD_NODE_TYPE ___get_node_type(unsigned char *node_name);
} else if (strcmp((const char *)node_name, "installNotifyURI") == 0) {
_INNER_FUNC_EXIT;
return DD_NODE_INSTALL_NOTIFY_URI;
+ } else if (strcmp((const char *)node_name, "installParam") == 0) {
+ _INNER_FUNC_EXIT;
+ return DD_NODE_INSTALL_PARAM;
}
_INNER_FUNC_EXIT;
{
if (content != NULL) {
(*dd_object)->object_type = strdup((const char *)content);
+ _DEBUG_VERBOSE("object_type = %s\n", (*dd_object)->object_type);
+ } else {
+ _DEBUG_VERBOSE("object type null");
}
}
break;
{
if (content != NULL) {
(*dd_object)->object_description = strdup((const char *)content);
+ _DEBUG_VERBOSE("object_description = %s\n", (*dd_object)->object_description);
+ } else {
+ _DEBUG_VERBOSE("object description null");
}
}
break;
{
if (content != NULL) {
(*dd_object)->object_size = atoi((const char *)content);
+ _DEBUG_VERBOSE("object_size = %d\n", (*dd_object)->object_size);
+ } else {
+ _DEBUG_VERBOSE("object size null");
}
}
break;
}
}
break;
+ case DD_NODE_INSTALL_PARAM:
+ {
+ if (content != NULL) {
+ (*dd_object)->install_param = strdup((const char *)content);
+ _DEBUG_VERBOSE("install_param = %s\n", (*dd_object)->install_param);
+ } else {
+ _DEBUG_VERBOSE("install param null");
+ }
+ }
+ break;
default:
break;
}
char *recvMsg = 0;
unsigned int recvMsg_size = 0;
GList *recv_header = 0;
+ _DEBUG_INFO("dd_server_uri [%s]", dd_server_uri);
ret = send_download_msg(DD_DOWNLOAD, dd_server_uri, "application/vnd.oma.dd+xml", send_header, 0, 0, &recv_header, &recvMsg, &recvMsg_size);
if (ret != DM_OK) {
*download_status = DM_ERR_LOSS_OF_SERVICE;
if (*download_descriptor != NULL && (*download_descriptor)->object_uri != NULL) {
*file_size = (*download_descriptor)->object_size;
- _DEBUG_INFO(" dd->object_uri = %s \n", (*download_descriptor)->object_uri);
+ if((*download_descriptor)->object_type != NULL) {
+ _DEBUG_INFO(" dd->object_type = %s \n", (*download_descriptor)->object_type);
+ }
+ if((*download_descriptor)->object_uri != NULL) {
+ _DEBUG_INFO(" dd->object_uri = %s \n", (*download_descriptor)->object_uri);
+ }
_DEBUG_INFO(" dd->size = %d \n", (*download_descriptor)->object_size);
- _DEBUG_INFO(" dd->object_description = %s \n", (*download_descriptor)->object_description);
+ if((*download_descriptor)->install_notify_uri != NULL) {
+ _DEBUG_INFO(" dd->install_notify_uri = %s \n", (*download_descriptor)->install_notify_uri);
+ }
+ if((*download_descriptor)->object_description != NULL) {
+ _DEBUG_INFO(" dd->object_description = %s \n", (*download_descriptor)->object_description);
+ }
+ if((*download_descriptor)->install_param != NULL) {
+ _DEBUG_INFO(" dd->install_param = %s \n", (*download_descriptor)->install_param);
+ }
+
} else {
_DEBUG_INFO("dd obejct uri null");
ret = DM_ERR_INVALID_DESCRIPTOR;
/* 1. validate download_folder variable */
retvm_if((checked_download_folder) == NULL, COMMON_ERR_IS_NULL, "checked_download_folder is NULL!!");
- if (file_status != NULL) {
- _DEBUG_INFO("checked_download_folder == 0 && file_status != 0 ");
+ if (file_status == NULL) {
+ _DEBUG_INFO("file_status == NULL ");
ret = COMMON_ERR_IS_NULL;
_EXTERN_FUNC_EXIT;
return ret;
char *temp_file_path = 0;
for (iter = fileList; iter != 0; iter = g_slist_next(iter)) {
temp_file_info = (char *)(iter->data);
- _DEBUG_TRACE("temp_file_name = %s\n", temp_file_name);
+ _DEBUG_TRACE("temp_file_info = %s\n", temp_file_info);
//
temp_file_name = strtok(temp_file_info, ",");
+ _DEBUG_TRACE("temp_file_name = %s\n", temp_file_name);
//
if (strcmp(temp_file_name, file_name) != 0) {
#define LOG_TAG "OMA_DM_DL"
#endif
-#define DOWNLOAD_BODY_SIZE 66304
-//#define DOWNLOAD_BODY_SIZE 3592624
+//#define DOWNLOAD_BODY_SIZE 66304
+////#define DOWNLOAD_BODY_SIZE 3592624
+
+//#define DOWNLOAD_BODY_SIZE 983040
+#define DOWNLOAD_BODY_SIZE 491520
+//#define DOWNLOAD_BODY_SIZE 245760
+
#define MAX_COUNT 3
static sync_agent_na_result_e _download_data(GList * header_info, int na_plugIn_id, unsigned char *download_folder, unsigned int download_start_size,
if (value != NULL) {
_DEBUG_INFO("Key = %s, Value = %s\n", "Content-Disposition", value);
char *ptr1 = strstr(value, "attachment;");
+ ptr1 = ptr1+strlen("attachment;");
if (ptr1 != NULL) {
- ptr1 = strstr(ptr1, "fileName=");
+ ptr1 = strstr(ptr1, "fileName=\"");
+ ptr1 = ptr1+strlen("fileName=\"");
if (ptr1 != NULL) {
char *temp = strdup(ptr1);
DM_ERROR ret = DM_OK;
int net_session_id;
- retvm_if((sendMsg) == NULL, COMMON_ERR_IS_NULL, "sendMsg is NULL!!");
+ //retvm_if((sendMsg) == NULL, COMMON_ERR_IS_NULL, "sendMsg is NULL!!");
//timeout : 30 seconds
res = sync_agent_open_connection(transportType, 30, (unsigned int *)(&(net_session_id)));
add_header_info(&header_info, "method", "get");
add_header_info(&header_info, "uri", local_uri);
add_header_info(&header_info, "Connection", "Keep-Alive");
- add_header_info(&header_info, "User-Agent", "Samsung electronics GT-I9500 SyncML_DM Client");
+ add_header_info(&header_info, "User-Agent", "Samsung electronics GT-I8800 SyncML_DM Client");
add_header_info(&header_info, "Accept", content_type);
add_header_info(&header_info, "Accept-Charset", "UTF-8");
add_header_info(&header_info, "Content-Type", content_type);
switch (send_dl_type) {
case DD_DOWNLOAD:
case GET_FILE_NAME:
+ {
+ res = sync_agent_send_msg( /*acc_info (id, pw, uri, ...), */
+ header_info, transportType, NULL, sendMsg_length, recv_header, (unsigned char **)recvMsg, recvMsg_length, SYNC_AGENT_NA_SEND_TYPE_SEND_N_RECEIVE, net_session_id);
+ }
+ break;
case SEND_DOWNLOAD_STATUS:
{
+ retvm_if((sendMsg) == NULL, COMMON_ERR_IS_NULL, "sendMsg is NULL!!");
res = sync_agent_send_msg( /*acc_info (id, pw, uri, ...), */
header_info, transportType, sendMsg, sendMsg_length, recv_header, (unsigned char **)recvMsg, recvMsg_length, SYNC_AGENT_NA_SEND_TYPE_SEND_N_RECEIVE, net_session_id);
}
int down_count = 0;
retvm_if((local_uri) == NULL, COMMON_ERR_IS_NULL, "local_uri is NULL!!");
- retvm_if((header_info) == NULL, COMMON_ERR_IS_NULL, "header_info is NULL!!");
+ //retvm_if((header_info) == NULL, COMMON_ERR_IS_NULL, "header_info is NULL!!");
+ warn_if((header_info) == NULL, "header_info is NULL!! But this is normal case !!");
retvm_if((download_folder) == NULL, COMMON_ERR_IS_NULL, "download_folder is NULL!!");
//timeout : 30 seconds
add_header_info(&header_info, "method", "get");
add_header_info(&header_info, "uri", local_uri);
add_header_info(&header_info, "Connection", "Keep-Alive");
-// add_header_info(&header_info, "User-Agent", "Samsung electronics GT-I9500 SyncML_DM Client");
+// add_header_info(&header_info, "User-Agent", "Samsung electronics GT-I8800 SyncML_DM Client");
add_header_info(&header_info, "Accept", content_type);
add_header_info(&header_info, "Accept-Charset", "UTF-8");
add_header_info(&header_info, "Content-Type", content_type);
ret = get_wifi_state();
_DEBUG_TRACE("wifi only mode : %d", ret);
if (ret != SYNC_AGENT_NA_SUCCESS) {
- goto return_part;
+ goto free_and_return_part;
}
}
- /* send_msg */
+ /* send_msg */ // sync_agent_send_msg function include backup_send_head_info_list resource free.
ret = sync_agent_send_msg(backup_send_head_info_list, na_plugIn_id, 0, 0, &recv_header_info, &recvMsg, &recvMsg_size, send_type, session_id);
if (ret != SYNC_AGENT_NA_SUCCESS) {
_DEBUG_TRACE("sync_agent_send_msg() fail");
}
_DEBUG_TRACE("############# Set_Data_Down_Info() success !!");
-
- if (backup_send_head_info_list != NULL) {
- for (free_list = backup_send_head_info_list; free_list != NULL;) {
- free_item = (sync_agent_na_common_header_info_s *) (free_list->data);
- free_list = g_list_next(free_list);
-
- sync_agent_free_na_common_header_info(free_item);
- }
- g_list_free(backup_send_head_info_list);
- }
}
_INNER_FUNC_EXIT;
return_part:
+ _INNER_FUNC_EXIT;
+ return ret;
+
+ free_and_return_part:
+
if (backup_send_head_info_list != NULL) {
for (free_list = backup_send_head_info_list; free_list != NULL;) {
free_item = (sync_agent_na_common_header_info_s *) (free_list->data);
engine_status *status;
- int is_exist;
+ int is_exist = 0;
is_exist = IsExist_Engine_id(service_engine_status);
if (is_exist == 1) {
status->server_id = strdup(server_id);
status->task_id = task_id;
status->ui_noti_type = 0;
- status->download_click = 0;
+ _DEBUG_INFO("is_exist [%d]", is_exist);
+ if(is_exist == 0) {
+ status->download_click = RESUME_STATUS_DONWLOAD_BEFORE;
+ } else {
+ _DEBUG_INFO("is_exist [%d] , status->download_click [%d] ", is_exist, status->download_click);
+ if( (RESUME_STATUS_INSTALL_BEFORE <= status->download_click) && (status->download_click <= RESUME_STATUS_INSTALL_IDLE ) ) {
+ status->download_click = RESUME_STATUS_INSTALL_BEFORE;
+ } else {
+ status->download_click = RESUME_STATUS_DONWLOAD_BEFORE;
+ }
+ }
+ _DEBUG_INFO("status->download_click [%d]", status->download_click);
+
//status->ui_mode = ;
/* one engine */
switch (service_engine_id) {
case FUMO_SERVICE_ENGINE:
+ _DEBUG_INFO(" service_status->download_click [%d] ", service_status->download_click);
_DEBUG_INFO(" fumo exec");
ret = fumo_exec(full_path, correlator, (FUMO_Error *) (&engine_return));
_DEBUG_INFO("fumo ret : %d", ret);
goto error;
}
+ _DEBUG_INFO(" after_service_status->download_click [%d] ", after_service_status->download_click);
+
if (after_service_status->download_click != RESUME_STATUS_INSTALL_BEFORE) {
+
/*engine status generic alert status */
service_engine_status = DM_GENERICALERT_ING;
ret = Update_Engine_Status_Column(service_engine_id, VALUE_ENGINE_STATUS, &service_engine_status);
_DEBUG_INFO("service engine status generic alert");
+
ret = Update_Engine_Status_Column(service_engine_id, VALUE_RESULT_STATUS, &engine_return);
_DEBUG_INFO("service engine status generic alert status : %d", engine_return);
+
+ /* adding alert for fota result start : _generate_generic_alert*/
+ if( (after_service_status->download_click == RESUME_STATUS_INSTALL) && (service_engine_id == FUMO_SERVICE_ENGINE) ) {
+ _DEBUG_INFO("fota result report");
+ int isFinish = 0;
+ void *session = NULL;
+ //int common_status = DM_IDLE;
+ //ret = genericalert_operation(engine_return, server_id, service_engine_id);
+ ret = genericalert_operation(&session, &isFinish, service_engine_id);
+ _DEBUG_INFO("isFinish [%d]", isFinish);
+ if(ret != DM_OK) {
+ goto error;
+ }
+ set_engine_status_idle(service_engine_id);
+
+ Delete_Engine_Status(service_engine_id);
+ _DEBUG_INFO("Delete fumo service engine");
+
+ //_DEBUG_INFO("isFinish [%d]", isFinish);
+ //if(!isFinish) {
+ if(engine_return == 200) {
+ ret = management_phase(1, (Session **) (&session), NULL, &service_engine_id, &isFinish);
+ if (ret != DM_OK) {
+ *service_ret = ret;
+ _DEBUG_INFO("management_phase is not DM_OK");
+ goto error;
+ } else {
+ _DEBUG_INFO("management_phase is DM_OK");
+ }
+ }
+ }
+ /* adding alert for fota result end */
}
str_free(&full_path);
goto error;
}
+ if( session_id != NULL ) {
+ _DEBUG_INFO("session_id [%s]", session_id);
+ } else {
+ _DEBUG_INFO("session_id is NULL");
+ }
+
get_service_engine_id(&service_engine_id, pEvent_data->ui_mode);
/*pkg 1 ~ pkg2 */
_DEBUG_INFO(" ----------------------------------------------------------------------generic alert-------------------------------------------------------------------------------");
_DEBUG_INFO("service engine id = %d\n", service_engine_id);
- isFinish = 0;
+ *isFinish = 0;
int isgeneticAlert = 1;
if (status->server_id != NULL) {
* limitations under the License.
*/
+#include <vconf.h>
+
/*sync-agent*/
#include <sync_agent.h>
#include "ipc_common.h"
#include "ipc_agent.h"
-#define MAX_FILE_SIZE 52428800
+
+#define MAX_FILE_SIZE 52428800 /* 50 MB */
+//#define MAX_FILE_SIZE 2042626048 /* 1948 MB : (2*1024*1024*1024) - (100*1024*1024) */
+
+#define DD_MULTI_LANGUAGE "db/SyncML/oma-dm-service/DD-multilanguage"
+#define DD_OBJECT_SIZE "db/SyncML/oma-dm-service/DD-objectsize"
#ifndef OMADM_AGENT_LOG
#undef LOG_TAG
static DM_ERROR _firmware_download(char *server_url, MEMORY_TYPE * memory_type, FUMO_Error * fumo_return);
static DM_ERROR _firmware_install(char *full_path, MEMORY_TYPE memory_type, FUMO_Error * fumo_return);
+static DM_ERROR _firmware_update_popup(int result);
static DM_ERROR __check_low_battery();
static DM_ERROR __check_memory(long double file_size, MEMORY_TYPE * is_internal_memory);
static DM_ERROR ___get_max_file_size(int *max_file_size);
static DM_ERROR __check_max_file_size(int file_size);
+static DM_ERROR _checking_rooting_opeartion(char *value);
DM_ERROR fumo_engine_state_operation(char *full_path, char *down_server, FUMO_Error * fumo_return)
{
DM_ERROR ret = DM_OK;
retvm_if((full_path) == NULL, COMMON_ERR_IS_NULL, "full_path is NULL!!");
+ _DEBUG_INFO("full_path [%s]", full_path);
retvm_if((down_server) == NULL, COMMON_ERR_IS_NULL, "down_server is NULL!!");
+ _DEBUG_INFO("down_server [%s]", down_server);
char *result_mo_type = NULL;
sync_agent_dev_return_e dci_ret_exec = SYNC_AGENT_DEV_RETURN_SUCCESS;
//*fumo_return = result;
//*fumo_return = 202;
_DEBUG_INFO("-----------------firmware update result : %d fumo return : %d------------------", dci_ret_exec, (*fumo_return));
- if (dci_ret_exec != SYNC_AGENT_DEV_RETURN_SUCCESS) {
+ //if (dci_ret_exec != SYNC_AGENT_DEV_RETURN_SUCCESS) {
+ if ( (dci_ret_exec != SYNC_AGENT_DEV_RETURN_SUCCESS) || (*fumo_return != 200) ) {
fumo_state = UPDATE_FAILED_HAVE_DATA;
} else {
fumo_state = UPDATE_SUCCESSFUL_HAVE_DATA;
/* if(ret != DM_OK)
goto error;*/
+ ret = _firmware_update_popup(FUMO_UPDATE_FAILED);
+ if (ret != DM_OK) {
+ _DEBUG_INFO("_firmware_update result popup fail ");
+ }
+
/*ret = FUMO_UPDATE_FAILED; */
*fumo_return = FUMO_UPDATE_FAILED;
_DEBUG_INFO("update fail ");
/* if(ret != DM_OK)
goto error;*/
+ ret = _firmware_update_popup(FUMO_SUCCESS);
+ if (ret != DM_OK) {
+ _DEBUG_INFO("_firmware_update result popup fail ");
+ }
+
/*ret = FUMO_SUCCESS; */
*fumo_return = FUMO_SUCCESS;
_DEBUG_INFO("update success ");
// str_free(&result_mo_type);
_DEBUG_INFO(" end fumo state : %d\n", fumo_state);
str_free(&fumo_state_data);
+ str_free(&result_mo_type);
_EXTERN_FUNC_EXIT;
return ret;
return ret;
}
+DM_ERROR fumo_replace(char *full_path, char *value, FUMO_Error * fumo_return)
+{
+ _EXTERN_FUNC_ENTER;
+
+ DM_ERROR ret = DM_OK;
+
+ retvm_if((full_path) == NULL, COMMON_ERR_IS_NULL, "full_path is NULL!!");
+
+ char *result_mo_type = NULL;
+ ret = get_mo_operationtype(full_path, &result_mo_type);
+ if (ret != DM_OK)
+ goto error;
+
+ if (result_mo_type == NULL) {
+ _DEBUG_INFO("result_mo_type is null");
+ ret = COMMON_ERR_IS_NULL;
+ goto error;
+ } else {
+ _DEBUG_INFO("result_mo_type [%s]", result_mo_type);
+ }
+
+ if (strcmp(result_mo_type, DM_FUMO_EXT_OP_DOCHECKINGROOTING) == 0) {
+ ret = _checking_rooting_opeartion(value);
+ if (ret != DM_OK) {
+ (*fumo_return) = DM_ERR_COMMAND_NOT_ALLOWED;
+ goto error;
+ } else {
+ (*fumo_return) = DM_OK;
+ }
+ } else {
+ goto error;
+ }
+
+ str_free(&result_mo_type);
+ _DEBUG_INFO(" end : %d", ret);
+ _EXTERN_FUNC_EXIT;
+ return ret;
+ error:
+
+ str_free(&result_mo_type);
+ _DEBUG_INFO(" end error : %d \n", ret);
+ _EXTERN_FUNC_EXIT;
+ return ret;
+}
+
static DM_ERROR _firmware_download(char *server_url, MEMORY_TYPE * memory_type, FUMO_Error * fumo_return)
{
_INNER_FUNC_ENTER;
_DEBUG_TRACE("----------------------------------------------------------------------------------------------------- \n");
ret = Get_Engine_Status(FUMO_SERVICE_ENGINE, &status);
+ _DEBUG_INFO("Get_Engine_Status [%d]", ret);
if (ret != DM_OK || status == NULL) {
*fumo_return = FUMO_USER_CANCELLED;
download_status = DM_ERR_USER_CANDELLED;
goto error;
}
+ _DEBUG_INFO("status->download_click [%d]", status->download_click);
switch (status->download_click) {
case RESUME_STATUS_DONWLOAD_BEFORE: /*before click download popup */
{
goto error;
}
+ // DD download - description text
+ download_descriptor = (Download_Descriptor *) calloc(1, sizeof(Download_Descriptor) + 1);
+ if (download_descriptor == NULL) {
+ _DEBUG_TRACE("calloc failed !!");
+ ret = COMMON_ERR_ALLOC;
+ *fumo_return = FUMO_USER_CANCELLED;
+ download_status = DM_ERR_INVALID_DESCRIPTOR;
+ goto error;
+ }
+
+ ret = get_object_information(server_url, &file_size, &download_descriptor, &download_status);
+ if (ret != DM_OK) {
+ *fumo_return = FUMO_USER_CANCELLED;
+ download_status = DM_ERR_INVALID_DESCRIPTOR;
+ goto error;
+ } else {
+ if(download_descriptor->object_description != NULL) {
+ _DEBUG_INFO(" dd->object_description = %s \n", download_descriptor->object_description);
+ int vconf_result = 0;
+
+ vconf_result = vconf_set_str(DD_MULTI_LANGUAGE, download_descriptor->object_description);
+ if(vconf_result == 0) {
+ _DEBUG_VERBOSE("vconf_set_str() success %s [%s]!!", DD_MULTI_LANGUAGE, download_descriptor->object_description);
+ } else {
+ _DEBUG_VERBOSE("vconf_set_str() %s failed !!", DD_MULTI_LANGUAGE);
+ }
+ } else {
+ _DEBUG_INFO("dd->object_description is NULL");
+ }
+
+ if(download_descriptor->object_size != 0) {
+ _DEBUG_INFO(" dd->object_size = %d \n", download_descriptor->object_size);
+ int vconf_result = 0;
+
+ vconf_result = vconf_set_int(DD_OBJECT_SIZE, download_descriptor->object_size);
+ if(vconf_result == 0) {
+ _DEBUG_VERBOSE("vconf_set_int() success %s [%d]!!", DD_OBJECT_SIZE, download_descriptor->object_size);
+ } else {
+ _DEBUG_VERBOSE("vconf_set_int() %s failed !!", DD_OBJECT_SIZE);
+ }
+ } else {
+ _DEBUG_INFO("dd->object_size is NULL");
+ }
+ }
+ //
+
+
int noti_res;
_DEBUG_TRACE("waiting connect to server success in firmware download\n");
- noti_res = noti_download();
+ noti_res = noti_download(file_size);
_DEBUG_TRACE("download noti response : %d \n ", noti_res);
if (noti_res == RESPONSE_TYPE_OK) {
}
_DEBUG_TRACE("======================================================");
- _DEBUG_TRACE("object size %d\n", file_size);
+ _DEBUG_TRACE("object size [%d]\n", file_size);
+ _DEBUG_TRACE("wifi only config [%d]\n", config);
_DEBUG_TRACE("======================================================");
ret = __check_memory(file_size, memory_type);
+ //ret = DM_OVER_MEMORY_ERROR; // for memory not enough - UI testing
if (ret != DM_OK) {
noti_res = noti_memory_full((int)file_size);
if (noti_res == RESPONSE_TYPE_OK) {
}
download_status = DM_ERR_INSUFFICIENT_MEMORY;
*fumo_return = FUMO_USER_CANCELLED;
- ret = DM_OK;
+ //ret = DM_OK;
goto error;
}
int wifi_ret = 0;
wifi_ret = get_wifi_state();
_DEBUG_TRACE("wifi mode : %d", wifi_ret);
+ //wifi_ret = 4; // If delta size is big.. for wifi mode test
+ //_DEBUG_TRACE("wifi mode : %d", wifi_ret); // If delta size is big.. for wifi mode test
if (wifi_ret != 1) {
_DEBUG_TRACE("3g mode");
FUMO_State fumo_state = READY_TO_UPDATE;
ret = Get_Engine_Status(FUMO_SERVICE_ENGINE, &status);
+ _DEBUG_INFO("Get_Engine_Status [%d]", ret);
if (ret != DM_OK || status == NULL) {
*fumo_return = FUMO_USER_CANCELLED;
goto error;
}
+ _DEBUG_INFO("status->download_click [%d]", status->download_click);
switch (status->download_click) {
case RESUME_STATUS_INSTALL_BEFORE:
{
default:
{
ret = DM_RESUME_IDLE;
- goto returnpart;
_DEBUG_TRACE("----------------------------------------------------install later --------------------------------------------------------------------");
+ goto returnpart;
}
break;
}
return ret;
}
+static DM_ERROR _firmware_update_popup(int result)
+{
+ _INNER_FUNC_ENTER;
+
+ DM_ERROR ret = DM_OK;
+ _DEBUG_INFO("result [%d]", result);
+ int noti_res = 0;
+ noti_res = noti_update_result(result);
+ if (noti_res == RESPONSE_TYPE_OK) {
+ ret = DM_OK;
+ } else {
+ // error in noti-process
+ ret = COMMON_ERR_IPC;
+ }
+
+ _DEBUG_INFO(" end error : %d \n", ret);
+ _INNER_FUNC_EXIT;
+ return ret;
+}
+
DM_ERROR firmware_download_opeartion(char *full_path, FUMO_Error * fumo_return)
{
_EXTERN_FUNC_ENTER;
DM_ERROR ret = DM_OK;
int ipc_ret = 0;
int existed_sd;
- long double need_size = file_size * 2;
+// long double need_size = file_size * 2.1;
+ long double need_size = file_size + 1024*1024*3;
ret = compare_memory_space(FOTA_DELTA_INTERNAL_STORAGE, need_size);
ret = existed_sd_card_memory(&existed_sd);
if (existed_sd == 0 || ret != DM_OK) {
/* ui ->not existed sd card or make folder error */
- ipc_ret = noti_over_max_file_size();
+ ipc_ret = noti_over_max_file_size((int)file_size);
if (ipc_ret == RESPONSE_TYPE_OK) {
_DEBUG_VERBOSE("file size over the memory");
} else {
ret = compare_memory_space(FOTA_DELTA_SD_EXTERNAL_STORAGE, need_size);
if (ret == DM_MEMORY_ERROR) {
/* ui -> sd_card full */
- ipc_ret = noti_over_max_file_size();
+ ipc_ret = noti_over_max_file_size((int)file_size);
if (ipc_ret == RESPONSE_TYPE_OK) {
_DEBUG_VERBOSE("file size over the memory");
} else {
err = sync_agent_is_existing_fs(MAX_DELTA_FILE_SIZE);
/*define value when this is file not existed */
if (err == 0) {
- _DEBUG_VERBOSE("max file size : 50MB");
+ _DEBUG_INFO("max file size : 50MB");
*max_file_size = MAX_FILE_SIZE;
_INNER_FUNC_EXIT;
return DM_OK;
/*value when this is file existed */
err = sync_agent_read_whole_file(MAX_DELTA_FILE_SIZE, &required_contents, &size_return);
if (err == 1) {
- _DEBUG_VERBOSE("max file size : %s", required_contents);
+ _DEBUG_INFO("max file size : %s", required_contents);
err = chartoint(required_contents, max_file_size);
if (err == 1) {
_INNER_FUNC_EXIT;
return DM_OK;
} else {
- _DEBUG_VERBOSE("get max file size error");
+ _DEBUG_INFO("get max file size error");
_INNER_FUNC_EXIT;
return COMMON_ERR_IS_NULL;
}
} else {
- _DEBUG_VERBOSE("get max file size error");
+ _DEBUG_INFO("get max file size error");
_INNER_FUNC_EXIT;
return COMMON_ERR_IS_NULL;
}
- _DEBUG_VERBOSE("get max file size error");
+ _DEBUG_INFO("get max file size error");
_INNER_FUNC_EXIT;
return COMMON_ERR_IS_NULL;
int noti_res = 0;
int max_file_size = 0;
+ //file_size = 2042626049; // for testing..
ret = ___get_max_file_size(&max_file_size);
if (ret != DM_OK) {
- _DEBUG_VERBOSE("get max file size error");
+ _DEBUG_INFO("get max file size error");
ret = DM_WIFI_ONLY_ERROR;
goto error;
}
- _DEBUG_VERBOSE("file size = %d, max file size = %d", file_size, max_file_size);
+ _DEBUG_INFO("file size = %d, max file size = %d", file_size, max_file_size);
/*max_file_size = 0 (0 in file or not existed file)
* - can't use this option
* - this option is max file size define in file when 3g mode
*/
if (max_file_size != 0 && file_size > max_file_size) {
- noti_res = noti_over_max_file_size();
- _DEBUG_VERBOSE("noti over max file size : %d", noti_res);
+ noti_res = noti_over_max_file_size(file_size);
+ _DEBUG_INFO("noti over max file size : %d", noti_res);
- _DEBUG_VERBOSE("can't save current_size on 3g mode");
+ _DEBUG_INFO("can't save current_size on 3g mode");
ret = DM_WIFI_ONLY_ERROR;
goto error;
} else {
- _DEBUG_VERBOSE("save current size on 3g mode");
+ _DEBUG_INFO("save current size on 3g mode");
}
_INNER_FUNC_EXIT;
_INNER_FUNC_EXIT;
return ret;
}
+
+static DM_ERROR _checking_rooting_opeartion(char *value)
+{
+ _INNER_FUNC_ENTER;
+ DM_ERROR ret = DM_OK;
+
+ retvm_if((value) == NULL, COMMON_ERR_IS_NULL, "value is NULL!!");
+ _DEBUG_INFO("value [%s]", value);
+
+ if (strcmp(value, "T") == 0) {
+// if (strcmp(value, "F") == 0) { // for testing...
+
+ /* Device rooting check => if rooting status => return DM_ERR_COMMAND_NOT_ALLOWED , if not rooting status => return DM_OK */
+ //struct_cordon_status cordon_status;
+ //cordon_get_current_root_status(&cordon_status);
+ //_DEBUG_INFO("cordon_status.is_device_rooted [%d]", cordon_status.is_device_rooted);
+ //if(cordon_status.is_device_rooted == TRUE) {
+ // ret = DM_ERR_COMMAND_NOT_ALLOWED;
+ //} else {
+ ret = DM_OK; // DM_ERR_COMMAND_NOT_ALLOWED;
+ //}
+ } else {
+ ret = DM_OK;
+ }
+
+ _INNER_FUNC_EXIT;
+ _DEBUG_INFO("end ret : %d", ret);
+ return ret;
+}
#include <sys/un.h>
#include <fcntl.h>
#include <unistd.h>
+#include <vconf.h>
/*sync-agent*/
#include <sync_agent.h>
DM_ERROR ret = DM_OK;
retvm_if((out_message) == NULL, COMMON_ERR_IS_NULL, "out_message is NULL!!");
+ _DEBUG_INFO("out_message %d [%s]", outlen, out_message);
SanPackage *pSanPackage = NULL;
Event_Contents *ev_data = NULL;
return 1;
error:
- event_data_free((void *)ev_data);
+ if(ev_data != NULL) {
+ event_data_free((void *)ev_data);
+ }
free_sanpackageparser(pSanPackage);
_INNER_FUNC_EXIT;
_DEBUG_INFO("end error");
char *pushmessage = NULL;
//ip_push_struct->message = strdup("IPP_20111216000000000000000001|DM|Ft4/CLTiWx/Y0AK+fBIayALoAAAAlPcKeDZnMXExNHI3NQ==");
- pushmessage = (char *)user_data;
+ pushmessage = strdup((char *)user_data);
+ retvm_if((pushmessage) == NULL, -1, "pushmessage is NULL!!");
_DEBUG_INFO("user_data : %s", (char *)user_data);
_DEBUG_INFO("push contents : %s", pushmessage);
if (message != NULL) {
_DEBUG_INFO("DS event : %s", message);
ret = _send_event_ds(message);
- _EXTERN_FUNC_EXIT;
- return ret;
+ //_EXTERN_FUNC_EXIT;
+ //return ret;
+ goto error;
}
message = strchr(app_type, '|') + 1;
sleep(1);
//DB_Close();
_DEBUG_INFO("sync agent db close = %d", ret);
+
+ if(status != NULL) {
+ Free_Memory_Engine_Status(&status, 1);
+ }
+
_EXTERN_FUNC_EXIT;
return 1;
}
int client_len;
int client_sockfd;
struct sockaddr_un clientaddr;
- int event_type = 9;
+ int event_type = 11;
char *msg = NULL;
retvm_if((event_msg) == NULL, DM_ERR_EVENT_DS, "event_msg is NULL!!");
*/
int roaming_state = -1;
int call_state = -1;
+ int wifi_state = -1;
Event_Contents *pEvent_data = NULL;
int task_id;
get_roaming_state(&roaming_state);
+ get_wifi_connected_state(&wifi_state);
get_call_sate(&call_state);
+ /*
if (roaming_state == -1 || call_state == -1) {
_DEBUG_TRACE("NOT ROAMING OR CALL STATUS roaming state : %d , call state : %d", roaming_state, call_state);
ret = SYNC_AGENT_EC_TASK_ERROR_RUN_FAILED;
goto error;
}
+ */
+ if (call_state == -1) {
+ _DEBUG_TRACE("CALL STATUS call state : %d", call_state);
+ ret = SYNC_AGENT_EC_TASK_ERROR_RUN_FAILED;
+ goto error;
+ }
+ if ( (roaming_state == -1) && (wifi_state == -1) ) {
+ _DEBUG_TRACE("NOT ROAMING AND WiFi Status roaming state : %d , WiFi state : %d", roaming_state, wifi_state);
+ ret = SYNC_AGENT_EC_TASK_ERROR_RUN_FAILED;
+ goto error;
+ }
task_id = sync_agent_get_self_request_id();
_DEBUG_TRACE("task id ============================================ %d", task_id);
//for using fumo ui
//add_config_db_using_ui( task_id, pEvent_data->ui_mode);
- int is_exist;
+ int is_exist = 0;
is_exist = IsExist_Engine_id(FUMO_SERVICE_ENGINE);
+ _DEBUG_INFO("IsExist_Engine_id(FUMO_SERVICE_ENGINE) [%d]", is_exist);
if (is_exist == 0) {
engine_status status;
status->ui_mode = strdup(pEvent_data->ui_mode);
status->task_id = task_id;
status->ui_noti_type = get_default_noti_type(pEvent_data->ui_mode, pEvent_data->noti_type); //0;
- status->download_click = RESUME_STATUS_DONWLOAD_BEFORE;
+ //status->download_click = RESUME_STATUS_DONWLOAD_BEFORE; // 959 error fix about "download done -> softwareupdate retry clicked". ???
DB_Begin_Transaction();
ret = Update_Engine_Status(status);
_DEBUG_TRACE(" update engine status : %d \n", ret);
+ _DEBUG_TRACE(" status->download_click [%d] ", status->download_click);
DB_End_Transaction(TRANSACTION_COMMIT_);
if (status != NULL)
value = status->engine_status;
if (value != DM_BEFORE_BOOTSTRAP) {
- ret = dm_common_start(pEvent_data);
+ _DEBUG_INFO("status->ui_noti_type [%d] pEvent_data->noti_type [%d]", status->ui_noti_type, pEvent_data->noti_type);
+ if(pEvent_data->noti_type == NOTI_TYPE_POLLINTERACTION) {
+ } else {
+ ret = dm_common_start(pEvent_data);
+ }
} else {
//do popup ui
//retry factorybootstrap
int roaming_state = -1;
int call_state = -1;
+ int wifi_state = -1;
get_roaming_state(&roaming_state);
+ get_wifi_connected_state(&wifi_state);
get_call_sate(&call_state);
+ /*
if (roaming_state == -1 || call_state == -1) {
_DEBUG_TRACE("NOT ROAMING OR CALL STATUS roaming state : %d , call state : %d", roaming_state, call_state);
ret = SYNC_AGENT_EC_TASK_ERROR_RUN_FAILED;
goto error;
}
+ */
+ if (call_state == -1) {
+ _DEBUG_TRACE("CALL STATUS call state : %d", call_state);
+ ret = SYNC_AGENT_EC_TASK_ERROR_RUN_FAILED;
+ goto error;
+ }
+ if ( (roaming_state == -1) && (wifi_state == -1) ) {
+ _DEBUG_TRACE("NOT ROAMING AND WiFi Status roaming state : %d , WiFi state : %d", roaming_state, wifi_state);
+ ret = SYNC_AGENT_EC_TASK_ERROR_RUN_FAILED;
+ goto error;
+ }
+
int task_id;
task_id = sync_agent_get_self_request_id();
#include <stdio.h>
#include <aul.h>
+#include <vconf.h>
+#include <vconf-keys.h>
+
/*sync-agent*/
#include <sync_agent.h>
_INNER_FUNC_ENTER;
if (*ui_mode == NULL) {
+ _DEBUG_VERBOSE("ui mode is NULL");
if (input_string != NULL) {
+ _DEBUG_VERBOSE("input_string : %s", input_string);
if (strcmp(input_string, OMADM_ALERT_UI_TYPE) == 0 || strcmp(input_string, OMADM_FUMO_NOTI_UI_TYPE) == 0 || strcmp(input_string, OMADM_FUMO_UI_TYPE) == 0 || strcmp(input_string, OMADM_FUMO_BACKGROUND_UI_TYPE) == 0) {
*ui_mode = strdup(input_string);
}
} else {
_DEBUG_VERBOSE("ui mode : %s", *ui_mode);
- _DEBUG_VERBOSE("ui mode : %s", input_string);
+ _DEBUG_VERBOSE("input_string : %s", input_string);
if (input_string != NULL) {
if (strcmp(input_string, OMADM_ALERT_UI_TYPE) == 0 || strcmp(input_string, OMADM_FUMO_NOTI_UI_TYPE) == 0 || strcmp(input_string, OMADM_FUMO_UI_TYPE) == 0 || strcmp(input_string, OMADM_FUMO_BACKGROUND_UI_TYPE) == 0) {
int ui_ret = 1;
if (ui_mode != NULL) {
+ _DEBUG_INFO("ui_mode[%s], noti_type[%d]", ui_mode, noti_type);
+
if (strcmp(ui_mode, OMADM_FUMO_UI_TYPE) == 0) {
ui_ret = launch_oma_dm_fumo_ui();
_DEBUG_VERBOSE("fumo ui : %d", ui_ret);
} else if (strcmp(ui_mode, OMADM_FUMO_NOTI_UI_TYPE) == 0) {
- ui_ret = launch_om_dm_fumo_noti_ui(NOTI_TYPE_USERINTERACTION, NULL, NULL);
+ DM_ERROR ret_poll = DM_OK;
+ char *server_id = NULL;
+ ret_poll = get_Serverid(SAMSUNG_FUMO_TYPE, &server_id);
+ if (ret_poll!= DM_OK || server_id == NULL) {
+ ui_ret = launch_om_dm_fumo_noti_ui(NOTI_TYPE_USERINTERACTION, NULL, NULL);
+ } else {
+ ui_ret = launch_om_dm_fumo_noti_ui(NOTI_TYPE_USERINTERACTION, NULL, server_id);
+ free(server_id);
+ }
_DEBUG_VERBOSE("noti ui : %d", ui_ret);
} else if (strcmp(ui_mode, OMADM_FUMO_BACKGROUND_UI_TYPE) == 0) {
if (noti_type == NOTI_INSTALL) {
OPER_MODE operationMode = OPER_UNKNOWN;
NotI_Type noti_type = NOTI_TYPE_NOT_SPECIFIED;
- sync_agent_get_event_data_param(request, &ui_type);
+ sync_agent_get_event_data_param_int(request, (int*) &ui_type);
_DEBUG_VERBOSE("UI TYPE : %d\n", ui_type);
switch (ui_type) {
case FOTA_COMMON_UI:
_DEBUG_VERBOSE("common ui");
fota_ui_type = OMADM_FUMO_UI_TYPE;
- sync_agent_get_event_data_param(request, &task_id);
+ sync_agent_get_event_data_param_int(request, &task_id);
_DEBUG_VERBOSE("get task id : %d", task_id);
- sync_agent_get_event_data_param(request, &server_type);
+ sync_agent_get_event_data_param_int(request, (int*) &server_type);
ret = get_Serverid(server_type, &server_id);
//ret =get_Serverid(SAMSUNG_FUMO_TYPE , &server_id);
//ret =get_Serverid(GCF_TYPE , &server_id);
case FOTA_NOTI_UI:
_DEBUG_VERBOSE("noti ui");
fota_ui_type = OMADM_FUMO_NOTI_UI_TYPE;
- sync_agent_get_event_data_param(request, &session_id);
- sync_agent_get_event_data_param(request, &server_id);
+ sync_agent_get_event_data_param_str(request, &session_id);
+ sync_agent_get_event_data_param_str(request, &server_id);
_DEBUG_VERBOSE("get session id : %s", session_id);
_DEBUG_VERBOSE("get server id : %s", server_id);
operationMode = OPER_SERVER_INITIATION_FROM_IP;
case ADMIN_UI:
_DEBUG_VERBOSE("admin ui");
fota_ui_type = OMADM_ADMIN_UI_TYPE;
- sync_agent_get_event_data_param(request, &server_type);
+ sync_agent_get_event_data_param_int(request, (int*) &server_type);
ret = get_Serverid(server_type, &server_id);
_DEBUG_VERBOSE("get server id : %s : %d", server_id, ret);
operationMode = OPER_USER_INITIATION;
_DEBUG_VERBOSE(">>> >>> >>> Connect to server CANCELED !!!\n");
int task_id;
- sync_agent_get_event_data_param(request, &task_id);
+ sync_agent_get_event_data_param_int(request, &task_id);
_DEBUG_VERBOSE("task id : %d\n", task_id);
/*sync_agent_cancel_task(task_id); */
int response_type = 0;
RESUME_STATUS download_clicked = 0;
- sync_agent_get_event_data_param(request, &response_type);
+ sync_agent_get_event_data_param_int(request, &response_type);
_DEBUG_VERBOSE("DOWNLOAD BUTTON TYPE : %d\n", response_type);
ret = DB_Open();
int response_type = 0;
RESUME_STATUS download_clicked = 0;
- sync_agent_get_event_data_param(request, &response_type);
+ sync_agent_get_event_data_param_int(request, &response_type);
_DEBUG_VERBOSE("INSTALL BUTTON TYPE : %d\n", response_type);
ret = DB_Open();
EVENT_RESPONSE ev_response = EVENT_RESPONSE_OK;
int request_param = INTERVAL_CANCEL;
- sync_agent_get_event_data_param(request, &request_param);
- _DEBUG_VERBOSE("interval val from UI : %d\n", request_param);
+ sync_agent_get_event_data_param_int(request, &request_param);
+ _DEBUG_INFO("interval val from UI : %d\n", request_param);
switch (request_param) {
case RESPONSE_TYPE_REMINDER_INTERVAL_1_HOUR:
break;
}
- _DEBUG_VERBOSE(" interval val in fumo engine : %d\n", request_param);
+ _DEBUG_INFO(" interval val in fumo engine : %d\n", request_param);
if (request_param != INTERVAL_CANCEL) {
ret = fumo_schedule_task_request(request_param);
if (ret != DM_OK) {
goto error;
}
- _DEBUG_VERBOSE("fumo schedule task result : %d\n", ret);
+ _DEBUG_INFO("fumo schedule task result : %d\n", ret);
} else {
- _DEBUG_VERBOSE("fumo schedule cancel : %d \n", ret);
+/*
+ ret = fumo_schedule_task_request(request_param);
+ if (ret != DM_OK) {
+ goto error;
+ }
+*/
+ _DEBUG_INFO("fumo schedule cancel : %d \n", ret);
}
//2012.11.20
retvm_if((request) == NULL, 0, "request is NULL!!");
+ /*
+ DM_ERROR push_ret = DM_OK;
+ push_ret = register_fumo_ip_push();
+ if (push_ret == -1) {
+ _DEBUG_INFO("fail register fumo ip push : %d ", push_ret);
+ } else {
+ _DEBUG_INFO("success register fumo ip push : %d ", push_ret);
+ }
+ */
+
//2012.11.20
EVENT_RESPONSE ev_response = EVENT_RESPONSE_OK;
//temp code
int db_ret = 0;
db_ret = sync_agent_open_agent();
- _DEBUG_VERBOSE("OPEN DACI : %d", db_ret);
+ _DEBUG_INFO("OPEN DACI : %d", db_ret);
ret = register_fota_account();
- db_ret = sync_agent_close_agent();
- _DEBUG_VERBOSE("CLOSE DACI : %d", db_ret);
-
if (ret == 0) {
- _DEBUG_VERBOSE("fail register fota account : %d ", ret);
+ _DEBUG_INFO("fail register fota account : %d ", ret);
goto error;
} else {
- _DEBUG_VERBOSE("success register fota account : %d ", ret);
+ _DEBUG_INFO("success register fota account : %d ", ret);
+
+ char * str_version_url = NULL;
+ str_version_url = vconf_get_str(VERSION_URL_KEY);
+ if(str_version_url == NULL) {
+ _DEBUG_ERROR("vconf_get_str[%s] failed", VERSION_URL_KEY);
+ ret = EVENT_RESPONSE_FAIL;
+ _INNER_FUNC_EXIT;
+ goto error;
+ }
+ char * str_version_filename = NULL;
+ str_version_filename = vconf_get_str(VERSION_FILENAME_KEY);
+ if(str_version_filename == NULL) {
+ _DEBUG_ERROR("vconf_get_str[%s] failed", VERSION_FILENAME_KEY);
+ ret = EVENT_RESPONSE_FAIL;
+ goto error;
+ }
+
+ int exist_version = -1;
+ //ret = register_fota_polling(str_version_url, str_version_filename, &exist_version);
+ _DEBUG_INFO("exist_version [%d]", exist_version);
+
}
+ db_ret = sync_agent_close_agent();
+ _DEBUG_INFO("CLOSE DACI : %d", db_ret);
+
//2012.11.20
sync_agent_append_event_data_param(response, SYNC_AGENT_EVENT_PARAM_TYPE_INTEGER, &ev_response);
_INNER_FUNC_EXIT;
return 0;
+
error:
+ db_ret = sync_agent_close_agent();
+ _DEBUG_INFO("CLOSE DACI : %d", db_ret);
+
//2012.11.20
ev_response = EVENT_RESPONSE_FAIL;
sync_agent_append_event_data_param(response, SYNC_AGENT_EVENT_PARAM_TYPE_INTEGER, &ev_response);
sync_agent_dm_mo_error_e db_ret = SYNC_AGENT_DM_MO_SUCCESS;
char *server_id = NULL;
- sync_agent_get_event_data_param(request, &sv_type);
+ sync_agent_get_event_data_param_int(request, (int*) &sv_type);
_DEBUG_VERBOSE("server type : %d\n", sv_type);
db_ret = sync_agent_open_mo();
goto error;
}
//update 2012.11.20
- sync_agent_get_event_data_param(request, &sv_type);
+ sync_agent_get_event_data_param_int(request, (int*) &sv_type);
_DEBUG_VERBOSE("server profile type : %d", sv_type);
- sync_agent_get_event_data_param(request, &(dmaccount->server_url));
+ sync_agent_get_event_data_param_str(request, &(dmaccount->server_url));
_DEBUG_VERBOSE("server url : %s", (dmaccount->server_url));
- sync_agent_get_event_data_param(request, &(dmaccount->server_id));
+ sync_agent_get_event_data_param_str(request, &(dmaccount->server_id));
_DEBUG_VERBOSE("server id : %s", dmaccount->server_id);
- sync_agent_get_event_data_param(request, &(dmaccount->server_pw));
+ sync_agent_get_event_data_param_str(request, &(dmaccount->server_pw));
_DEBUG_VERBOSE("server_pw : %s", dmaccount->server_pw);
- sync_agent_get_event_data_param(request, &(dmaccount->user_id));
+ sync_agent_get_event_data_param_str(request, &(dmaccount->user_id));
_DEBUG_VERBOSE("user_id : %s", dmaccount->user_id);
- sync_agent_get_event_data_param(request, &(dmaccount->user_pw));
+ sync_agent_get_event_data_param_str(request, &(dmaccount->user_pw));
_DEBUG_VERBOSE("user_pw : %s", dmaccount->user_pw);
- sync_agent_get_event_data_param(request, &(dmaccount->user_auth_type));
+ sync_agent_get_event_data_param_str(request, &(dmaccount->user_auth_type));
_DEBUG_VERBOSE("user_auth_type : %s", dmaccount->user_auth_type);
- sync_agent_get_event_data_param(request, &(dmaccount->server_auth_type));
+ sync_agent_get_event_data_param_str(request, &(dmaccount->server_auth_type));
_DEBUG_VERBOSE("server_auth_type : %s", dmaccount->server_auth_type);
get_Serverid(sv_type, &server_id);
EVENT_RESPONSE ev_response = EVENT_RESPONSE_OK;
SERVICE_SERVER_TYPE sv_type = NO_ENGINE_TYPE;
- sync_agent_get_event_data_param(request, &sv_type);
+ sync_agent_get_event_data_param_int(request, (int*) &sv_type);
_DEBUG_VERBOSE("PROFILE TYPE : %d\n", sv_type);
switch (sv_type) {
*/
free_res_data(res_uic_data);
- sync_agent_get_event_data_param(request, &response_ret);
+ sync_agent_get_event_data_param_int(request, (int*) &response_ret);
_DEBUG_TRACE("response is %d", response_ret);
- sync_agent_get_event_data_param(request, &type);
+ sync_agent_get_event_data_param_int(request, (int*) &type);
_DEBUG_TRACE("uic type %d", type);
/*alloc reponse data */
case UIC_CONFIRMATION_TYPE:
break;
case UIC_INPUT_TEXT_TYPE:{
- sync_agent_get_event_data_param(request, &input_text);
+ sync_agent_get_event_data_param_str(request, &input_text);
_DEBUG_TRACE("input text %s", input_text);
res_uic_data->input_text = strdup(input_text);
break;
case UIC_SINGLE_CHOICE_TYPE:
case UIC_MULTIPLE_CHOICE_TYPE:{
- sync_agent_get_event_data_param(request, &count);
+ sync_agent_get_event_data_param_int(request, &count);
_DEBUG_TRACE("count is %d\n", count);
if (count != 0) {
for (i = 0; i < count; ++i) {
char *input = NULL;
char *value = NULL;
- sync_agent_get_event_data_param(request, &input);
+ sync_agent_get_event_data_param_str(request, &input);
_DEBUG_TRACE(" choice : %s", input);
if (input == NULL) {
input = strdup("NULL");
int ret = 1;
int wifi_only_param;
- sync_agent_get_event_data_param(request, &wifi_only_param);
+ sync_agent_get_event_data_param_int(request, &wifi_only_param);
sync_agent_open_agent();
ret = set_wifi_only_config(wifi_only_param);
CP_ERROR err = CP_ERROR_SUCCESS;
int ext_id = 0;
- sync_agent_get_event_data_param(request, &ext_id);
+ sync_agent_get_event_data_param_int(request, &ext_id);
_DEBUG_VERBOSE("ext id : %d", ext_id);
char *user_pin = NULL;
int response_type = RESPONSE_TYPE_NONE;
- sync_agent_get_event_data_param(request, &response_type);
+ sync_agent_get_event_data_param_int(request, &response_type);
_DEBUG_VERBOSE("response type : %d", response_type);
int response_value = 0;
if (response_type == RESPONSE_TYPE_OK) {
_DEBUG_VERBOSE("check pin code !!");
- sync_agent_get_event_data_param(request, &user_pin);
+ sync_agent_get_event_data_param_str(request, &user_pin);
_DEBUG_VERBOSE("user pin : %s", user_pin);
int is_correct = 0;
EVENT_RESPONSE ev_response = EVENT_RESPONSE_OK;
SERVICE_SERVER_TYPE sv_type = NO_ENGINE_TYPE;
- sync_agent_get_event_data_param(request, &sv_type);
+ sync_agent_get_event_data_param_int(request, (int*) &sv_type);
_DEBUG_VERBOSE("server type : %d\n", sv_type);
db_ret = sync_agent_open_mo();
_DEBUG_VERBOSE("dm status open : %d", db_ret);
ret = DB_Begin_Transaction();
- _DEBUG_VERBOSE("end transaction : %d", ret);
+ _DEBUG_VERBOSE("begin transaction : %d", ret);
switch (sv_type) {
//todo will change ipc refactoring
EVENT_RESPONSE ev_response = EVENT_RESPONSE_OK;
SERVICE_SERVER_TYPE sv_type = NO_ENGINE_TYPE;
- sync_agent_get_event_data_param(request, &sv_type);
+ sync_agent_get_event_data_param_int(request, (int*) &sv_type);
_DEBUG_VERBOSE("server type : %d\n", sv_type);
//mo db
return _IPC_noti(IPC_NOTI_TYPE_0, NOTI_ENGINE_START, 0, ui_mode, NULL);
}
-int noti_download()
+int noti_download(int file_size)
{
_EXTERN_FUNC_ENTER;
_DEBUG_INFO("-----------------------------------------------------------------------noti_connect_to_server-------------------------------------------------------------------------------------");
_EXTERN_FUNC_EXIT;
- return _IPC_noti(IPC_NOTI_TYPE_0, NOTI_DOWNLOAD, 0, NULL, NULL);
+ return _IPC_noti(IPC_NOTI_TYPE_0, NOTI_DOWNLOAD, file_size, NULL, NULL);
}
int noti_install()
return _IPC_noti(IPC_NOTI_TYPE_0, NOTI_LOW_BATTERY, 0, battery_level, NULL);
}
+int noti_update_result(int result)
+{
+ _EXTERN_FUNC_ENTER;
+ _DEBUG_INFO("-----------------------------------------------------------------------noti_update_result-------------------------------------------------------------------------------------");
+ _EXTERN_FUNC_EXIT;
+ return _IPC_noti(IPC_NOTI_TYPE_0, NOTI_UPDATE_RESULT, result, NULL, NULL);
+}
+
int alert_uic_display(uic_data * uic_value)
{
_EXTERN_FUNC_ENTER;
return _IPC_noti(IPC_NOTI_TYPE_0, NOTI_MEMORY_FULL, file_size, 0, 0);
}
-int noti_over_max_file_size()
+int noti_over_max_file_size(int file_size)
{
_EXTERN_FUNC_ENTER;
_DEBUG_INFO("-----------------------------------------------------------------------noti_over_max_file_size-------------------------------------------------------------------------------------");
_EXTERN_FUNC_EXIT;
- return _IPC_noti(IPC_NOTI_TYPE_0, NOTI_OVER_BIG_SIZE, 0, 0, 0);
+// return _IPC_noti(IPC_NOTI_TYPE_0, NOTI_OVER_BIG_SIZE, 0, 0, 0);
+ return _IPC_noti(IPC_NOTI_TYPE_0, NOTI_OVER_BIG_SIZE, file_size, 0, 0);
}
static int _IPC_noti(int noti_type, int noti_id, int input_param, char *input_string, void *user_data)
case NOTI_UNKNOWN:
break;
case NOTI_DOWNLOAD: //Type 0
+ {
+ _DEBUG_TRACE("download file size : %d", input_param);
+ sync_agent_append_event_data_param(noti, SYNC_AGENT_EVENT_PARAM_TYPE_INTEGER, &input_param);
+ }
break;
case NOTI_INSTALL: //Type 0
break;
break;
case NOTI_OVER_BIG_SIZE: //Type 0
{
- _DEBUG_TRACE("over max size");
+ _DEBUG_TRACE("over max size : %d", input_param);
+ sync_agent_append_event_data_param(noti, SYNC_AGENT_EVENT_PARAM_TYPE_INTEGER, &input_param);
}
break;
case NOTI_LOW_BATTERY: //Type 0
sync_agent_append_event_data_param(noti, SYNC_AGENT_EVENT_PARAM_TYPE_STRING, input_string);
}
break;
+ case NOTI_UPDATE_RESULT:
+ {
+ _DEBUG_TRACE("fota update result : %d", input_param);
+ sync_agent_append_event_data_param(noti, SYNC_AGENT_EVENT_PARAM_TYPE_INTEGER, &input_param);
+ }
+ break;
case NOTI_ALERT_DISPLAY: //Type 2, response event
case NOTI_ALERT_CONFIRMATION: //Type 2, response event
case NOTI_ALERT_INPUTTEXT: //Type 2, response event
#include <dbus/dbus.h>
//#include <appcore-common.h>
+#include <vconf.h>
+#include <wait.h>
+
/*sync-agent*/
#include <sync_agent.h>
_EXTERN_FUNC_EXIT;
}
+static int _system_command(const char *command)
+{
+ _EXTERN_FUNC_ENTER;
+
+ int pid = 0, status = 0;
+ char *const environ[] = { NULL };
+
+ retvm_if((command) == NULL, -1, "command is NULL!!");
+
+ pid = fork();
+ if (pid == -1) {
+ _DEBUG_INFO("ERROR : fork failed to create a process\n");
+ _EXTERN_FUNC_EXIT;
+ return -1;
+
+ } else if (pid == 0) {
+ char *argv[4];
+ argv[0] = "sh";
+ argv[1] = "-c";
+ argv[2] = (char *)command;
+ argv[3] = 0;
+
+ execve("/bin/sh", argv, environ);
+ abort();
+ } else {
+ do {
+ if (waitpid(pid, &status, 0) == -1) {
+ if (errno != EINTR) {
+ return -1;
+ }
+
+ } else {
+ _EXTERN_FUNC_EXIT;
+ return status;
+ }
+
+ } while (1);
+ }
+ _EXTERN_FUNC_EXIT;
+ return -1;
+}
+
+static void _confversion_check()
+{
+ _INNER_FUNC_ENTER;
+ char *value = NULL;
+ value = vconf_get_str("db/SyncML/oma-dm-service/DevManagement/ConfVersion");
+
+ if (value != NULL) {
+ if (strcmp(value, "") == 0) {
+ if (value != NULL)
+ free(value);
+ goto failed;
+ } else if(strncmp(value, "0.1", strlen("0.1")) == 0) {
+ _DEBUG_INFO("ConfVersion is same value existed!");
+ } else {
+ goto failed;
+ }
+ } else {
+ goto failed;
+ }
+
+ _INNER_FUNC_EXIT;
+ return ;
+
+ failed:
+ _DEBUG_INFO("ConfVersion is not same value existed !!");
+ int ret = _system_command("/usr/share/oma-dm-cfg/csc-setting/change_csc_value.sh");
+ if (ret != -1) {
+ _DEBUG_INFO("success");
+ } else {
+ _DEBUG_INFO("fail");
+ }
+ _INNER_FUNC_EXIT;
+ return ;
+}
+
int main()
{
_EXTERN_FUNC_ENTER;
// _DEBUG_INFO("[TIME] 2. main : %d msec\n", appcore_measure_time());
// appcore_measure_start();
xmlInitParser();
-
+ _confversion_check();
_register_dbus_service();
init_error = sync_agent_init("/usr/share/oma-dm-cfg/fw-init/omadm_fw_config.xml");
sync_agent_dm_mo_node_type_e mo_node_type3 = SYNC_AGENT_DM_MO_NODE_LEAF;
char *mo_full_path4 = DM_DEVINFO_MOD;
- char *value4 = "GT-I9500";
+ char *value4 = "GT-I8800";
sync_agent_dm_mo_node_type_e mo_node_type4 = SYNC_AGENT_DM_MO_NODE_LEAF;
char *mo_full_path5 = DM_DEVINFO_DMV;
sync_agent_dm_mo_node_type_e mo_node_type9 = SYNC_AGENT_DM_MO_NODE_LEAF;
char *mo_full_path10 =DM_DEVINFO_HWV;
- char *value10 ="GT-I9500";
+ char *value10 ="GT-I8800";
sync_agent_dm_mo_node_type_e mo_node_type10 = SYNC_AGENT_DM_MO_NODE_LEAF;
char *mo_full_path11 =DM_DEVINFO_LRGOBJ;
err = sync_agent_get_serverinfo(&server_info);
if (err != SYNC_AGENT_DM_MO_SUCCESS) {
_DEBUG_INFO("get server info : %d", err);
+ if(server_info != NULL) {
+ free(server_info);
+ }
return COMMON_ERR_IS_NULL;
}
err_code = sync_agent_update_mo_item(mo_node);
//err_code = sync_agent_update_mo(mo_node);
if (err_code == SYNC_AGENT_DM_MO_SUCCESS) {
- _DEBUG_INFO(" Success to sync_agent_update_mo()\n");
+ _DEBUG_INFO(" Success to sync_agent_update_mo_item()\n");
} else {
- _DEBUG_INFO(" Failed to sync_agent_update_mo()\n");
+ _DEBUG_INFO(" Failed to sync_agent_update_mo_item()\n");
goto error;
}
int isFinal = 1;
/*Client init */
- if (pSession_id == NULL)
- pSession_id = g_strdup_printf("%ld", time(NULL));
+ if (pSession_id == NULL) {
+ //pSession_id = g_strdup_printf("%ld", time(NULL));
+ pSession_id = g_strdup_printf("%ld", time(NULL)%10000);
+ _DEBUG_INFO("pSession_id [%s]", pSession_id);
+ } else {
+ _DEBUG_INFO("pSession_id [%s]", pSession_id);
+ }
char *sourceUrl = NULL;
char *client_id = NULL;
if (nextNonce == NULL) {
(nextNonce) = strdup(ELEMENT_DEFAULT_CLIENT_NONCE);
}
-
+ _DEBUG_INFO("pServer_id [%s] , pSession_id [%s]", pServer_id, pSession_id);
if ((*session) == NULL) {
ret = create_syncml_session(VERSION_12, PROTOCOL_TYPE_DM, pServer_id, client_id, pSession_id, sourceUrl, targetUrl, session);
if (ret != DM_OK)
/*SyncBody */
/* create alert */
AlertType syncType;
+ _DEBUG_INFO("session_type [%d]", session_type);
switch (session_type) {
case 0: //IP_PUSH_EVENT
case 1: //WAP_PUSH_EVENT
goto error;
putCmdIntoList(&commands, &commands_last, pReplaceCommand);
+
+
+ /* create generic alert for polling & user init */
+ //Command *pAlertDownloadUpdateCommand = NULL;
+ //Item *pItem = NULL;
+ char *rSourceUrl = NULL;
+ char *format = NULL;
+ char *contenttype = NULL;
+ char *data = NULL;
/*create SyncML */
SyncML *pSyncML = NULL;
ret = create_syncml(pSyncHdr, NULL, commands, isFinal, &pSyncML);
(*session)->isSendingfinal = isFinal;
+
+ str_free(&rSourceUrl);
+ str_free(&format);
+ str_free(&contenttype);
+ str_free(&data);
+
+
_INNER_FUNC_EXIT;
return ret;
error:
_DEBUG_TRACE(" error : %d\n", ret);
+
+
+ str_free(&rSourceUrl);
+ str_free(&format);
+ str_free(&contenttype);
+ str_free(&data);
+
+
_INNER_FUNC_EXIT;
return ret;
}
pSyncML = NULL;
_DEBUG_TRACE(" error :%d\n", ret);
+ syncml_binder_terminate(pBinder);
_INNER_FUNC_EXIT;
return ret;
pSession_id = (*session)->sessionID;
}
} else if (pSession_id == NULL) {
- pSession_id = g_strdup_printf("%ld", time(NULL));
+ //pSession_id = g_strdup_printf("%ld", time(NULL));
+ pSession_id = g_strdup_printf("%ld", time(NULL)%10000);
+ _DEBUG_INFO("generate from time -> pSession_id [%s]", pSession_id);
}
-
+ _DEBUG_INFO("pSession_id [%s]", pSession_id);
ret = __get_dmaccInfo(pServer_id, &client_id, &client_pwd, &sourceUrl, &targetUrl, &isBase64, &nextNonce);
if (ret != DM_OK)
//it can be only happend when server required MD5 authentication(we send basic authentication every time by default)
msg = NULL;
msg_size = 0;
+ if( pSession_id != NULL ) {
+ _DEBUG_INFO("pSession_id [%s]", pSession_id);
+ } else {
+ _DEBUG_INFO("pSession_id is NULL");
+ }
+
ret = _generate_setupphase_msg(session, pServer_id, pSession_id, session_type, &msg, &msg_size);
if (ret != DM_OK)
goto error;
file_count++;
char file_name[1000];
/*debuging */
- snprintf(file_name, (int)sizeof(file_name), "/opt/data/oma-dm-cfg/packet/wbxml_send_msg_%d.wbxml", file_count);
+ snprintf(file_name, (int)sizeof(file_name), "/opt/data/oma-dm-cfg/packet/wbxml_msg_%d_send.wbxml", file_count);
_DEBUG_INFO("file name : %s", file_name);
sync_agent_write_whole_file(file_name, msg, msg_size, true);
if (ret != DM_OK)
goto error;
/*debuging */
- snprintf(file_name, (int)sizeof(file_name), "/opt/data/oma-dm-cfg/packet/wbxml_receivce_msg_%d.wbxml", file_count);
+ file_count++;
+ snprintf(file_name, (int)sizeof(file_name), "/opt/data/oma-dm-cfg/packet/wbxml_msg_%d_receivced.wbxml", file_count);
_DEBUG_INFO("file name : %s", file_name);
sync_agent_write_whole_file(file_name, recv_msg, recv_msg_size, true);
/*for debuging */
file_count++;
char file_name[1000];
- snprintf(file_name, (int)sizeof(file_name), "/opt/data/oma-dm-cfg/packet/wbxml_management_send_msg_%d.wbxml", file_count);
+ snprintf(file_name, (int)sizeof(file_name), "/opt/data/oma-dm-cfg/packet/wbxml_msg_%d_management_send.wbxml", file_count);
_DEBUG_INFO("file name : %s", file_name);
sync_agent_write_whole_file(file_name, msg, msg_size, true);
goto error;
/*for debuging */
- snprintf(file_name, (int)sizeof(file_name), "/opt/data/oma-dm-cfg/packet/wbxml_management_receivce_msg_%d.wbxml", file_count);
+ file_count++;
+ snprintf(file_name, (int)sizeof(file_name), "/opt/data/oma-dm-cfg/packet/wbxml_msg_%d_management_receivced.wbxml", file_count);
_DEBUG_INFO("file name : %s", file_name);
sync_agent_write_whole_file(file_name, recvMsg, recvMsg_size, true);
if (ret != DM_OK)
goto error;
+ file_count++;
snprintf(file_name, (int)sizeof(file_name), "/opt/data/oma-dm-cfg/packet/wbxml_generic_receivce_msg_%d.wbxml", file_count);
_DEBUG_INFO("file name : %s", file_name);
sync_agent_write_whole_file(file_name, recvMsg, recvMsg_size, true);
return 0;
}
useragent->key = "User-Agent";
- useragent->value = "Samsung electronics GT-I9500 SyncML_DM Client";
+ useragent->value = "Samsung electronics GT-I8800 SyncML_DM Client";
*list = g_list_append(*list, useragent);
_DEBUG_INFO(" user agent\n");
DM_ERROR ret = DM_OK;
retvm_if((locURI) == NULL, COMMON_ERR_INTERNAL_NO_MEMORY, "locURI is NULL!!");
- _DEBUG_INFO("start with locURI = %s, locName = %s\n", locURI, locName);
+ _DEBUG_INFO("start with locURI = %s", locURI);
+
+ if(locName != NULL){
+ _DEBUG_INFO("locName = %s", locName);
+ }
*pLocation = (Location *) calloc(1, sizeof(Location) + 1);
if (*pLocation == NULL) {
_DEBUG_TRACE("ACL PERMISSION");
ret = check_mo_scope(targetUrl);
if (ret != DM_OK) {
- resultStatus = ret;
- goto error;
+ //resultStatus = ret;
+ //goto error;
+ ret = replace_itemtomo(item); // Permanent node. But Accesstype is allow.
+ if (ret != DM_OK) {
+ goto error;
+ } else { // Permanent node. But device need execution about replace cmd.
+ char *server_id = NULL;
+ targetUrl = get_location_locuri(item->target);
+ server_id = session->pServer_id;
+ //ret = engine_replace_start(server_id, targetUrl, &(session->service_engine_id), &resultStatus, item);
+ //resultStatus = DM_ERR_COMMAND_NOT_ALLOWED;
+ }
} else {
ret = replace_itemtomo(item);
if (ret != DM_OK)
retvm_if((pSyncML) == NULL, COMMON_ERR_INTERNAL_NOT_DEFINED, "pSyncML is NULL!!");
sync_agent_pb_protocol_binder_function_set_s *pBinder_function_set = NULL;
+ sync_agent_pb_protocol_binder_info_s *pBinder = NULL;
sync_agent_pb_error_e err = init_syncml_binder_function_set(&pBinder_function_set);
if (err != SYNC_AGENT_PB_RETURN_OK) {
goto error;
}
- sync_agent_pb_protocol_binder_info_s *pBinder = NULL;
pBinder = syncml_binder_init(pBinder, SYNC_AGENT_PB_ENCODING_WBXML_12, false, true, pBinder_function_set);
err = syncml_binder_append(pBinder, PE_SYNCML_START, NULL);
error:
_DEBUG_INFO("error end %d \n", ret);
+
+ if(pBinder != NULL) {
+ syncml_binder_terminate(pBinder);
+ }
+
_EXTERN_FUNC_EXIT;
return ret;
}
#define CSC_VCONF_KEY_SYNCMLDM_SERVPWD "db/SyncML/oma-dm-service/DevManagement/%d/ServPwd"
#define CSC_VCONF_KEY_SYNCMLDM_PASSWORD "db/SyncML/oma-dm-service/DevManagement/%d/Password"
+#define CSC_VCONF_KEY_SYNCMLDM_USERNAME "db/SyncML/oma-dm-service/DevManagement/%d/UserName"
+#define CSC_VCONF_KEY_SYNCMLDM_CLIENTPWD "db/SyncML/oma-dm-service/DevManagement/%d/ClientPwd"
+
+
//#define CSC_GCF_SERVER_NUM 3
#define CSC_GCF_SERVER_NUM 1
#define ALTER_SYNCMLDM_SERVID "RSate"
#define ALTER_SYNCMLDM_SERVNONCE "12345"
#define ALTER_SYNCMLDM_SERVPORT 80
-#define ALTER_SYNCMLDM_SERVPWD "T1NQIERNIFNlcnZlcg=="
+#define ALTER_SYNCMLDM_SERVPWD "RSatepass"
#define ALTER_SYNCMLDM_PASSWORD ""
+#define ALTER_SYNCMLDM_USERNAME "RSuser"
+#define ALTER_SYNCMLDM_CLIENTPWD "RSpass"
+
#define SERVER_NUM 1
static int _get_index(const char *name);
retvm_if((mo_full_path) == NULL, -1, "mo_full_path is NULL!!");
retvm_if((mo_name) == NULL, -1, "mo_name is NULL!!");
- _DEBUG_INFO("mo_name : %s", mo_name);
+ _DEBUG_INFO("dmacc-gcf mo_full_path : %s", mo_full_path);
+ _DEBUG_INFO("dmacc-gcf mo_name : %s", mo_name);
*mo_value = NULL;
int n_index = _get_index(ALTER_SYNCMLDM_ACCNAME);
}
} else if (!strcmp(mo_full_path, "./DMAcc/gcf/AppAuth/ServerAppAuth/AAuthSecret")) {
- /* *mo_value = __get_MO_Value_STR(CSC_VCONF_KEY_SYNCMLDM_SERVPWD, nIndex);
- if((*mo_value) == NULL) {
- *mo_value = strdup(ALTER_SYNCMLDM_SERVPWD);
- } */
+ /* for gcf - start */
+ *mo_value = _get_mo_value_str(CSC_VCONF_KEY_SYNCMLDM_SERVPWD, n_index);
+ if((*mo_value) == NULL) {
+ *mo_value = strdup(ALTER_SYNCMLDM_SERVPWD);
+ }
+ /* for gcf - end */
+ /*
char *device_id = NULL;
if (func_get_dev_info != 0) {
func_get_dev_info(2, "DevID", &device_id);
free(device_id);
free(server_id);
-
+ */
} else if (!strcmp(mo_full_path, "./DMAcc/gcf/AppAuth/ServerAppAuth/AAuthData")) {
*mo_value = _get_mo_value_str(CSC_VCONF_KEY_SYNCMLDM_SERVNONCE, n_index);
if ((*mo_value) == NULL) {
}
} else if (!strcmp(mo_full_path, "./DMAcc/gcf/AppAuth/ClientAppAuth/AAuthName")) {
+ /* for gcf - start */
+ *mo_value = _get_mo_value_str(CSC_VCONF_KEY_SYNCMLDM_USERNAME, n_index);
+ if ((*mo_value) == NULL) {
+ *mo_value = strdup(ALTER_SYNCMLDM_USERNAME);
+ _set_mo_value_str(CSC_VCONF_KEY_SYNCMLDM_USERNAME, n_index, ALTER_SYNCMLDM_USERNAME);
+ }
+ /* for gcf - end */
+ /*
char *device_id = NULL;
if (func_get_dev_info != NULL) {
func_get_dev_info(2, "DevID", &device_id);
free(device_id);
free(server_id);
-
+ */
/* *mo_value = strdup("IMEI:357584040054001"); */
} else if (!strcmp(mo_full_path, "./DMAcc/gcf/AppAuth/ClientAppAuth/AAuthSecret")) {
-
+ /* for gcf - start */
+ *mo_value = _get_mo_value_str(CSC_VCONF_KEY_SYNCMLDM_CLIENTPWD, n_index);
+ if((*mo_value) == NULL) {
+ *mo_value = strdup(ALTER_SYNCMLDM_CLIENTPWD);
+ }
+ /* for gcf - end */
+ /*
char *device_id = NULL;
if (func_get_dev_info != NULL) {
func_get_dev_info(2, "DevID", &device_id);
free(device_id);
free(server_id);
-
+ */
} else if (!strcmp(mo_full_path, "./DMAcc/gcf/AppAuth/ClientAppAuth/AAuthData")) {
*mo_value = _get_mo_value_str(CSC_VCONF_KEY_SYNCMLDM_CLIENTNONCE, n_index);
if ((*mo_value) == NULL) {
_EXTERN_FUNC_ENTER;
}
-
+/*
static int _system_command(const char *command)
{
_EXTERN_FUNC_ENTER;
_EXTERN_FUNC_EXIT;
return -1;
}
+*/
static int _get_index(const char *name)
{
int n_acc_count = 0;
if (vconf_get_int(CSC_VCONF_KEY_SYNCMLDM_NBFIELD, &n_acc_count)) {
_DEBUG_TRACE("vconf_get_int FAIL");
- //// return -1;
- //n_acc_count =ALTER_SYNCMLDM_NBFIELD;
- //_set_mo_value_int(CSC_VCONF_KEY_SYNCMLDM_NBFIELD, CSC_GCF_SERVER_NUM, ALTER_SYNCMLDM_NBFIELD);
+ // return -1;
+ n_acc_count =ALTER_SYNCMLDM_NBFIELD;
+ _set_mo_value_int(CSC_VCONF_KEY_SYNCMLDM_NBFIELD, CSC_GCF_SERVER_NUM, ALTER_SYNCMLDM_NBFIELD);
//////// CSC don't include vconf value.
- int ret = _system_command("/usr/share/oma-dm-cfg/csc-setting/change_csc_value.sh");
- if (ret != -1) {
- _DEBUG_INFO("success");
- } else {
- _DEBUG_INFO("fail");
- }
+ //int ret = _system_command("/usr/share/oma-dm-cfg/csc-setting/change_csc_value.sh");
+ //if (ret != -1) {
+ // _DEBUG_INFO("success");
+ //} else {
+ // _DEBUG_INFO("fail");
+ //}
n_acc_count = ALTER_SYNCMLDM_NBFIELD;
}
#define LOG_TAG "PLUGIN_DEVICE_SLP_DM"
#endif
-#define DELTA_FILE "delta_hash.txt"
static sync_agent_execute_dev_cb func_execute_dev_function_common = 0;
static sync_agent_dev_return_e __convert_service_err_to_common_error(int service_err);
/*static int __find_file_list(const char *folder_path, GSList **file_list);*/
static int ___find_file(const char *folder_path, const char **file_path);
-static int ___check_filename_md5(char *folder_path, char *file_buffer);
-static int ___check_fimware_delta_validation(char *save_folder);
static int __control_fimware_delta_file(int memory_type);
static int ___get_download_save_folder(int memory_type, char **download_folder, char **save_folder);
}
_DEBUG_TRACE("control firmware delta file : %d \n", service_ret);
- service_ret = slp_device_ctrl_set_fota_flag();
- if (service_ret != 0) {
- _DEBUG_TRACE("slp_device_ctrl_set_FOTA_flag() Fail");
+ int try_count = 0;
+ for( try_count = 0 ; try_count < 5 ; try_count++) {
+ service_ret = slp_device_ctrl_set_fota_flag();
+ if (service_ret != 0) {
+ _DEBUG_TRACE("slp_device_ctrl_set_FOTA_flag() Fail");
+ usleep(400000);
+ } else {
+ _DEBUG_TRACE("slp_device_ctrl_set_FOTA_flag() Success");
+ _INNER_FUNC_EXIT;
+ return __convert_service_err_to_common_error(1);
+ }
}
error:
_INNER_FUNC_EXIT;
- return __convert_service_err_to_common_error(service_ret);
+ return __convert_service_err_to_common_error(0);
}
static int _execute_dev_fota_update_result(int *plugin_err)
return ret;
}
-static int ___check_filename_md5(char *folder_path, char *file_buffer)
-{
- _INNER_FUNC_ENTER;
- int ret = 1;
-
- retvm_if((folder_path) == NULL, -1, "folder_path is NULL!!");
- retvm_if((file_buffer) == NULL, -1, "file_buffer is NULL!!");
-
- _DEBUG_VERBOSE(" check_file_folder : %s", folder_path);
- _DEBUG_VERBOSE(" check_file : %s", file_buffer);
-
- bool isSame = false;
- char *check_segment = NULL;
- char *find_file_name = NULL;
- unsigned char *find_md5_word = NULL;
- char *file_path = NULL;
-
- GSList *filename_md5 = NULL;
- GSList *filename_md5_iter = NULL;
-
- const char *delimiter = ":\t\n ";
- /*check_segment = strtok(file_buffer, ":\t\n "); */
- check_segment = strtok(file_buffer, delimiter);
- _DEBUG_VERBOSE(" check_segment : %s", check_segment);
- filename_md5 = g_slist_append(filename_md5, check_segment);
-
- while (check_segment != NULL) {
- /*check_segment = strtok(NULL, ":\t\n "); */
- check_segment = strtok(NULL, delimiter);
- if (check_segment == NULL)
- break;
- filename_md5 = g_slist_append(filename_md5, check_segment);
-
- _DEBUG_VERBOSE(" check file : %s", check_segment);
- }
-
- for (filename_md5_iter = filename_md5; filename_md5_iter != NULL; filename_md5_iter = g_slist_next(filename_md5_iter)) {
- if ((filename_md5_iter->data) == NULL) {
- ret = -1;
- goto error;
- }
-
- find_file_name = (char *)(filename_md5_iter->data);
- filename_md5_iter = g_slist_next(filename_md5_iter);
- find_md5_word = (unsigned char *)(filename_md5_iter->data);
- _DEBUG_VERBOSE(" find_file_name : %s, find_md5 : %s", find_file_name, find_md5_word);
-
- file_path = g_strdup_printf("%s/%s", folder_path, find_file_name);
- ret = sync_agent_is_existing_fs(file_path);
- if (ret != 1) {
- goto error;
- }
-
- ret = sync_agent_file_md5_validation(file_path, (char *)find_md5_word, &isSame);
- if (ret != 1 || (ret == 1 && isSame == false))
- goto error;
- }
-
- _INNER_FUNC_EXIT;
- return ret;
- error:
- _DEBUG_VERBOSE(" end error : %d", ret);
- _INNER_FUNC_EXIT;
- return ret;
-}
-
-static int ___check_fimware_delta_validation(char *save_folder)
-{
- _INNER_FUNC_ENTER;
-
- retvm_if((save_folder) == NULL, -1, "save_folder is NULL!!");
-
- int ret = 0;
- char *required_contents = NULL;
- unsigned long required_length = 0;
- char *file_path = NULL;
- bool isFinal;
-
- file_path = g_strdup_printf("%s/%s", save_folder, DELTA_FILE);
- _DEBUG_VERBOSE(" file_path : %s", file_path);
-
- ret = sync_agent_read_whole_file(file_path, &required_contents, &required_length);
- if (ret != 1)
- goto error;
- _DEBUG_VERBOSE(" file read is %d, required_length is %d ", ret, required_length);
- _DEBUG_VERBOSE(" file read is %d, isFinal is %d ", ret, isFinal);
- _DEBUG_VERBOSE(" file content is %s ", required_contents);
-
- ret = ___check_filename_md5(save_folder, required_contents);
- if (ret != 1)
- goto error;
-
- ret = sync_agent_free_file(&required_contents);
- if (ret != 1)
- goto error;
-
- _INNER_FUNC_EXIT;
- return ret;
-
- error:
-
- _DEBUG_VERBOSE(" end error : %d \n", ret);
- _INNER_FUNC_EXIT;
- return ret;
-}
static int __control_fimware_delta_file(int memory_type)
{
} else {
_DEBUG_VERBOSE(" Success to call sync_agent_uncompress()");
}
-
- ret = ___check_fimware_delta_validation(save_folder);
- if (ret != 1)
- goto error;
-
int fs_error;
fs_error = sync_agent_empty_directory_contents(download_folder);
_DEBUG_INFO("malloc fail \n");
_EXTERN_FUNC_EXIT;
return 400;
+ } else {
+ memset(str_result, 0, lSize+1);
}
result = fread(str_result, 1, lSize, file_des);
}
struct utsname buf;
- uname(&buf);
+ int uname_result = 0;
+ uname_result = uname(&buf);
+ if(uname_result != 0 ) {
+ snprintf(kernel_version, _D_SIZE_128_ - 1, "%s.%s", "K", "3.4.5");
+
+ _DEBUG_INFO("uname failed - kernel_version [%s]", kernel_version);
+ _EXTERN_FUNC_EXIT;
+ return kernel_version;
+ }
snprintf(kernel_version, _D_SIZE_128_ - 1, "%s.%s", "K", buf.release);