Fix x86_64 build-install Compliance 96/3696/1
authorBaptiste DURAND <baptiste.durand@eurogiciel.fr>
Tue, 28 May 2013 14:17:49 +0000 (16:17 +0200)
committerBaptiste DURAND <baptiste.durand@eurogiciel.fr>
Tue, 28 May 2013 14:17:49 +0000 (16:17 +0200)
-> Fix hardcoded path
-> MmsPluginStorage.cpp: change variable type from unsinged int to size_t to avoid:
cannot convert 'unsigned int*' to 'size_t* {aka long unsigned int*}' for argument '2' to 'char* _MsgMmsSerializeMessageData(const MMS_MESSAGE_DATA_S*, size_t*)'

CMakeLists.txt
config/plugin.cfg [deleted file]
config/plugin.cfg.in [new file with mode: 0755]
packaging/msg-service.spec
plugin/mms_plugin/MmsPluginStorage.cpp

index c0c09a8..239d555 100755 (executable)
@@ -43,7 +43,7 @@ INSTALL(FILES ${MAPI-HEADERS} DESTINATION include/msg-service)
 ##########################################################
 # Install etc Files
 ##########################################################
-
+CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config/plugin.cfg.in ${CMAKE_CURRENT_SOURCE_DIR}/config/plugin.cfg @ONLY)
 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/config/plugin.cfg DESTINATION /usr/share/msg-service)
 
 SET(RINGTONE-FILES
diff --git a/config/plugin.cfg b/config/plugin.cfg
deleted file mode 100755 (executable)
index 498d80d..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-[sms-plugin]
-type=sms
-path=/usr/lib/libmsg_sms_plugin.so
-
-[mms-plugin]
-type=mms
-path=/usr/lib/libmsg_mms_plugin.so
diff --git a/config/plugin.cfg.in b/config/plugin.cfg.in
new file mode 100755 (executable)
index 0000000..725d2b8
--- /dev/null
@@ -0,0 +1,7 @@
+[sms-plugin]
+type=sms
+path=@LIB_INSTALL_DIR@/libmsg_sms_plugin.so
+
+[mms-plugin]
+type=mms
+path=@LIB_INSTALL_DIR@/libmsg_mms_plugin.so
index 68f4a91..2ba2bb5 100755 (executable)
@@ -355,7 +355,7 @@ chmod 660 /opt/usr/dbspace/.msg_service.db-journal
 mkdir -p /opt/usr/data/msg-service
 chgrp db_msg_service /opt/usr/data/msg-service
 
-if [ -f /usr/lib/rpm-plugins/msm.so ]
+if [ -f %{_libdir}/rpm-plugins/msm.so ]
 then
        chsmack -a 'msg-service::db' /opt/usr/dbspace/.msg_service.db*
         chsmack -a "_" -e "_" /etc/rc.d/init.d/msg-server
index d99d4df..91950ca 100755 (executable)
@@ -478,7 +478,7 @@ msg_error_t MmsPluginStorage::plgGetMmsMessage(MSG_MESSAGE_INFO_S *pMsg, MSG_SEN
        MMS_MESSAGE_DATA_S tempMmsMsg = {0,};
        MMS_MESSAGE_DATA_S *pMmsMsg = &tempMmsMsg;
        int partCnt = 0;
-       unsigned int nSize = 0;
+       size_t nSize = 0;
 
        MsgType partHeader;
        MmsAttrib pMmsAttrib;
@@ -1425,8 +1425,8 @@ msg_error_t MmsPluginStorage::plgGetMmsMessage(MSG_MESSAGE_INFO_S *pMsg, MSG_SEN
        msg_error_t     err = MSG_SUCCESS;
        MMS_MESSAGE_DATA_S tempMmsMsgData = {0,};
        MMS_MESSAGE_DATA_S *pMmsMsg = &tempMmsMsgData;
-
-       unsigned int nSize = 0;
+       size_t nSize = 0;
        bool bMultipartRelated = false;
 
        bzero(pMmsMsg, sizeof(MMS_MESSAGE_DATA_S));