diff options
author | JooHark Park <juhaki.park@samsung.com> | 2013-07-03 20:36:22 +0900 |
---|---|---|
committer | JooHark Park <juhaki.park@samsung.com> | 2013-07-03 20:36:22 +0900 |
commit | 366eeefa34db92b1dd364d671c468a3c6cdecc0b (patch) | |
tree | 4b505dda2c4fb481af750b1236510e5a10be1d13 | |
parent | a0edb46f4fe5459077673a25ba648d875431ab3e (diff) | |
download | oma-dm-agent-366eeefa34db92b1dd364d671c468a3c6cdecc0b.tar.gz oma-dm-agent-366eeefa34db92b1dd364d671c468a3c6cdecc0b.tar.bz2 oma-dm-agent-366eeefa34db92b1dd364d671c468a3c6cdecc0b.zip |
[Internal: smack patch , dbus auto-activation patch ]
=====================================
[Problem]
-
[Cause]
-
[Solution]
- smack patch
- dbus auto-activation patch (com.samsung.omadmagent.service)
=====================================
Change-Id: I407419b0e2ea0fa7385ef24914cf9c38b16f1211
30 files changed, 306 insertions, 95 deletions
diff --git a/com.samsung.omadmagent.service b/com.samsung.omadmagent.service index e5d8851..c9dc9dc 100755 --- a/com.samsung.omadmagent.service +++ b/com.samsung.omadmagent.service @@ -1,3 +1,4 @@ [D-BUS Service] Name=com.samsung.omadmagent Exec=/usr/bin/oma-dm-agent +User=root diff --git a/include/common/dm_common_def.h b/include/common/dm_common_def.h index 6e0bd86..7f3a868 100755 --- a/include/common/dm_common_def.h +++ b/include/common/dm_common_def.h @@ -115,8 +115,14 @@ #define FOTA_DELTA_SD_INTERNAL_STORAGE "/opt/media" #define FOTA_DELTA_SD_EXTERNAL_STORAGE "/opt/storage/sdcard" + +#define VCONF_FOTA_DOWNLOADCONTYPE "db/SyncML/oma-dm-service/DownloadConType" +#define VCONF_FOTA_POLLING_TRIGER_TEST "db/SyncML/oma-dm-service/polling-triger" + + typedef enum { //INTERVAL_NONE =0, + INTERVAL_30MINUTES = 0, INTERVAL_1HOUR = 1, INTERVAL_3HOURS = 2, INTERVAL_6HOURS = 3, diff --git a/include/common/util/util.h b/include/common/util/util.h index a4596eb..b7b10dd 100755 --- a/include/common/util/util.h +++ b/include/common/util/util.h @@ -29,13 +29,13 @@ #include "common/dm_common.h" #define errno_abort(text) do {\ - fprintf(stderr, "%s at \"%s\":%d: %s\n", text, __FILE__, __LINE__, strerror(errno));\ + _DEBUG_INFO("%s at \"%s\":%d: %s\n", text, __FILE__, __LINE__, strerror(errno));\ abort();\ } while(0) #define assert_condition(condition) do{\ if (!(condition)) {\ - fprintf(stderr, "assert at \"%s\":%d: %s\n", __FILE__, __LINE__, strerror(errno));\ + _DEBUG_INFO("assert at \"%s\":%d: %s\n", __FILE__, __LINE__, strerror(errno));\ abort();\ }\ } while(0) 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 d1bbf4b..6625501 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 @@ -23,7 +23,8 @@ typedef enum { WAP_PUSH_EVENT, UI_EVENT, SERVER_BOOTSTRAP_EVENT, - POLL_EVENT + POLL_EVENT, + SIM_CHANGE_EVENT } Event_Type; typedef enum { @@ -31,7 +32,8 @@ typedef enum { NOTI_TYPE_BACKGRUOUND, NOTI_TYPE_INFOMATIVE, NOTI_TYPE_USERINTERACTION, - NOTI_TYPE_POLLINTERACTION + NOTI_TYPE_POLLINTERACTION, + NOTI_TYPE_SIMCHANGE_INTERACTION } NotI_Type; typedef struct { diff --git a/include/framework/ui-event-handler/ipc_common.h b/include/framework/ui-event-handler/ipc_common.h index ecec8dd..c9189ab 100755 --- a/include/framework/ui-event-handler/ipc_common.h +++ b/include/framework/ui-event-handler/ipc_common.h @@ -45,6 +45,8 @@ typedef enum { EVENT_ADD_DMACC, EVENT_REMOVE_DMACC, + EVENT_INSTALL_MNT_PW = 16, + EVENT_NUM } EVENT_ID; @@ -117,6 +119,7 @@ typedef enum { //Todo: add the response type if U need //RESPONSE_TYPE_REMINDER_INTERVAL_NONE, + RESPONSE_TYPE_REMINDER_INTERVAL_30_MINUSTES, RESPONSE_TYPE_REMINDER_INTERVAL_1_HOUR, RESPONSE_TYPE_REMINDER_INTERVAL_3_HOURS, RESPONSE_TYPE_REMINDER_INTERVAL_6_HOURS, diff --git a/include/mo-handler/dm_mo_common_internal.h b/include/mo-handler/dm_mo_common_internal.h index 5a757a9..bdef88a 100755 --- a/include/mo-handler/dm_mo_common_internal.h +++ b/include/mo-handler/dm_mo_common_internal.h @@ -34,6 +34,8 @@ #define DM_DEVINFO "./DevInfo" #define DM_DEVDETAIL "./DevDetail" #define DM_DEVDETAIL_FWV "./DevDetail/FwV" +#define DM_DEVINFO_EXT_OP "./DevInfo/Ext" +#define DM_DEVINFO_EXT_OP_TELEPHONYMCC "./DevInfo/Ext/TelephonyMcc" #define DM_DMACC_MSCSERVER "./DMAcc/MSCserver" #define DM_DMACC_MSCTESTSERVER "./DMAcc/MSCTestserver" @@ -50,6 +52,7 @@ #define DM_FUMO_EXT_OP "/Ext" #define DM_FUMO_EXT_OP_DOCHECKINGROOTING "/Ext/DoCheckingRooting" +#define DM_FUMO_EXT_OP_DOWNLOADCONNTYPE "/Ext/DownloadConnType" #define DM_LAWMO_STATE_OP "/State" #define DM_LAWMO_AVAILABLEWIPELIST_LISTITEMNAME "/AvailableWipeList/omadm/ListItemName" @@ -60,6 +63,8 @@ #define DM_LAWMO_OPERATIONS_UNLOCK_OP "/Operations/UnLock" #define DM_LAWMO_OPERATIONS_FACTORYRESET_OP "/Operations/FactoryReset" #define DM_LAWMO_OPERATIONS_WIPE_OP "/Operations/Wipe" +#define DM_LAWMO_OPERATIONS_MOBILE_TRACKING "/OSPS/MobileTracking/Operations/Tracking" +#define DM_LAWMO_OPERATIONS_MOBILE_TRACKING_STOP "/OSPS/MobileTracking/Operations/Stop" #define DM_LAWMO_EXT "/Ext" typedef struct _dm_acc { @@ -10,7 +10,7 @@ SCRIPTNAME=/etc/init.d/oma-dm do_start() { PID=`pidof $NAME` [ -z "$PID" ] || return 1 - $DAEMON + $DAEMON booting RETVAL=$? return "$RETVAL" } @@ -43,13 +43,8 @@ prt_res() { case "$1" in start) echo "Starting $DESC" "$NAME" - if [ -f /opt/data/fota/oma-dm/.oma-dm-agent-enabled ]; then - do_start - prt_res $? - else - echo "don't exist oma-dm-agent enabled file" - prt_res $? - fi + do_start + prt_res $? ;; stop) echo "Stopping $DESC" "$NAME" @@ -67,7 +62,8 @@ case "$1" in ;; *) echo "Usage: $SCRIPTNAME {start|stop|restart}" >&2 - exit 3 + exit 0 ;; esac +exit 0 diff --git a/oma-dm-agent.manifest b/oma-dm-agent.manifest index fef9302..b023dee 100755 --- a/oma-dm-agent.manifest +++ b/oma-dm-agent.manifest @@ -5,7 +5,16 @@ <label name="oma-dm-agent::cfg" /> <label name="oma-dm-agent::ddf" /> <label name="oma-dm-agent::db" /> + <label name="oma-dm-agent::vconf_internal" /> + <label name="oma-dm-agent::vconf_external" /> </provide> + <request> + <smack request="telephony_framework::api_modem" type="r" /> + <smack request="telephony_framework::api_sim" type="r" /> + <smack request="telephony_framework::api_ss" type="w" /> + <smack request="contacts-service::svc" type="rw" /> + <smack request="contacts-service::phonelog" type="rw" /> + </request> </define> <assign> <filesystem path="/usr/share/oma_dm_cfg/csc_setting/change_csc_value.sh" label="oma-dm-agent::cfg"/> @@ -36,8 +45,6 @@ <filesystem path="/opt/usr/dbspace/.omadmagent.db-journal" label="oma-dm-agent::db"/> <filesystem path="/opt/usr/dbspace/.momanager.db" label="oma-dm-agent::db"/> <filesystem path="/opt/usr/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"/> <filesystem path="/usr/share/dbus-1/services/com.samsung.omadmagent.service" label="_"/> </assign> diff --git a/oma-dm-cfg/csc-setting/change_csc_value.sh b/oma-dm-cfg/csc-setting/change_csc_value.sh index 074ec02..4ce1bf8 100755 --- a/oma-dm-cfg/csc-setting/change_csc_value.sh +++ b/oma-dm-cfg/csc-setting/change_csc_value.sh @@ -1,21 +1,38 @@ #!/bin/sh -vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/ConfVersion "0.1" +/usr/bin/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 +/usr/bin/vconftool set -t int -f db/SyncML/oma-dm-service/DevManagement/NbDevManagement 1 + + +## mformation test server ( http://mfiop25.mformation.com/iop ) +## Input the Phone number -> Input the IMEI number -> Manufacturer : Samsung -> Model : SGHT989 -> Not check Factory Bootstrapped -> Add button click +## --> Modify device -> Server Auth Preference : syncml:auth-basic -> Client Auth Preference : syncml:auth-basic -> Modify button clieck +#/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/AccName "gcf" +#/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ServID "mform" +#/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ServAddr "https://bobafett.mformation.com:461/oma/iop" +#/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ServPwd "serverpwd" +#/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ServNonce "MTIzNDU=" +#/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ClientNonce "MTIzNDU=" +## 0 : BASIC , 1 : DIGEST MD5 , 2 : HMAC , Default : DIGEST +#/usr/bin/vconftool set -t int -f db/SyncML/oma-dm-service/DevManagement/1/AuthType 0 +#/usr/bin/vconftool set -t int -f db/SyncML/oma-dm-service/DevManagement/1/Port 461 +#/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/UserName "clientid" +#/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ClientPwd "clientpwd" ##gcf test server -vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/AccName "gcf" -vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ServID "RSate" -vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ServAddr "http://192.168.168.169/dm" -vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ServPwd "RSatepass" -vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ServNonce "" -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" +/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/AccName "gcf" +/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ServID "RSate" +/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ServAddr "http://192.168.168.169/dm" +/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ServPwd "RSatepass" +/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ServNonce "" +/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ClientNonce "" +## 0 : BASIC , 1 : DIGEST , 2 : HMAC , Default : DIGEST +/usr/bin/vconftool set -t int -f db/SyncML/oma-dm-service/DevManagement/1/AuthType 1 +/usr/bin/vconftool set -t int -f db/SyncML/oma-dm-service/DevManagement/1/Port 80 +/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/UserName "RSuser" +/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ClientPwd "RSpass" + diff --git a/oma-dm-cfg/ddf/slp/slp_devinfo_ddf.xml b/oma-dm-cfg/ddf/slp/slp_devinfo_ddf.xml index 21d8c2a..6f7a0e6 100755 --- a/oma-dm-cfg/ddf/slp/slp_devinfo_ddf.xml +++ b/oma-dm-cfg/ddf/slp/slp_devinfo_ddf.xml @@ -41,6 +41,28 @@ <DDFName></DDFName>
</DFType>
</DFProperties>
+ <Node>
+ <NodeName>TelephonyMcc</NodeName>
+ <!--This node is used for Vendor specific extensions -->
+ <DFProperties>
+ <AccessType>
+ <Get/><Replace/>
+ </AccessType>
+ <DFFormat>
+ <chr/>
+ </DFFormat>
+ <Occurrence>
+ <ZeroOrOne/>
+ </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>
<NodeName>Bearer</NodeName>
diff --git a/oma-dm-cfg/ddf/slp/slp_fumo_ddf.xml b/oma-dm-cfg/ddf/slp/slp_fumo_ddf.xml index 757276a..95988fa 100755 --- a/oma-dm-cfg/ddf/slp/slp_fumo_ddf.xml +++ b/oma-dm-cfg/ddf/slp/slp_fumo_ddf.xml @@ -30,7 +30,7 @@ <NodeName>PkgName</NodeName>
<DFProperties>
<AccessType>
- <Get/>
+ <Get/><Replace/>
</AccessType>
<DFFormat>
<chr/>
@@ -51,7 +51,7 @@ <NodeName>PkgVersion</NodeName>
<DFProperties>
<AccessType>
- <Get/>
+ <Get/><Replace/>
</AccessType>
<DFFormat>
<chr/>
@@ -132,7 +132,7 @@ <DFType>
<MIME>org.openmobilealliance.dm.firmwareupdate.downloadandupdate</MIME>
</DFType>
- </DFProperties>
+ </DFProperties>
<Node>
<NodeName>PkgURL</NodeName>
<DFProperties>
@@ -285,6 +285,28 @@ </DFType>
</DFProperties>
</Node>
+ <Node>
+ <NodeName>DownloadConnType</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/ipc/eventconfig_omadm b/oma-dm-cfg/ipc/eventconfig_omadm index 17284ff..fa9ecd9 100644..100755 --- a/oma-dm-cfg/ipc/eventconfig_omadm +++ b/oma-dm-cfg/ipc/eventconfig_omadm @@ -12,4 +12,4 @@ 12, 1, 0, 30, EVENT_UIC_ALERT 13, 1, 0, 30, EVENT_CHECK_PIN_CODE 14, 1, 0, 30, EVENT_ADD_DMACC -15, 1, 0, 30, EVENT_REMOVE_DMACC +15, 1, 0, 30, EVENT_REMOVE_DMACC diff --git a/packaging/oma-dm-agent.service b/packaging/oma-dm-agent.service new file mode 100755 index 0000000..3634e5b --- /dev/null +++ b/packaging/oma-dm-agent.service @@ -0,0 +1,13 @@ +[Unit] +Description=OMA DM +After=tizen-runtime.target +Requires=tizen-runtime.target + +[Service] +Type=forking +EnvironmentFile=/run/tizen-mobile-env +ExecStart=/etc/rc.d/init.d/oma-dm start +ExecStop=/etc/rc.d/init.d/oma-dm stop + +[Install] +WantedBy=multi-user.target diff --git a/packaging/oma-dm-agent.spec b/packaging/oma-dm-agent.spec index 5385e9e..4481374 100755 --- a/packaging/oma-dm-agent.spec +++ b/packaging/oma-dm-agent.spec @@ -5,7 +5,10 @@ Release: 1 Group: TO_BE/FILLED_IN License: Apache License, Version 2.0 Source0: oma-dm-agent-%{version}.tar.gz +Source1: oma-dm-agent.service +Requires(post): contacts-service2 +Requires(post): telephony-daemon #Requires(post): /sbin/ldconfig BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(sqlite3) @@ -78,33 +81,56 @@ sqlite3 %{buildroot}/opt/usr/dbspace/.momanager.db "PRAGMA journal_mode = PERSIS %make_install +mkdir -p %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants +install -m 0644 %SOURCE1 %{buildroot}%{_libdir}/systemd/system/oma-dm-agent.service +ln -s ../oma-dm-agent.service %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/oma-dm-agent.service + %clean rm -rf %{buildroot} + %post -if [ ! -d /etc/rc.d/rc3.d ] -then - mkdir -p /etc/rc.d/rc3.d -fi -if [ ! -d /etc/rc.d/rc5.d ] -then - mkdir -p /etc/rc.d/rc5.d -fi -if [ ! -f /etc/rc.d/rc3.d/S91oma-dm-agent ] -then - 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 +############################################################################################################### +## Vconf setting... start +############################################################################################################### +/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/ConfVersion "0.1" -s oma-dm-agent::vconf_internal +/usr/bin/vconftool set -t int -f db/SyncML/oma-dm-service/DevManagement/NbDevManagement 3 -s oma-dm-agent::vconf_internal +## mformation test server ( http://mfiop25.mformation.com/iop ) +## Input the Phone number -> Input the IMEI number -> Manufacturer : Samsung -> Model : SGHT989 -> Not check Factory Bootstrapped -> Add button click +## --> Modify device -> Server Auth Preference : syncml:auth-basic -> Client Auth Preference : syncml:auth-basic -> Modify button clieck +#/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/AccName "gcf" -s oma-dm-agent::vconf_internal +#/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ServID "mform" -s oma-dm-agent::vconf_internal +#/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ServAddr "https://bobafett.mformation.com:461/oma/iop" -s oma-dm-agent::vconf_internal +#/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ServPwd "serverpwd" -s oma-dm-agent::vconf_internal +#/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ServNonce "MTIzNDU=" -s oma-dm-agent::vconf_internal +#/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ClientNonce "MTIzNDU=" -s oma-dm-agent::vconf_internal +## 0 : BASIC , 1 : DIGEST MD5 , 2 : HMAC , Default : DIGEST +#/usr/bin/vconftool set -t int -f db/SyncML/oma-dm-service/DevManagement/1/AuthType 0 -s oma-dm-agent::vconf_internal +#/usr/bin/vconftool set -t int -f db/SyncML/oma-dm-service/DevManagement/1/Port 461 -s oma-dm-agent::vconf_internal +#/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/UserName "clientid" -s oma-dm-agent::vconf_internal +#/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ClientPwd "clientpwd" -s oma-dm-agent::vconf_internal +##gcf test server +/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/AccName "gcf" -s oma-dm-agent::vconf_internal +/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ServID "RSate" -s oma-dm-agent::vconf_internal +/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ServAddr "http://192.168.168.169/dm" -s oma-dm-agent::vconf_internal +/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ServPwd "RSatepass" -s oma-dm-agent::vconf_internal +/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ServNonce "" -s oma-dm-agent::vconf_internal +/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ClientNonce "" -s oma-dm-agent::vconf_internal +/usr/bin/vconftool set -t int -f db/SyncML/oma-dm-service/DevManagement/1/AuthType 1 -s oma-dm-agent::vconf_internal +/usr/bin/vconftool set -t int -f db/SyncML/oma-dm-service/DevManagement/1/Port 80 -s oma-dm-agent::vconf_internal +/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/UserName "RSuser" -s oma-dm-agent::vconf_internal +/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ClientPwd "RSpass" -s oma-dm-agent::vconf_internal +############################################################################################################### +## Vconf setting... end +############################################################################################################### #/etc/init.d/oma-dm start + %preun /etc/init.d/oma-dm stop @@ -114,9 +140,6 @@ fi rm -f /tmp/agent_fw_event_omadm* rm -f /tmp/agent_fw_noti_reply_omadm* -rm -f /etc/rc.d/rc3.d/S91oma-dm-agent -rm -f /etc/rc.d/rc5.d/S91oma-dm-agent - rm -f /opt/usr/dbspace/.dm_service.db /opt/usr/dbspace/.dm_service.db-journal rm -f /opt/usr/dbspace/.omadmagent.db /opt/usr/dbspace/.omadmagent.db-journal rm -f /opt/usr/dbspace/.momanager.db /opt/usr/dbspace/.momanager.db-journal @@ -148,6 +171,8 @@ rm -rf /usr/share/oma-dm-cfg /usr/share/oma-dm-cfg/imei-setting/change_imei_callnum.sh /etc/init.d/oma-dm +%{_libdir}/systemd/system/oma-dm-agent.service +%{_libdir}/systemd/system/multi-user.target.wants/oma-dm-agent.service %files -n dm-private-plugins %manifest dm-private-plugins.manifest diff --git a/src/agent/common/dm_common.c b/src/agent/common/dm_common.c index e16175d..7c9e754 100755 --- a/src/agent/common/dm_common.c +++ b/src/agent/common/dm_common.c @@ -177,12 +177,14 @@ DM_ERROR reset_dm() _DEBUG_INFO("--------------------------------------------------------------------------------------------"); /* ddf mo db reset */ ret = clean_dm_mo(); + _DEBUG_INFO("clean_dm_mo [%d]", ret); if (ret != DM_OK) goto error; /* engine status db reset */ //ret = DB_Delete_Table(); ret = DB_Reset_Table(); + _DEBUG_INFO("DB_Reset_Table [%d]", ret); if (ret != DM_OK) goto error; @@ -210,7 +212,6 @@ DM_ERROR auto_operate_service_engine() engine_status *status = NULL; if (IsExist_Engine_id(FUMO_SERVICE_ENGINE) != 0) { - printf("engine id VALUE : %d ", FUMO_SERVICE_ENGINE); _DEBUG_INFO("engine id VALUE : %d ", FUMO_SERVICE_ENGINE); ret = Get_Engine_Status(FUMO_SERVICE_ENGINE, &status); @@ -231,7 +232,6 @@ DM_ERROR auto_operate_service_engine() } if (IsExist_Engine_id(LAWMO_SERVICE_ENGINE) != 0) { - printf("engine id VALUE : %d ", LAWMO_SERVICE_ENGINE); _DEBUG_INFO("engine id VALUE : %d ", LAWMO_SERVICE_ENGINE); ret = Get_Engine_Status(LAWMO_SERVICE_ENGINE, &status); @@ -560,6 +560,13 @@ DM_ERROR add_alarm_item(Reminder_Interval interval, char *alarm_type, CONFIG_TYP } break; */ + case INTERVAL_30MINUTES: + { + /* 30 minutes */ + alarm_info->repeat_type = REPEAT; + alarm_info->repeat_value = ((1 * 30) * 60); + } + break; case INTERVAL_1HOUR: { /* 1 hour */ @@ -1239,7 +1246,7 @@ void get_call_sate(int *call_state) * 1 : dont service * 2 : ? */ - if (vconf_get_int(VCONFKEY_TELEPHONY_CALL_STATE, call_state) != 0) { + if (vconf_get_int(VCONFKEY_CALL_STATE, call_state) != 0) { *call_state = -1; _DEBUG_INFO("end, call state : %d", *call_state); _EXTERN_FUNC_EXIT; diff --git a/src/agent/common/util/util.c b/src/agent/common/util/util.c index c62f435..0ddccfb 100755 --- a/src/agent/common/util/util.c +++ b/src/agent/common/util/util.c @@ -153,6 +153,7 @@ int launch_om_dm_fumo_noti_ui(int noti_data, char *session_id, char *server_id, } if (server_id == NULL) { result = bundle_add(pBundle, "FOTA_SERVERID", "1111"); + //result = bundle_add(pBundle, "FOTA_SERVERID", "mform"); } else { result = bundle_add(pBundle, "FOTA_SERVERID", server_id); } diff --git a/src/agent/dm-engine/bootstrap/factory_bootstrap.c b/src/agent/dm-engine/bootstrap/factory_bootstrap.c index daec555..b5294e8 100755 --- a/src/agent/dm-engine/bootstrap/factory_bootstrap.c +++ b/src/agent/dm-engine/bootstrap/factory_bootstrap.c @@ -280,40 +280,40 @@ void ddf_parser() { sync_agent_dm_mo_error_e err_code = sync_agent_construct_mo_table(mo_type_devdetail, schema_file_devdetail , "devdetail"); if (err_code == SYNC_AGENT_DM_MO_SUCCESS) { - printf("Success to sync_agent_construct_mo_table()\n"); + _DEBUG_INFO("Success to sync_agent_construct_mo_table()\n"); } else { - printf("Failed to sync_agent_construct_mo_table()\n"); + _DEBUG_INFO("Failed to sync_agent_construct_mo_table()\n"); } err_code = sync_agent_construct_mo_table(mo_type_devinfo, schema_file_devinfo , "devinf"); if (err_code == SYNC_AGENT_DM_MO_SUCCESS) { - printf("Success to sync_agent_construct_mo_table()\n"); + _DEBUG_INFO("Success to sync_agent_construct_mo_table()\n"); } else { - printf("Failed to sync_agent_construct_mo_table()\n"); + _DEBUG_INFO("Failed to sync_agent_construct_mo_table()\n"); } err_code = sync_agent_construct_mo_table(mo_type_fumo, schema_file_fumo , "fumo"); if (err_code == SYNC_AGENT_DM_MO_SUCCESS) { - printf("Success to sync_agent_construct_mo_table()\n"); + _DEBUG_INFO("Success to sync_agent_construct_mo_table()\n"); } else { - printf("Failed to sync_agent_construct_mo_table()\n"); + _DEBUG_INFO("Failed to sync_agent_construct_mo_table()\n"); } err_code = sync_agent_construct_mo_table(mo_type_gcf, schema_file_gcf , "dmacc_gcf"); if (err_code == SYNC_AGENT_DM_MO_SUCCESS) { - printf("Success to sync_agent_construct_mo_table()\n"); + _DEBUG_INFO("Success to sync_agent_construct_mo_table()\n"); } else { - printf("Failed to sync_agent_construct_mo_table()\n"); + _DEBUG_INFO("Failed to sync_agent_construct_mo_table()\n"); } err_code = sync_agent_construct_mo_table(mo_type_mscserver, schema_file_mscserver , "dmacc_MSCserver"); if (err_code == SYNC_AGENT_DM_MO_SUCCESS) { - printf("Success to sync_agent_construct_mo_table()\n"); + _DEBUG_INFO("Success to sync_agent_construct_mo_table()\n"); } else { - printf("Failed to sync_agent_construct_mo_table()\n"); + _DEBUG_INFO("Failed to sync_agent_construct_mo_table()\n"); } err_code = sync_agent_construct_mo_table(mo_type_msctestserver, schema_file_msctestserver , "dmacc_MSCTestserver"); if (err_code == SYNC_AGENT_DM_MO_SUCCESS) { - printf("Success to sync_agent_construct_mo_table()\n"); + _DEBUG_INFO("Success to sync_agent_construct_mo_table()\n"); } else { - printf("Failed to sync_agent_construct_mo_table()\n"); + _DEBUG_INFO("Failed to sync_agent_construct_mo_table()\n"); } */ 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 30e4d04..55d02d6 100755 --- a/src/agent/dm-engine/dl-manager/sa_fw_downloader.c +++ b/src/agent/dm-engine/dl-manager/sa_fw_downloader.c @@ -178,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-I8800 SyncML_DM Client"); + add_header_info(&header_info, "User-Agent", "Samsung electronics Tizen 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); @@ -291,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-I8800 SyncML_DM Client"); +// add_header_info(&header_info, "User-Agent", "Samsung electronics Tizen 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); @@ -353,7 +353,6 @@ DM_ERROR download_data(char *local_uri, char *content_type, GList * header_info, _DEBUG_INFO("returnerror = %d\n", ret); res = sync_agent_close_connection(transportType, net_session_id); - _DEBUG_INFO("res =%d\n", res); _EXTERN_FUNC_EXIT; return ret; diff --git a/src/agent/dm-engine/fumo/fumo_account.c b/src/agent/dm-engine/fumo/fumo_account.c index 9201fb9..af577eb 100755 --- a/src/agent/dm-engine/fumo/fumo_account.c +++ b/src/agent/dm-engine/fumo/fumo_account.c @@ -14,6 +14,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +#include <stdio.h> +#include <string.h> +#include <stdlib.h> +#include <vconf.h> +#include <vconf-keys.h> +#include <libsoup/soup.h> +#include <glib.h> +#include <libxml/parser.h> +#include <libxml/tree.h> + /*sync-agent*/ #include <sync_agent.h> @@ -27,6 +37,33 @@ #define LOG_TAG "FUMO_ENGINE" #endif +#define PATH_LEN 256 +#define STRING_MAX_LEN 1024 + +#define DEF_DEVDETAIL_FWV "db/SyncML/oma-dm-service/DevDetail/FwV" + +typedef struct { + char *object_url; + char *info_model; + char *info_cc; + char *polling_period; + char *polling_time; + char *polling_range; + int exist_current_version; +} Polling_Descriptor; + +typedef enum { + POLL_NODE_NO_TYPE = 0, + POLL_NODE_OBJECT_URL, + POLL_NODE_MODEL, + POLL_NODE_CC, + POLL_NODE_PERIOD, + POLL_NODE_TIME, + POLL_NODE_RANGE, + POLL_NODE_VALUE +} POLL_NODE_TYPE; + + int register_fota_account() { _EXTERN_FUNC_ENTER; @@ -51,18 +88,19 @@ int register_fota_account() do { err = sync_agent_initialize_mo(3); if (err == SYNC_AGENT_DM_MO_FAIL) { - _DEBUG_INFO("fail register fota account : %d ", err); + _DEBUG_INFO("fail register fota account : %d, count[%d]", err, count); ret = 0; } else { - _DEBUG_INFO("success register fota account : %d ", err); + _DEBUG_INFO("success register fota account : %d, count[%d]", err, count); break; } count++; - } while (err == SYNC_AGENT_DM_MO_FAIL && count < 2); + } while (err == SYNC_AGENT_DM_MO_FAIL && count < 4); + //} while (err == SYNC_AGENT_DM_MO_FAIL && count < 2); // fota_registration try count if (err == SYNC_AGENT_DM_MO_FAIL) { //ret = set_account_registration_alarm(FUMO_ACCOUNT_ALARM, FUMO_ACCOUNT_ALARM_TYPE); - //_DEBUG_INFO("add fota account registration alarm : %d ", ret); + _DEBUG_ERROR("add fota account registration fail"); ret = 0; } else { ret = set_config_int(FUMO_ACCOUNT_FLAG_TYPE, FUMO_ACCOUNT_FLAG, 1, FUMO_ENGINE, 0); diff --git a/src/agent/dm-engine/fumo/fumo_engine.c b/src/agent/dm-engine/fumo/fumo_engine.c index a0b6986..2382e09 100755 --- a/src/agent/dm-engine/fumo/fumo_engine.c +++ b/src/agent/dm-engine/fumo/fumo_engine.c @@ -31,6 +31,7 @@ #include "ipc_common.h" #include "ipc_agent.h" +//#include "cordon_common.h" #define MAX_FILE_SIZE 52428800 /* 50 MB */ //#define MAX_FILE_SIZE 2042626048 /* 1948 MB : (2*1024*1024*1024) - (100*1024*1024) */ diff --git a/src/agent/dm-engine/lawmo/lawmo_account.c b/src/agent/dm-engine/lawmo/lawmo_account.c index e4d5469..5bdf57d 100644..100755 --- a/src/agent/dm-engine/lawmo/lawmo_account.c +++ b/src/agent/dm-engine/lawmo/lawmo_account.c @@ -21,6 +21,7 @@ /*dm-agent*/ #include "common/dm_common.h" #include "dm-engine/lawmo/lawmo_account.h" +#include <vconf.h> #ifndef OMADM_AGENT_LOG #undef LOG_TAG diff --git a/src/agent/dm-engine/lawmo/lawmo_engine.c b/src/agent/dm-engine/lawmo/lawmo_engine.c index 06a5476..e00590f 100644..100755 --- a/src/agent/dm-engine/lawmo/lawmo_engine.c +++ b/src/agent/dm-engine/lawmo/lawmo_engine.c @@ -26,6 +26,8 @@ #include "mo-handler/dm_mo_common.h" #include "mo-handler/dm_mo_handler.h" +#include <vconf.h> + #ifndef OMADM_AGENT_LOG #undef LOG_TAG #define LOG_TAG "LAWMO_ENGINE" @@ -40,8 +42,8 @@ static DM_ERROR _vendor_dependency_lawmo_operation(char *full_path, LAWMO_Result DM_ERROR lawmo_exec(char *full_path, char *correlator, LAWMO_Result_code * lawmo_return, int check_operation) { + _EXTERN_FUNC_ENTER; - _DEBUG_INFO(" start\n"); DM_ERROR ret = DM_OK; retvm_if((full_path) == NULL, COMMON_ERR_IS_NULL, "full_path is NULL!!"); @@ -109,11 +111,12 @@ DM_ERROR lawmo_exec(char *full_path, char *correlator, LAWMO_Result_code * lawmo } str_free(&result_mo_type); - _DEBUG_INFO(" end\n"); + _EXTERN_FUNC_EXIT; return ret; error: str_free(&result_mo_type); _DEBUG_INFO(" end error : %d \n", ret); + _EXTERN_FUNC_EXIT; return ret; } diff --git a/src/agent/framework/san-parser/pm_sanparser.c b/src/agent/framework/san-parser/pm_sanparser.c index f82cad9..47bb556 100644..100755 --- a/src/agent/framework/san-parser/pm_sanparser.c +++ b/src/agent/framework/san-parser/pm_sanparser.c @@ -339,8 +339,9 @@ void san_printmsg(SanPackage * san) _DEBUG_INFO("MsgBody without Digest :\n\t"); for (i = 0; i < san->msgBodyWithoutDigestLength; i++) { _DEBUG_INFO("%02x ", san->msgBodyWithoutDigest[i]); - if ((i + 1) % 16 == 0) - printf("\n\t"); + if ((i + 1) % 16 == 0) { + //printf("\n\t"); + } } _DEBUG_INFO("\n"); diff --git a/src/agent/framework/ui-event-handler/ipc_agent.c b/src/agent/framework/ui-event-handler/ipc_agent.c index 5f670f8..d50fce4 100755 --- a/src/agent/framework/ui-event-handler/ipc_agent.c +++ b/src/agent/framework/ui-event-handler/ipc_agent.c @@ -126,14 +126,16 @@ static int __check_ui_mode(char **ui_mode, char *input_string) return RESPONSE_TYPE_OK; } -static int __launch_ui(char *ui_mode, int noti_type) +//static int __launch_ui(char *ui_mode, int noti_type) +static int __launch_ui(char *ui_mode, int noti_id) { _INNER_FUNC_ENTER; int ui_ret = 1; if (ui_mode != NULL) { - _DEBUG_INFO("ui_mode[%s], noti_type[%d]", ui_mode, noti_type); + //_DEBUG_INFO("ui_mode[%s], noti_type[%d]", ui_mode, noti_type); + _DEBUG_INFO("ui_mode[%s], noti_id[%d]", ui_mode, noti_id); if (strcmp(ui_mode, OMADM_FUMO_UI_TYPE) == 0) { ui_ret = launch_oma_dm_fumo_ui(); @@ -150,7 +152,8 @@ static int __launch_ui(char *ui_mode, int noti_type) } _DEBUG_INFO("noti ui : %d", ui_ret); } else if (strcmp(ui_mode, OMADM_FUMO_BACKGROUND_UI_TYPE) == 0) { - if (noti_type == NOTI_INSTALL) { + //if (noti_type == NOTI_INSTALL) { + if (noti_id == NOTI_INSTALL) { ui_ret = launch_om_dm_fumo_noti_ui(NOTI_TYPE_BACKGRUOUND, NULL, NULL, 0); _DEBUG_INFO("noti ui : %d", ui_ret); } @@ -1624,7 +1627,8 @@ static int _IPC_noti(int noti_type, int noti_id, int input_param, char *input_st } _DEBUG_TRACE("ui mode : %s", ui_mode); - ret = __launch_ui(ui_mode, noti_type); + //ret = __launch_ui(ui_mode, noti_type); + ret = __launch_ui(ui_mode, noti_id); if (ret == -1) { str_free(&(ui_mode)); _INNER_FUNC_EXIT; diff --git a/src/agent/main.c b/src/agent/main.c index 7aa97e8..aaf8d81 100755 --- a/src/agent/main.c +++ b/src/agent/main.c @@ -240,9 +240,35 @@ static void _confversion_check() return ; } -int main() +int main(int argc, char *argv[]) { _EXTERN_FUNC_ENTER; + + if( argc == 2 ) { + if(strncmp(argv[1], "booting", strlen("booting")) == 0) { + FILE * pFile_fota_enabled = NULL; + FILE * pFile_lawmo_enabled = NULL; + pFile_fota_enabled = fopen("/opt/data/fota/oma-dm/.oma-dm-agent-enabled", "r"); + pFile_lawmo_enabled = fopen("/opt/data/fota/oma-dm/.lawmo_oma-dm-agent-enabled", "r"); + if(pFile_fota_enabled == NULL && pFile_lawmo_enabled == NULL) { + exit(0); + } + + if(pFile_fota_enabled != NULL) { + fclose(pFile_fota_enabled); + pFile_fota_enabled = NULL; + } + if(pFile_lawmo_enabled != NULL) { + fclose(pFile_lawmo_enabled); + pFile_lawmo_enabled = NULL; + } + } + } + + + + + // _DEBUG_INFO("[TIME] 1. main : %d msec\n", appcore_measure_time_from("APP_START_TIME")); // appcore_measure_start(); diff --git a/src/agent/mo-handler/dm_mo_common.c b/src/agent/mo-handler/dm_mo_common.c index d742414..7334022 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-I8800"; + char *value4 = "GT-I8800"; // not using code. 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-I8800"; + char *value10 ="GT-I8800"; // not using code. sync_agent_dm_mo_node_type_e mo_node_type10 = SYNC_AGENT_DM_MO_NODE_LEAF; char *mo_full_path11 =DM_DEVINFO_LRGOBJ; @@ -1410,9 +1410,8 @@ 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); - } + sync_agent_free_serverinfo(server_info); + _EXTERN_FUNC_EXIT; return COMMON_ERR_IS_NULL; } 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 91dd194..67e781e 100755 --- a/src/agent/serviceadapter/dm-phase-handler/dm_phase_handler.c +++ b/src/agent/serviceadapter/dm-phase-handler/dm_phase_handler.c @@ -177,6 +177,7 @@ static DM_ERROR _generate_setupphase_msg(Session ** session, char *pServer_id, c goto error; } else { (*session)->msgID = 0; + (*session)->cmdID = 1; #ifdef _DM_BUNDANG_TEST /*redirection code */ @@ -595,7 +596,7 @@ static DM_ERROR _generate_management_msg(Session ** session, char **msg, unsigne unsigned int xml_size = 0; err = sync_agent_get_xml_from_protocol_binder(pBinder, &xml, &xml_size); if (err == SYNC_AGENT_PB_RETURN_OK) { - fprintf(stderr, " msg from client \n"); + _DEBUG_INFO(" msg from client"); if (fputs(xml, stderr) == EOF) { _DEBUG_TRACE("debuging test error"); } @@ -1127,7 +1128,6 @@ DM_ERROR _send_msg(char *accType, int transportType, Session ** session, char *s _DEBUG_TRACE("server url : %s", server_url); //timeout : 30 seconds res = sync_agent_open_connection(transportType, 30, (unsigned int *)(&(net_session_id))); - _DEBUG_TRACE("res =%d\n", res); if (res != SYNC_AGENT_NA_SUCCESS) { @@ -1240,8 +1240,10 @@ DM_ERROR _send_msg(char *accType, int transportType, Session ** session, char *s goto error; } - if (sendMsg != NULL) + if (sendMsg != NULL) { free(sendMsg); + } + _INNER_FUNC_EXIT; return ret; @@ -1251,6 +1253,7 @@ DM_ERROR _send_msg(char *accType, int transportType, Session ** session, char *s if (sendMsg != NULL) free(sendMsg); + _INNER_FUNC_EXIT; return ret; } @@ -1394,6 +1397,9 @@ DM_ERROR setup_phase(int transportType, Session ** session, char *pServer_id, ch 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); + if(file_count >= 500) { + file_count = 0; + } ret = _recv_msg(session, recv_msg, recv_msg_size, service_engine_id, isFinish, isgenericAlert); if (ret != DM_ERR_UNAUTHORIZED && ret != DM_ERR_AUTHENTICATION_REQUIRED) { @@ -1463,6 +1469,9 @@ DM_ERROR management_phase(int transportType, Session ** session, char *pSession_ snprintf(file_name, (int)sizeof(file_name), "/opt/data/oma-dm-cfg/packet/wbxml_msg_%d_management_receivced.wbxml", file_count); _DEBUG_INFO("file name : %s", file_name); sync_agent_write_whole_file(file_name, recvMsg, recvMsg_size, true); + if(file_count >= 500) { + file_count = 0; + } ret = recv_msg(session, recvMsg, recvMsg_size, service_engine_id, isFinish, 0); if (ret != DM_OK) @@ -1522,6 +1531,9 @@ DM_ERROR generic_alert(int transportType, Session ** session, char *pServer_id, 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); + if(file_count >= 500) { + file_count = 0; + } ret = recv_msg(session, recvMsg, recvMsg_size, &service_engine_id, isFinish, isgeneticAlert); _DEBUG_INFO(" Recv_Msg : %d count : %d \n ", ret, count); diff --git a/src/agent/serviceadapter/networkbinder/na_binder.c b/src/agent/serviceadapter/networkbinder/na_binder.c index 14dc5af..61bc3bf 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-I8800 SyncML_DM Client"; + useragent->value = "Samsung electronics Tizen SyncML_DM Client"; *list = g_list_append(*list, useragent); _DEBUG_INFO(" user agent\n"); diff --git a/src/agent/serviceadapter/sa_syncml_binders.c b/src/agent/serviceadapter/sa_syncml_binders.c index b271680..d40fae3 100755 --- a/src/agent/serviceadapter/sa_syncml_binders.c +++ b/src/agent/serviceadapter/sa_syncml_binders.c @@ -221,7 +221,7 @@ DM_ERROR reverse_syncml_objectbinder(SyncML ** pSyncML, char *recv_msg, unsigned unsigned int xml_size = 0; */ err = sync_agent_get_xml_from_reverse_protocol_binder(pBinder, xml, xml_len); if (err == SYNC_AGENT_PB_RETURN_OK) { - fprintf(stderr, " msg from server \n"); + _DEBUG_INFO(" msg from server"); if (fputs((*xml), stderr) == EOF) { _DEBUG_INFO("debugging test error"); } diff --git a/src/agent/serviceadapter/sa_util.c b/src/agent/serviceadapter/sa_util.c index 287e960..51c6bb6 100755 --- a/src/agent/serviceadapter/sa_util.c +++ b/src/agent/serviceadapter/sa_util.c @@ -291,11 +291,11 @@ DM_ERROR gemerate_hmac(char *username, char *password, unsigned char *nonce, uns size = 16; i = 0; - printf("gener : "); + _DEBUG_INFO("gener : "); for (i = 0; i < size; ++i) { - printf(" %02x", resultmd6[i]); + _DEBUG_INFO(" %02x", resultmd6[i]); } - printf("\n"); + //_DEBUG_INFO("\n"); /* Return the base 64 of digest */ temp_result3 = g_base64_encode(resultmd6, size); |