Remove hardcoded path for multiuser support
[platform/core/system/sync-agent.git] / src / fw-plugins / common-public / slp-sysnoti-wap-push / src / plugin_interface.c
index e95a981..47619e4 100755 (executable)
@@ -37,6 +37,8 @@
 /* for log */
 #include "utility/sync_util.h"
 
+#include <tzplatform_config.h>
+
 #ifndef EXPORT_API
 #define EXPORT_API __attribute__ ((visibility("default")))
 #endif
@@ -46,8 +48,8 @@
 #define LOG_TAG        "PLUGIN_PM_SYSNOTI_WAP_PUSH"
 #endif
 
-#define CP_HEADER_DATA_PATH "/opt/data/header_log.wbxml"
-#define CP_BODY_DATA_PATH "/opt/data/body_log.wbxml"
+#define CP_HEADER_DATA_PATH tzplatform_mkpath(TZ_SYS_DATA,"header_log.wbxml")
+#define CP_BODY_DATA_PATH tzplatform_mkpath(TZ_SYS_DATA,"body_log.wbxml")
 
 static msg_handle_t msg_handle = NULL;
 
@@ -629,6 +631,10 @@ void ___operation_syncml_msg_cb(msg_handle_t handle, int msg_id, int ext_id, voi
                registered_wap_push_operation_cb(0, (void *)san_operation);
        } else {
                _DEBUG_ERROR("not registered registered_wap_push_operation_cb !!");
+               if(san_operation != NULL) {
+                       free(san_operation);
+                       san_operation = NULL;
+               }
        }
 
        _INNER_FUNC_EXIT;