summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x[-rw-r--r--]debian/changelog562
-rwxr-xr-xgbs_build.sh17
-rwxr-xr-xinclude/common/dm_common.h199
-rwxr-xr-xinclude/common/dm_common_def.h9
-rwxr-xr-xinclude/common/dm_error.h3
-rwxr-xr-xinclude/dm-engine/dl-manager/dd_object.h2
-rwxr-xr-xinclude/dm-engine/dm_common_engine.h32
-rwxr-xr-xinclude/dm-engine/fumo/fumo_account.h5
-rwxr-xr-xinclude/dm-engine/fumo/fumo_engine.h28
-rwxr-xr-xinclude/dm-engine/lawmo/lawmo_engine.h28
-rwxr-xr-xinclude/framework/platform-event-handler/dm_platform_event_handler_internal.h6
-rwxr-xr-xinclude/framework/task/oma_dm_task_spec.h8
-rwxr-xr-xinclude/framework/ui-event-handler/ipc_agent.h33
-rwxr-xr-xinclude/framework/ui-event-handler/ipc_common.h39
-rwxr-xr-xinclude/mo-handler/dm_mo_common_internal.h6
-rwxr-xr-xoma-dm-agent.manifest9
-rwxr-xr-xoma-dm-cfg/csc-setting/change_csc_value.sh5
-rwxr-xr-x[-rw-r--r--]oma-dm-cfg/ddf/slp/slp_devdetail_ddf.xml2
-rwxr-xr-x[-rw-r--r--]oma-dm-cfg/ddf/slp/slp_devinfo_ddf.xml2
-rwxr-xr-xoma-dm-cfg/ddf/slp/slp_fumo_ddf.xml24
-rwxr-xr-xoma-dm-cfg/ddf/slp/slp_gcf_dmacc_ddf_1.2.xml2
-rwxr-xr-xoma-dm-cfg/ddf/slp/slp_lawmo_pcw_ddf.xml2
-rwxr-xr-x[-rw-r--r--]oma-dm-cfg/ipc/noticonfig_omadm3
-rwxr-xr-xpackaging/oma-dm-agent.spec59
-rwxr-xr-xsrc/agent/common/dm-status/oma_dm_status_db_handler.c3
-rwxr-xr-xsrc/agent/common/dm_common.c64
-rwxr-xr-xsrc/agent/dm-engine/cp/dm_cp_parser.c21
-rwxr-xr-x[-rw-r--r--]src/agent/dm-engine/dl-manager/dd_parser.c25
-rwxr-xr-x[-rw-r--r--]src/agent/dm-engine/dl-manager/fw_downloader.c26
-rwxr-xr-xsrc/agent/dm-engine/dl-manager/sa_fw_downloader.c47
-rwxr-xr-xsrc/agent/dm-engine/dm_common_engine.c61
-rwxr-xr-x[-rw-r--r--]src/agent/dm-engine/fumo/fumo_engine.c214
-rwxr-xr-xsrc/agent/framework/platform-event-handler/dm_platform_event_handler.c21
-rwxr-xr-x[-rw-r--r--]src/agent/framework/task/oma_dm_task_spec.c41
-rwxr-xr-xsrc/agent/framework/ui-event-handler/ipc_agent.c174
-rwxr-xr-xsrc/agent/main.c82
-rwxr-xr-xsrc/agent/mo-handler/dm_mo_common.c7
-rwxr-xr-xsrc/agent/mo-handler/dm_mo_handler.c4
-rwxr-xr-xsrc/agent/serviceadapter/dm-phase-handler/dm_phase_handler.c60
-rwxr-xr-x[-rw-r--r--]src/agent/serviceadapter/networkbinder/na_binder.c2
-rwxr-xr-x[-rw-r--r--]src/agent/serviceadapter/sa_elements.c6
-rwxr-xr-x[-rw-r--r--]src/agent/serviceadapter/sa_session.c14
-rwxr-xr-x[-rw-r--r--]src/agent/serviceadapter/sa_syncml_binders.c7
-rwxr-xr-xsrc/plugins/dm-private/dmacc-gcf/src/plugin_interface.c66
-rwxr-xr-xsrc/plugins/dm-private/slp-device-dm/src/plugin_interface_devexe.c129
-rwxr-xr-xsrc/plugins/dm-private/slp-device-dm/src/plugin_slp_device_ctrl.c2
-rwxr-xr-xsrc/plugins/dm-private/slp-device-dm/src/plugin_slp_device_info.c10
47 files changed, 1827 insertions, 344 deletions
diff --git a/debian/changelog b/debian/changelog
index 32cd457..a1e203f 100644..100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,565 @@
+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
diff --git a/gbs_build.sh b/gbs_build.sh
new file mode 100755
index 0000000..516e1ea
--- /dev/null
+++ b/gbs_build.sh
@@ -0,0 +1,17 @@
+#!/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
+
+
diff --git a/include/common/dm_common.h b/include/common/dm_common.h
index 56ef319..51fec66 100755
--- a/include/common/dm_common.h
+++ b/include/common/dm_common.h
@@ -388,6 +388,92 @@ DM_ERROR set_account_registration_alarm(char *alarm_str, CONFIG_TYPE alarm_type)
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
*
*
@@ -868,6 +954,31 @@ DM_ERROR compare_memory_space(char *memory_type, long double file_size);
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
*
*
@@ -1072,4 +1183,92 @@ int get_default_noti_type(char *ui_mode, NotI_Type noti_type);
*/
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_ */
diff --git a/include/common/dm_common_def.h b/include/common/dm_common_def.h
index dcd0fff..a7fd4fa 100755
--- a/include/common/dm_common_def.h
+++ b/include/common/dm_common_def.h
@@ -57,7 +57,7 @@
/*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"
@@ -107,6 +107,9 @@
#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"
@@ -130,7 +133,9 @@ typedef enum {
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;
/*
diff --git a/include/common/dm_error.h b/include/common/dm_error.h
index 109e6ce..c359e26 100755
--- a/include/common/dm_error.h
+++ b/include/common/dm_error.h
@@ -141,6 +141,9 @@ typedef enum {
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,
diff --git a/include/dm-engine/dl-manager/dd_object.h b/include/dm-engine/dl-manager/dd_object.h
index 6564e77..503ba1c 100755
--- a/include/dm-engine/dl-manager/dd_object.h
+++ b/include/dm-engine/dl-manager/dd_object.h
@@ -45,7 +45,7 @@ typedef struct {
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;
diff --git a/include/dm-engine/dm_common_engine.h b/include/dm-engine/dm_common_engine.h
index 0a8f0a1..1809c4c 100755
--- a/include/dm-engine/dm_common_engine.h
+++ b/include/dm-engine/dm_common_engine.h
@@ -26,6 +26,9 @@
#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
@@ -111,6 +114,35 @@ void init_Dm_Engine();
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
*
*
diff --git a/include/dm-engine/fumo/fumo_account.h b/include/dm-engine/fumo/fumo_account.h
index 17ccf9c..b7d6956 100755
--- a/include/dm-engine/fumo/fumo_account.h
+++ b/include/dm-engine/fumo/fumo_account.h
@@ -24,6 +24,9 @@
#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"
@@ -54,4 +57,6 @@
*/
int register_fota_account();
+int register_fota_polling(char *str_url, char *file_name, int *exist_version);
+
#endif /* FOTA_ACCOUNT_H_ */
diff --git a/include/dm-engine/fumo/fumo_engine.h b/include/dm-engine/fumo/fumo_engine.h
index 147d5d9..f1f2f9b 100755
--- a/include/dm-engine/fumo/fumo_engine.h
+++ b/include/dm-engine/fumo/fumo_engine.h
@@ -51,6 +51,34 @@
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
*
*
diff --git a/include/dm-engine/lawmo/lawmo_engine.h b/include/dm-engine/lawmo/lawmo_engine.h
index b411985..543b5e6 100755
--- a/include/dm-engine/lawmo/lawmo_engine.h
+++ b/include/dm-engine/lawmo/lawmo_engine.h
@@ -51,6 +51,34 @@
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
*
*
diff --git a/include/framework/platform-event-handler/dm_platform_event_handler_internal.h b/include/framework/platform-event-handler/dm_platform_event_handler_internal.h
index d0e79ff..d1bbf4b 100755
--- a/include/framework/platform-event-handler/dm_platform_event_handler_internal.h
+++ b/include/framework/platform-event-handler/dm_platform_event_handler_internal.h
@@ -22,14 +22,16 @@ typedef enum {
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 {
diff --git a/include/framework/task/oma_dm_task_spec.h b/include/framework/task/oma_dm_task_spec.h
index cd4562b..9311fac 100755
--- a/include/framework/task/oma_dm_task_spec.h
+++ b/include/framework/task/oma_dm_task_spec.h
@@ -36,11 +36,11 @@
#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"
diff --git a/include/framework/ui-event-handler/ipc_agent.h b/include/framework/ui-event-handler/ipc_agent.h
index 5f155b2..ab3ba5d 100755
--- a/include/framework/ui-event-handler/ipc_agent.h
+++ b/include/framework/ui-event-handler/ipc_agent.h
@@ -82,6 +82,7 @@ int noti_start(char *ui_mode);
* @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
@@ -98,7 +99,7 @@ int noti_start(char *ui_mode);
* @code
* @endcode
*/
-int noti_download();
+int noti_download(int file_size);
/**
* @par Description: API to noti install
@@ -182,6 +183,33 @@ int noti_send_download_info(int filesize, char *path);
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
*
*
@@ -405,6 +433,7 @@ int noti_memory_full(int file_size);
* @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
@@ -421,6 +450,6 @@ int noti_memory_full(int file_size);
* @code
* @endcode
*/
-int noti_over_max_file_size();
+int noti_over_max_file_size(int file_size);
#endif /* IPC_AGENT_H_ */
diff --git a/include/framework/ui-event-handler/ipc_common.h b/include/framework/ui-event-handler/ipc_common.h
index 55e37fd..ecec8dd 100755
--- a/include/framework/ui-event-handler/ipc_common.h
+++ b/include/framework/ui-event-handler/ipc_common.h
@@ -50,23 +50,25 @@ typedef enum {
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;
@@ -75,7 +77,8 @@ typedef enum {
PUSH_NOT_SPECIFIED = 0,
PUSH_BACKGROUND,
PUSH_INFORMATIVE,
- PUSH_INTERACTION
+ PUSH_INTERACTION,
+ POLL_INTERACTION
} PUSH_TYPE;
typedef enum {
diff --git a/include/mo-handler/dm_mo_common_internal.h b/include/mo-handler/dm_mo_common_internal.h
index 7f4d835..2492ad1 100755
--- a/include/mo-handler/dm_mo_common_internal.h
+++ b/include/mo-handler/dm_mo_common_internal.h
@@ -33,6 +33,8 @@
#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"
@@ -46,6 +48,8 @@
#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"
@@ -175,6 +179,8 @@ typedef struct _dm_acc {
#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"
diff --git a/oma-dm-agent.manifest b/oma-dm-agent.manifest
index cc890d2..8902f0e 100755
--- a/oma-dm-agent.manifest
+++ b/oma-dm-agent.manifest
@@ -30,6 +30,15 @@
<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" />
diff --git a/oma-dm-cfg/csc-setting/change_csc_value.sh b/oma-dm-cfg/csc-setting/change_csc_value.sh
index 7ae0391..074ec02 100755
--- a/oma-dm-cfg/csc-setting/change_csc_value.sh
+++ b/oma-dm-cfg/csc-setting/change_csc_value.sh
@@ -1,5 +1,6 @@
#!/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
@@ -14,3 +15,7 @@ vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ClientNonce
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"
+
+
diff --git a/oma-dm-cfg/ddf/slp/slp_devdetail_ddf.xml b/oma-dm-cfg/ddf/slp/slp_devdetail_ddf.xml
index 293fd19..e448d90 100644..100755
--- a/oma-dm-cfg/ddf/slp/slp_devdetail_ddf.xml
+++ b/oma-dm-cfg/ddf/slp/slp_devdetail_ddf.xml
@@ -3,7 +3,7 @@
<MgmtTree>
<VerDTD>1.2</VerDTD>
<Man>Samsung Electronics</Man>
- <Mod>GT-I9500</Mod>
+ <Mod>GT-I8800</Mod>
<Node>
<NodeName>DevDetail</NodeName>
<!--The '.' shows that this node is located immediately under the root.-->
diff --git a/oma-dm-cfg/ddf/slp/slp_devinfo_ddf.xml b/oma-dm-cfg/ddf/slp/slp_devinfo_ddf.xml
index c9e0015..21d8c2a 100644..100755
--- a/oma-dm-cfg/ddf/slp/slp_devinfo_ddf.xml
+++ b/oma-dm-cfg/ddf/slp/slp_devinfo_ddf.xml
@@ -3,7 +3,7 @@
<MgmtTree>
<VerDTD>1.2</VerDTD>
<Man>Samsung Electronics</Man>
- <Mod>GT-I9500</Mod>
+ <Mod>GT-I8800</Mod>
<Node>
<NodeName>DevInfo</NodeName>
<!--The '.' shows that this node is located immediately under the root.-->
diff --git a/oma-dm-cfg/ddf/slp/slp_fumo_ddf.xml b/oma-dm-cfg/ddf/slp/slp_fumo_ddf.xml
index 71d6857..757276a 100755
--- a/oma-dm-cfg/ddf/slp/slp_fumo_ddf.xml
+++ b/oma-dm-cfg/ddf/slp/slp_fumo_ddf.xml
@@ -3,7 +3,7 @@
<MgmtTree>
<VerDTD>1.2</VerDTD>
<Man>Samsung Electronics</Man>
- <Mod>GT-I9500</Mod>
+ <Mod>GT-I8800</Mod>
<Node>
<NodeName>FUMO</NodeName>
<!--The node is located in a location specified below in the Path element -->
@@ -263,6 +263,28 @@
</DFType>
</DFProperties>
</Node>
+ <Node>
+ <NodeName>DoCheckingRooting</NodeName>
+ <!--This node is used for Vendor specific extensions -->
+ <DFProperties>
+ <AccessType>
+ <Get/><Replace/>
+ </AccessType>
+ <DFFormat>
+ <chr/>
+ </DFFormat>
+ <Occurrence>
+ <ZeroOrMore/>
+ </Occurrence>
+ <Scope>
+ <Permanent/>
+ </Scope>
+ <DFTitle>A node that can be used to provide vendor-specific extensions </DFTitle>
+ <DFType>
+ <MIME>text/plain</MIME>
+ </DFType>
+ </DFProperties>
+ </Node>
</Node>
</Node>
</MgmtTree>
diff --git a/oma-dm-cfg/ddf/slp/slp_gcf_dmacc_ddf_1.2.xml b/oma-dm-cfg/ddf/slp/slp_gcf_dmacc_ddf_1.2.xml
index 5679736..9eee832 100755
--- a/oma-dm-cfg/ddf/slp/slp_gcf_dmacc_ddf_1.2.xml
+++ b/oma-dm-cfg/ddf/slp/slp_gcf_dmacc_ddf_1.2.xml
@@ -3,7 +3,7 @@
<MgmtTree>
<VerDTD>1.2</VerDTD>
<Man>Samsung Electronics</Man>
- <Mod>GT-I9500</Mod>
+ <Mod>GT-I8800</Mod>
<Node>
<NodeName>DMAcc</NodeName>
<!--The Path element must be used here so that the SyncML management object can be correctly positioned in the management tree.-->
diff --git a/oma-dm-cfg/ddf/slp/slp_lawmo_pcw_ddf.xml b/oma-dm-cfg/ddf/slp/slp_lawmo_pcw_ddf.xml
index b2b38db..3d6f7ac 100755
--- a/oma-dm-cfg/ddf/slp/slp_lawmo_pcw_ddf.xml
+++ b/oma-dm-cfg/ddf/slp/slp_lawmo_pcw_ddf.xml
@@ -3,7 +3,7 @@
<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 -->
diff --git a/oma-dm-cfg/ipc/noticonfig_omadm b/oma-dm-cfg/ipc/noticonfig_omadm
index e18abf2..6c8ed95 100644..100755
--- a/oma-dm-cfg/ipc/noticonfig_omadm
+++ b/oma-dm-cfg/ipc/noticonfig_omadm
@@ -11,4 +11,5 @@
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
diff --git a/packaging/oma-dm-agent.spec b/packaging/oma-dm-agent.spec
index b23b35b..b1c078c 100755
--- a/packaging/oma-dm-agent.spec
+++ b/packaging/oma-dm-agent.spec
@@ -1,6 +1,6 @@
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
@@ -66,6 +66,16 @@ make %{?jobs:-j%jobs}
%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
@@ -74,41 +84,22 @@ rm -rf %{buildroot}
%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
@@ -134,16 +125,24 @@ rm -rf /usr/share/oma-dm-cfg
%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
diff --git a/src/agent/common/dm-status/oma_dm_status_db_handler.c b/src/agent/common/dm-status/oma_dm_status_db_handler.c
index 378da1c..5c6ef4b 100755
--- a/src/agent/common/dm-status/oma_dm_status_db_handler.c
+++ b/src/agent/common/dm-status/oma_dm_status_db_handler.c
@@ -297,6 +297,7 @@ DM_ERROR Update_Engine_Status(engine_status * status)
_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) {
@@ -310,6 +311,8 @@ DM_ERROR Update_Engine_Status(engine_status * status)
_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);
}
diff --git a/src/agent/common/dm_common.c b/src/agent/common/dm_common.c
index 029c0bd..c073202 100755
--- a/src/agent/common/dm_common.c
+++ b/src/agent/common/dm_common.c
@@ -117,21 +117,21 @@ DM_ERROR init_dm()
_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();
@@ -511,12 +511,22 @@ void delete_account_registration_alarm(char *alarm_str, CONFIG_TYPE alarm_type)
_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;
@@ -813,6 +823,9 @@ DM_ERROR get_fumo_ui_mode(char **ui_mode)
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;
}
@@ -1193,6 +1206,31 @@ void get_roaming_state(int *roaming_state)
_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;
@@ -1250,7 +1288,7 @@ DM_ERROR compare_memory_space(char *memory_type, long double file_size)
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;
@@ -1439,6 +1477,10 @@ int get_default_noti_type(char *ui_mode, NotI_Type noti_type)
_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;
diff --git a/src/agent/dm-engine/cp/dm_cp_parser.c b/src/agent/dm-engine/cp/dm_cp_parser.c
index b54425c..f1fdf23 100755
--- a/src/agent/dm-engine/cp/dm_cp_parser.c
+++ b/src/agent/dm-engine/cp/dm_cp_parser.c
@@ -1327,6 +1327,15 @@ static DM_CP_PxLogical *__parse_PxLogical(WBXMLTreeNode * wbxml_dom_node)
}
} 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);
@@ -1387,8 +1396,8 @@ static DM_CP_PxLogical *__parse_PxLogical(WBXMLTreeNode * wbxml_dom_node)
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;
}
@@ -1436,8 +1445,8 @@ static DM_CP_PxLogical *__parse_PxLogical(WBXMLTreeNode * wbxml_dom_node)
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;
}
@@ -1505,8 +1514,8 @@ static DM_CP_PxLogical *__parse_PxLogical(WBXMLTreeNode * wbxml_dom_node)
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;
}
diff --git a/src/agent/dm-engine/dl-manager/dd_parser.c b/src/agent/dm-engine/dl-manager/dd_parser.c
index d17eeb5..7773e59 100644..100755
--- a/src/agent/dm-engine/dl-manager/dd_parser.c
+++ b/src/agent/dm-engine/dl-manager/dd_parser.c
@@ -38,7 +38,8 @@ typedef enum {
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);
@@ -101,6 +102,9 @@ 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;
@@ -130,6 +134,9 @@ static DM_ERROR __set_value_to_dd_object(xmlNode * a_node, Download_Descriptor *
{
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;
@@ -137,6 +144,9 @@ static DM_ERROR __set_value_to_dd_object(xmlNode * a_node, Download_Descriptor *
{
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;
@@ -162,6 +172,9 @@ static DM_ERROR __set_value_to_dd_object(xmlNode * a_node, Download_Descriptor *
{
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;
@@ -183,6 +196,16 @@ static DM_ERROR __set_value_to_dd_object(xmlNode * a_node, Download_Descriptor *
}
}
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;
}
diff --git a/src/agent/dm-engine/dl-manager/fw_downloader.c b/src/agent/dm-engine/dl-manager/fw_downloader.c
index b228d7c..be02eec 100644..100755
--- a/src/agent/dm-engine/dl-manager/fw_downloader.c
+++ b/src/agent/dm-engine/dl-manager/fw_downloader.c
@@ -55,6 +55,7 @@ DM_ERROR get_object_information(char *dd_server_uri, int *file_size, Download_De
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;
@@ -75,9 +76,23 @@ DM_ERROR get_object_information(char *dd_server_uri, int *file_size, Download_De
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;
@@ -105,8 +120,8 @@ DM_ERROR check_file_resume(const char *checked_download_folder, DOWNLOAD_FILE_ST
/* 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;
@@ -387,10 +402,11 @@ static int _arrange_file(const char *download_folder, const char *file_name)
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) {
diff --git a/src/agent/dm-engine/dl-manager/sa_fw_downloader.c b/src/agent/dm-engine/dl-manager/sa_fw_downloader.c
index d285ec3..30e4d04 100755
--- a/src/agent/dm-engine/dl-manager/sa_fw_downloader.c
+++ b/src/agent/dm-engine/dl-manager/sa_fw_downloader.c
@@ -29,8 +29,13 @@
#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,
@@ -113,8 +118,10 @@ char *get_file_name_from_http_header(GList * header_info)
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);
@@ -147,7 +154,7 @@ DM_ERROR send_download_msg(DL_SEND_MSG_TYPE send_dl_type, char *local_uri, char
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)));
@@ -171,7 +178,7 @@ DM_ERROR send_download_msg(DL_SEND_MSG_TYPE send_dl_type, char *local_uri, char
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);
@@ -192,8 +199,14 @@ DM_ERROR send_download_msg(DL_SEND_MSG_TYPE send_dl_type, char *local_uri, char
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);
}
@@ -262,7 +275,8 @@ DM_ERROR download_data(char *local_uri, char *content_type, GList * header_info,
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
@@ -277,7 +291,7 @@ DM_ERROR download_data(char *local_uri, char *content_type, GList * header_info,
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);
@@ -424,11 +438,11 @@ static sync_agent_na_result_e _download_data(GList * header_info, int na_plugIn_
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");
@@ -512,16 +526,6 @@ static sync_agent_na_result_e _download_data(GList * header_info, int na_plugIn_
}
_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;
@@ -529,6 +533,11 @@ static sync_agent_na_result_e _download_data(GList * header_info, int na_plugIn_
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);
diff --git a/src/agent/dm-engine/dm_common_engine.c b/src/agent/dm-engine/dm_common_engine.c
index 42fa7ad..3bd711a 100755
--- a/src/agent/dm-engine/dm_common_engine.c
+++ b/src/agent/dm-engine/dm_common_engine.c
@@ -60,7 +60,7 @@ static DM_ERROR _change_engine_status(char *server_id, char *full_path, char *co
engine_status *status;
- int is_exist;
+ int is_exist = 0;
is_exist = IsExist_Engine_id(service_engine_status);
if (is_exist == 1) {
@@ -91,7 +91,19 @@ static DM_ERROR _change_engine_status(char *server_id, char *full_path, char *co
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 */
@@ -283,6 +295,7 @@ DM_ERROR service_engine_start(ENGINE_ID service_engine_id, DM_ERROR * service_re
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);
@@ -315,14 +328,50 @@ DM_ERROR service_engine_start(ENGINE_ID service_engine_id, DM_ERROR * service_re
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);
@@ -456,6 +505,12 @@ DM_ERROR dm_common_operation(Event_Contents * pEvent_data)
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 */
@@ -556,7 +611,7 @@ DM_ERROR genericalert_operation(void **session, int *isFinish, ENGINE_ID service
_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) {
diff --git a/src/agent/dm-engine/fumo/fumo_engine.c b/src/agent/dm-engine/fumo/fumo_engine.c
index 9250283..1efbcee 100644..100755
--- a/src/agent/dm-engine/fumo/fumo_engine.c
+++ b/src/agent/dm-engine/fumo/fumo_engine.c
@@ -15,6 +15,8 @@
* limitations under the License.
*/
+#include <vconf.h>
+
/*sync-agent*/
#include <sync_agent.h>
@@ -29,7 +31,12 @@
#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
@@ -40,10 +47,12 @@
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)
{
@@ -52,7 +61,9 @@ DM_ERROR fumo_engine_state_operation(char *full_path, char *down_server, FUMO_Er
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;
@@ -207,7 +218,8 @@ DM_ERROR fumo_engine_state_operation(char *full_path, char *down_server, FUMO_Er
//*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;
@@ -230,6 +242,11 @@ DM_ERROR fumo_engine_state_operation(char *full_path, char *down_server, FUMO_Er
/* 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 ");
@@ -245,6 +262,11 @@ DM_ERROR fumo_engine_state_operation(char *full_path, char *down_server, FUMO_Er
/* 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 ");
@@ -257,6 +279,7 @@ DM_ERROR fumo_engine_state_operation(char *full_path, char *down_server, FUMO_Er
// 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;
@@ -333,6 +356,51 @@ DM_ERROR fumo_exec(char *full_path, char *correlator, FUMO_Error * fumo_return)
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;
@@ -363,12 +431,14 @@ static DM_ERROR _firmware_download(char *server_url, MEMORY_TYPE * memory_type,
_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 */
{
@@ -383,9 +453,56 @@ static DM_ERROR _firmware_download(char *server_url, MEMORY_TYPE * memory_type,
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) {
@@ -445,10 +562,12 @@ static DM_ERROR _firmware_download(char *server_url, MEMORY_TYPE * memory_type,
}
_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) {
@@ -458,7 +577,7 @@ static DM_ERROR _firmware_download(char *server_url, MEMORY_TYPE * memory_type,
}
download_status = DM_ERR_INSUFFICIENT_MEMORY;
*fumo_return = FUMO_USER_CANCELLED;
- ret = DM_OK;
+ //ret = DM_OK;
goto error;
}
@@ -473,6 +592,8 @@ static DM_ERROR _firmware_download(char *server_url, MEMORY_TYPE * memory_type,
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");
@@ -676,11 +797,13 @@ static DM_ERROR _firmware_install(char *full_path, MEMORY_TYPE memory_type, FUMO
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:
{
@@ -766,8 +889,8 @@ static DM_ERROR _firmware_install(char *full_path, MEMORY_TYPE memory_type, FUMO
default:
{
ret = DM_RESUME_IDLE;
- goto returnpart;
_DEBUG_TRACE("----------------------------------------------------install later --------------------------------------------------------------------");
+ goto returnpart;
}
break;
}
@@ -798,6 +921,26 @@ static DM_ERROR _firmware_install(char *full_path, MEMORY_TYPE memory_type, FUMO
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;
@@ -1139,7 +1282,8 @@ static DM_ERROR __check_memory(long double file_size, MEMORY_TYPE * is_internal_
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);
@@ -1147,7 +1291,7 @@ static DM_ERROR __check_memory(long double file_size, MEMORY_TYPE * is_internal_
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 {
@@ -1165,7 +1309,7 @@ static DM_ERROR __check_memory(long double file_size, MEMORY_TYPE * is_internal_
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 {
@@ -1205,7 +1349,7 @@ static DM_ERROR ___get_max_file_size(int *max_file_size)
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;
@@ -1214,7 +1358,7 @@ static DM_ERROR ___get_max_file_size(int *max_file_size)
/*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) {
@@ -1222,16 +1366,16 @@ static DM_ERROR ___get_max_file_size(int *max_file_size)
_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;
@@ -1245,28 +1389,29 @@ static DM_ERROR __check_max_file_size(int file_size)
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;
@@ -1278,3 +1423,32 @@ static DM_ERROR __check_max_file_size(int file_size)
_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;
+}
diff --git a/src/agent/framework/platform-event-handler/dm_platform_event_handler.c b/src/agent/framework/platform-event-handler/dm_platform_event_handler.c
index c91a434..1c42c24 100755
--- a/src/agent/framework/platform-event-handler/dm_platform_event_handler.c
+++ b/src/agent/framework/platform-event-handler/dm_platform_event_handler.c
@@ -20,6 +20,7 @@
#include <sys/un.h>
#include <fcntl.h>
#include <unistd.h>
+#include <vconf.h>
/*sync-agent*/
#include <sync_agent.h>
@@ -58,6 +59,7 @@ static int _dm_notification_operation(const char *out_message, unsigned int outl
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;
@@ -155,7 +157,9 @@ static int _dm_notification_operation(const char *out_message, unsigned int outl
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");
@@ -362,7 +366,8 @@ int dm_ip_push_callback(int item_id, void *user_data)
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);
@@ -375,8 +380,9 @@ int dm_ip_push_callback(int item_id, void *user_data)
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;
@@ -517,6 +523,11 @@ int dm_telephony_end_callback(int item_id, void *user_data)
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;
}
@@ -894,7 +905,7 @@ static DM_ERROR _send_event_ds(char *event_msg)
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!!");
diff --git a/src/agent/framework/task/oma_dm_task_spec.c b/src/agent/framework/task/oma_dm_task_spec.c
index 7bbb4f6..144dac8 100644..100755
--- a/src/agent/framework/task/oma_dm_task_spec.c
+++ b/src/agent/framework/task/oma_dm_task_spec.c
@@ -317,16 +317,30 @@ static sync_agent_ec_task_error_e _start_dm_fumo_common_process(unsigned int par
*/
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);
@@ -355,8 +369,9 @@ static sync_agent_ec_task_error_e _start_dm_fumo_common_process(unsigned int par
//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;
@@ -393,11 +408,12 @@ static sync_agent_ec_task_error_e _start_dm_fumo_common_process(unsigned int par
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)
@@ -421,7 +437,11 @@ static sync_agent_ec_task_error_e _start_dm_fumo_common_process(unsigned int par
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
@@ -764,13 +784,28 @@ static sync_agent_ec_task_error_e _start_fumo_serviceEngine_process(unsigned int
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();
diff --git a/src/agent/framework/ui-event-handler/ipc_agent.c b/src/agent/framework/ui-event-handler/ipc_agent.c
index 61b6caf..b80fa1f 100755
--- a/src/agent/framework/ui-event-handler/ipc_agent.c
+++ b/src/agent/framework/ui-event-handler/ipc_agent.c
@@ -19,6 +19,9 @@
#include <stdio.h>
#include <aul.h>
+#include <vconf.h>
+#include <vconf-keys.h>
+
/*sync-agent*/
#include <sync_agent.h>
@@ -89,7 +92,9 @@ static int __check_ui_mode(char **ui_mode, char *input_string)
_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);
@@ -103,7 +108,7 @@ static int __check_ui_mode(char **ui_mode, char *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) {
@@ -128,11 +133,21 @@ static int __launch_ui(char *ui_mode, int noti_type)
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) {
@@ -262,16 +277,16 @@ static int __event_callback_software_update(sync_agent_event_data_s * request, s
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);
@@ -281,8 +296,8 @@ static int __event_callback_software_update(sync_agent_event_data_s * request, s
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;
@@ -293,7 +308,7 @@ static int __event_callback_software_update(sync_agent_event_data_s * request, s
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;
@@ -375,7 +390,7 @@ static int __event_callback_cancel(sync_agent_event_data_s * request, sync_agent
_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); */
@@ -402,7 +417,7 @@ static int __event_callback_download(sync_agent_event_data_s * request, sync_age
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();
@@ -452,7 +467,7 @@ static int __event_callback_install(sync_agent_event_data_s * request, sync_agen
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();
@@ -501,8 +516,8 @@ static int __event_callback_set_interval(sync_agent_event_data_s * request, sync
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:
@@ -527,15 +542,21 @@ static int __event_callback_set_interval(sync_agent_event_data_s * request, sync
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
@@ -560,6 +581,16 @@ static int __event_callback_account_registration(sync_agent_event_data_s * reque
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;
@@ -567,26 +598,51 @@ static int __event_callback_account_registration(sync_agent_event_data_s * reque
//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);
@@ -625,7 +681,7 @@ static int __event_callback_get_profile(sync_agent_event_data_s * request, sync_
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();
@@ -747,21 +803,21 @@ static int __event_callback_set_profile(sync_agent_event_data_s * request, sync_
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);
@@ -806,7 +862,7 @@ static int __event_callback_reset_profile(sync_agent_event_data_s * request, syn
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) {
@@ -859,10 +915,10 @@ static int __event_callback_uic_alert(sync_agent_event_data_s * request, sync_ag
*/
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 */
@@ -877,7 +933,7 @@ static int __event_callback_uic_alert(sync_agent_event_data_s * request, sync_ag
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);
@@ -885,7 +941,7 @@ static int __event_callback_uic_alert(sync_agent_event_data_s * request, sync_ag
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) {
@@ -893,7 +949,7 @@ static int __event_callback_uic_alert(sync_agent_event_data_s * request, sync_ag
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");
@@ -980,7 +1036,7 @@ static int __event_callback_set_fumo_config_wifi_only(sync_agent_event_data_s *
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);
@@ -1011,20 +1067,20 @@ static int __event_callback_check_pin_code(sync_agent_event_data_s * request, sy
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;
@@ -1098,7 +1154,7 @@ static int __event_add_dmacc(sync_agent_event_data_s * request, sync_agent_event
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();
@@ -1108,7 +1164,7 @@ static int __event_add_dmacc(sync_agent_event_data_s * request, sync_agent_event
_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
@@ -1187,7 +1243,7 @@ static int __event_remove_dmacc(sync_agent_event_data_s * request, sync_agent_ev
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
@@ -1394,12 +1450,12 @@ int noti_start(char *ui_mode)
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()
@@ -1426,6 +1482,14 @@ int noti_low_battery(char *battery_level)
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;
@@ -1490,12 +1554,13 @@ int noti_memory_full(int file_size)
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)
@@ -1564,6 +1629,10 @@ static int _IPC_noti(int noti_type, int noti_id, int input_param, char *input_st
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;
@@ -1612,7 +1681,8 @@ static int _IPC_noti(int noti_type, int noti_id, int input_param, char *input_st
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
@@ -1629,6 +1699,12 @@ static int _IPC_noti(int noti_type, int noti_id, int input_param, char *input_st
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
diff --git a/src/agent/main.c b/src/agent/main.c
index 256840b..7aa97e8 100755
--- a/src/agent/main.c
+++ b/src/agent/main.c
@@ -24,6 +24,9 @@
#include <dbus/dbus.h>
//#include <appcore-common.h>
+#include <vconf.h>
+#include <wait.h>
+
/*sync-agent*/
#include <sync_agent.h>
@@ -160,6 +163,83 @@ static void _agent_daemon_signal_handler(int signo, siginfo_t * info, void *p_co
_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;
@@ -177,7 +257,7 @@ int main()
// _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");
diff --git a/src/agent/mo-handler/dm_mo_common.c b/src/agent/mo-handler/dm_mo_common.c
index 5278757..d742414 100755
--- a/src/agent/mo-handler/dm_mo_common.c
+++ b/src/agent/mo-handler/dm_mo_common.c
@@ -409,7 +409,7 @@ void dmacc_define_lawmo() {
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;
@@ -486,7 +486,7 @@ void dmacc_define_lawmo() {
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;
@@ -1410,6 +1410,9 @@ DM_ERROR get_server_type(char *server_id, int *server_type)
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;
}
diff --git a/src/agent/mo-handler/dm_mo_handler.c b/src/agent/mo-handler/dm_mo_handler.c
index 22a03e1..fc7afd7 100755
--- a/src/agent/mo-handler/dm_mo_handler.c
+++ b/src/agent/mo-handler/dm_mo_handler.c
@@ -530,9 +530,9 @@ DM_ERROR replace_mo(char *mo_full_path, char *value, char *prop_value, char *con
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;
}
diff --git a/src/agent/serviceadapter/dm-phase-handler/dm_phase_handler.c b/src/agent/serviceadapter/dm-phase-handler/dm_phase_handler.c
index e8fafeb..e75e252 100755
--- a/src/agent/serviceadapter/dm-phase-handler/dm_phase_handler.c
+++ b/src/agent/serviceadapter/dm-phase-handler/dm_phase_handler.c
@@ -148,8 +148,13 @@ static DM_ERROR _generate_setupphase_msg(Session ** session, char *pServer_id, c
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;
@@ -165,7 +170,7 @@ static DM_ERROR _generate_setupphase_msg(Session ** session, char *pServer_id, c
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)
@@ -206,6 +211,7 @@ static DM_ERROR _generate_setupphase_msg(Session ** session, char *pServer_id, c
/*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
@@ -233,6 +239,15 @@ static DM_ERROR _generate_setupphase_msg(Session ** session, char *pServer_id, c
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);
@@ -268,12 +283,27 @@ static DM_ERROR _generate_setupphase_msg(Session ** session, char *pServer_id, c
(*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;
}
@@ -565,6 +595,7 @@ static DM_ERROR _generate_management_msg(Session ** session, char **msg, unsigne
pSyncML = NULL;
_DEBUG_TRACE(" error :%d\n", ret);
+ syncml_binder_terminate(pBinder);
_INNER_FUNC_EXIT;
return ret;
@@ -796,9 +827,11 @@ static DM_ERROR _generate_generic_alert(Session ** session, char *pServer_id, ch
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)
@@ -1285,6 +1318,12 @@ DM_ERROR setup_phase(int transportType, Session ** session, char *pServer_id, ch
//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;
@@ -1292,7 +1331,7 @@ DM_ERROR setup_phase(int transportType, Session ** session, char *pServer_id, ch
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);
@@ -1302,7 +1341,8 @@ DM_ERROR setup_phase(int transportType, Session ** session, char *pServer_id, ch
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);
@@ -1361,7 +1401,7 @@ DM_ERROR management_phase(int transportType, Session ** session, char *pSession_
/*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);
@@ -1370,7 +1410,8 @@ DM_ERROR management_phase(int transportType, Session ** session, char *pSession_
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);
@@ -1428,6 +1469,7 @@ DM_ERROR generic_alert(int transportType, Session ** session, char *pServer_id,
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);
diff --git a/src/agent/serviceadapter/networkbinder/na_binder.c b/src/agent/serviceadapter/networkbinder/na_binder.c
index e3cad3e..14dc5af 100644..100755
--- a/src/agent/serviceadapter/networkbinder/na_binder.c
+++ b/src/agent/serviceadapter/networkbinder/na_binder.c
@@ -84,7 +84,7 @@ int NA_http_header_binder(char *accType, char *loc_uri, char *sessionid, int isH
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");
diff --git a/src/agent/serviceadapter/sa_elements.c b/src/agent/serviceadapter/sa_elements.c
index 8f38723..ba442d4 100644..100755
--- a/src/agent/serviceadapter/sa_elements.c
+++ b/src/agent/serviceadapter/sa_elements.c
@@ -85,7 +85,11 @@ DM_ERROR create_location(const char *locURI, const char *locName, Location ** pL
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) {
diff --git a/src/agent/serviceadapter/sa_session.c b/src/agent/serviceadapter/sa_session.c
index acc17d5..c4c57fc 100644..100755
--- a/src/agent/serviceadapter/sa_session.c
+++ b/src/agent/serviceadapter/sa_session.c
@@ -743,8 +743,18 @@ static DM_ERROR _receive_changes_cmd(Session * session, Command * command)
_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)
diff --git a/src/agent/serviceadapter/sa_syncml_binders.c b/src/agent/serviceadapter/sa_syncml_binders.c
index 120e99d..b271680 100644..100755
--- a/src/agent/serviceadapter/sa_syncml_binders.c
+++ b/src/agent/serviceadapter/sa_syncml_binders.c
@@ -41,6 +41,7 @@ DM_ERROR syncml_objectbinder(SyncML * pSyncML, char **msg, unsigned int *msg_siz
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) {
@@ -48,7 +49,6 @@ DM_ERROR syncml_objectbinder(SyncML * pSyncML, char **msg, unsigned int *msg_siz
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);
@@ -187,6 +187,11 @@ DM_ERROR syncml_objectbinder(SyncML * pSyncML, char **msg, unsigned int *msg_siz
error:
_DEBUG_INFO("error end %d \n", ret);
+
+ if(pBinder != NULL) {
+ syncml_binder_terminate(pBinder);
+ }
+
_EXTERN_FUNC_EXIT;
return ret;
}
diff --git a/src/plugins/dm-private/dmacc-gcf/src/plugin_interface.c b/src/plugins/dm-private/dmacc-gcf/src/plugin_interface.c
index 8a05650..ae1e4b9 100755
--- a/src/plugins/dm-private/dmacc-gcf/src/plugin_interface.c
+++ b/src/plugins/dm-private/dmacc-gcf/src/plugin_interface.c
@@ -48,6 +48,10 @@
#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
@@ -59,9 +63,12 @@
#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);
@@ -107,7 +114,8 @@ EXPORT_API int sync_agent_plugin_get_mo_value(const char *mo_full_path, const ch
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);
@@ -178,10 +186,13 @@ EXPORT_API int sync_agent_plugin_get_mo_value(const char *mo_full_path, const ch
}
} 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);
@@ -212,7 +223,7 @@ EXPORT_API int sync_agent_plugin_get_mo_value(const char *mo_full_path, const ch
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) {
@@ -243,6 +254,14 @@ EXPORT_API int sync_agent_plugin_get_mo_value(const char *mo_full_path, const ch
}
} 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);
@@ -268,10 +287,16 @@ EXPORT_API int sync_agent_plugin_get_mo_value(const char *mo_full_path, const ch
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);
@@ -292,7 +317,7 @@ EXPORT_API int sync_agent_plugin_get_mo_value(const char *mo_full_path, const ch
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) {
@@ -318,7 +343,7 @@ EXPORT_API void sync_agent_set_function_get_devinfo_plugin(sync_agent_get_devinf
_EXTERN_FUNC_ENTER;
}
-
+/*
static int _system_command(const char *command)
{
_EXTERN_FUNC_ENTER;
@@ -360,6 +385,7 @@ static int _system_command(const char *command)
_EXTERN_FUNC_EXIT;
return -1;
}
+*/
static int _get_index(const char *name)
{
@@ -368,17 +394,17 @@ 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;
}
diff --git a/src/plugins/dm-private/slp-device-dm/src/plugin_interface_devexe.c b/src/plugins/dm-private/slp-device-dm/src/plugin_interface_devexe.c
index 9543039..59714c5 100755
--- a/src/plugins/dm-private/slp-device-dm/src/plugin_interface_devexe.c
+++ b/src/plugins/dm-private/slp-device-dm/src/plugin_interface_devexe.c
@@ -35,7 +35,6 @@
#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;
@@ -50,8 +49,6 @@ static int _execute_dev_wipe();
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);
@@ -154,14 +151,22 @@ static int _execute_dev_fota_flag(int memory_type)
}
_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)
@@ -308,111 +313,6 @@ static int ___find_file(const char *folder_path, const char **file_path)
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)
{
@@ -441,11 +341,6 @@ 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);
diff --git a/src/plugins/dm-private/slp-device-dm/src/plugin_slp_device_ctrl.c b/src/plugins/dm-private/slp-device-dm/src/plugin_slp_device_ctrl.c
index 5520214..a856d2b 100755
--- a/src/plugins/dm-private/slp-device-dm/src/plugin_slp_device_ctrl.c
+++ b/src/plugins/dm-private/slp-device-dm/src/plugin_slp_device_ctrl.c
@@ -129,6 +129,8 @@ int slp_device_ctrl_get_fota_update_result()
_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);
diff --git a/src/plugins/dm-private/slp-device-dm/src/plugin_slp_device_info.c b/src/plugins/dm-private/slp-device-dm/src/plugin_slp_device_info.c
index 074ee4d..ab5b33a 100755
--- a/src/plugins/dm-private/slp-device-dm/src/plugin_slp_device_info.c
+++ b/src/plugins/dm-private/slp-device-dm/src/plugin_slp_device_info.c
@@ -87,7 +87,15 @@ char *slp_device_info_get_kernel_version()
}
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);