build warnings removed 75/26075/1
authorAmarnath Valluri <amarnath.valluri@linux.intel.com>
Fri, 15 Aug 2014 07:59:49 +0000 (10:59 +0300)
committerAmarnath Valluri <amarnath.valluri@linux.intel.com>
Fri, 15 Aug 2014 08:42:51 +0000 (11:42 +0300)
Change-Id: I09b7bb5d190dd185f51c06703fc5e254e38b7bba
Signed-off-by: Amarnath Valluri <amarnath.valluri@linux.intel.com>
daemon/dbus-manager.c
daemon/dbus-service.c
daemon/main.c
packaging/message-port.changes
tests/test-app.c
tests/test-app.cpp

index 6d6ecde..667ae8c 100644 (file)
@@ -346,7 +346,8 @@ msgport_dbus_manager_validate_peer_certificate (MsgPortDbusManager *dbus_manager
     DBG("certificate comparison result : %d", compare_result);
 
     is_valid_cert = (compare_result == PMINFO_CERT_COMPARE_MATCH) ;
-    g_hash_table_insert (dbus_manager->priv->peer_certs, g_strdup (peer_app_id), (gpointer)is_valid_cert);
+    g_hash_table_insert (dbus_manager->priv->peer_certs, g_strdup (peer_app_id),
+            GUINT_TO_POINTER(is_valid_cert));
 
     return is_valid_cert;
 }
index 0aaf1e7..810fd7f 100644 (file)
@@ -49,6 +49,11 @@ _dbus_service_finalize (GObject *self)
 {
     MsgPortDbusService *dbus_service = MSGPORT_DBUS_SERVICE (self);
 
+    if (dbus_service->priv->port_name) {
+        g_free (dbus_service->priv->port_name);
+        dbus_service->priv->port_name = NULL;
+    }
+
     G_OBJECT_CLASS (msgport_dbus_service_parent_class)->finalize (self);
 }
 
@@ -77,9 +82,9 @@ _dbus_service_handle_send_message (
 {
     MsgPortDbusService *peer_dbus_service = NULL;
     MsgPortManager *manager = NULL;
-    GError *error;
+    GError *error = NULL;
 
-    msgport_return_val_if_fail_with_error (dbus_service &&  MSGPORT_IS_DBUS_SERVICE (dbus_service), FALSE, &error);
+    msgport_return_val_if_fail (dbus_service &&  MSGPORT_IS_DBUS_SERVICE (dbus_service), FALSE);
 
     DBG ("Send Message rquest on service %p to remote service id : %d", dbus_service, remote_service_id);
     manager = msgport_dbus_manager_get_manager (dbus_service->priv->owner);
@@ -109,8 +114,7 @@ _dbus_service_handle_unregister (
     GDBusMethodInvocation *invocation,
     gpointer               userdata)
 {
-    GError *error = NULL;
-    msgport_return_val_if_fail_with_error (dbus_service && MSGPORT_IS_DBUS_SERVICE (dbus_service), FALSE, &error);
+    msgport_return_val_if_fail (dbus_service && MSGPORT_IS_DBUS_SERVICE (dbus_service), FALSE);
 
     /* FIXME unregister */
     return TRUE;
index 6d14db8..321a69d 100644 (file)
@@ -26,6 +26,7 @@
 #include "config.h"
 
 #include <glib.h>
+#include <glib-unix.h>
 #include "common/log.h"
 #ifdef USE_SESSION_BUS
 #include "common/dbus-error.h"
index 77882e1..f91b315 100644 (file)
@@ -1,3 +1,7 @@
+* Wed Feb 19 2014 Amarnath Valluri <amarnath.valluri@linux.intel.com> accepted/tizen/ivi/20140127.173432@89deb20
+- Release 1.0.2-2
+- Bug Fixes: TIVI-2641
+
 * Wed Nov 27 2013 Amarnath Valluri <amarnath.valluri@linux.intel.com> accepted/tizen_ivi_stable/20131119.040253@0f4bb8e
 - Release 1.0.0-2
 - Fix-Issue TIVI-2159: Double free of bundle in message handler
index c5584c5..c7a2bec 100644 (file)
  */
 
 #include "config.h"
+#include <bundle.h>
 #include <glib.h>
-#include <unistd.h>
+#include <glib/gprintf.h>
+#include <glib-unix.h>
+#include <message-port.h>
 #include <stdlib.h>
 #include <string.h>
-#include <message-port.h>
-#include <bundle.h>
 #include <unistd.h>
 
 int __pipe[2]; /* pipe between two process */
@@ -56,10 +57,10 @@ do { \
 }while (0)
 
 
-#define test_assert(expr, msg...) \
+#define test_assert(expr, msg, args...) \
 do { \
     if ((expr) == FALSE) {\
-        g_print ("%s +%d: assert(%s):%s\n", __FUNCTION__, __LINE__, #expr, ##msg); \
+        g_print ("%s +%d: assert(%s):"msg"\n", __FUNCTION__, __LINE__, #expr, ##args); \
         return FALSE; \
     } \
 } while(0);
@@ -99,7 +100,6 @@ void (_on_parent_got_message)(int port_id, const char* remote_app_id, const char
 {
     gchar *name = NULL;
     gboolean found = FALSE;
-    bundle *b = NULL;
     messageport_get_local_port_name (port_id, &name),
     g_debug ("PARENT: GOT MESSAGE at prot %s FROM :'%s' app - '%s' port", name,
         remote_app_id ? remote_app_id : "unknwon", remote_port ? remote_port : "unknwon");
@@ -175,7 +175,7 @@ test_register_trusted_local_port()
 static gboolean
 test_check_remote_port()
 {
-    const gchar remote_app_id[128];
+    gchar remote_app_id[128];
     gboolean found = FALSE;
     messageport_error_e res;
 
@@ -191,7 +191,7 @@ test_check_remote_port()
 static gboolean
 test_check_trusted_remote_port()
 {
-    const gchar remote_app_id[128];
+    gchar remote_app_id[128];
     gboolean found = FALSE;
     messageport_error_e res;
 
@@ -207,7 +207,7 @@ static gboolean
 test_send_message()
 {
     messageport_error_e res;
-    const gchar remote_app_id[128];
+    gchar remote_app_id[128];
     bundle *b = bundle_create ();
     bundle_add (b, "Name", "Amarnath");
     bundle_add (b, "Email", "amarnath.valluri@intel.com");
@@ -229,7 +229,7 @@ static gboolean
 test_send_trusted_message()
 {
     messageport_error_e res;
-    const gchar remote_app_id[128];
+    gchar remote_app_id[128];
     bundle *b = bundle_create ();
     bundle_add (b, "Name", "Amarnath");
     bundle_add (b, "Email", "amarnath.valluri@intel.com");
@@ -263,7 +263,7 @@ test_send_bidirectional_message()
 {
     messageport_error_e res;
     int local_port_id = 0;
-    const gchar remote_app_id[128];
+    gchar remote_app_id[128];
     gchar result[32];
     gboolean child_got_message = FALSE;
     bundle *b = bundle_create ();
@@ -307,7 +307,7 @@ test_send_bidirectional_trusted_message()
 {
     messageport_error_e res;
     int local_port_id = 0;
-    const gchar remote_app_id[128];
+    gchar remote_app_id[128];
     gchar result[32];
     gboolean child_got_message = FALSE;
     bundle *b = bundle_create ();
index d1746d0..2cc13f0 100644 (file)
@@ -41,7 +41,9 @@ struct AsyncTestData {
     bool result;
 }; 
 static int __pipe[2];
+#ifdef USE_SESSION_BUS
 static pid_t __daemon_pid = 0;
+#endif // USE_SESSION_BUS
 
 #define TEST_PARENT_PORT "test-parent-port"
 #define TEST_PARENT_TRUSTED_PORT "test-parent-trusted-port"
@@ -385,6 +387,8 @@ _update_test_result (gpointer userdata)
     AsyncTestData *test_data = (AsyncTestData *)userdata;
     test_data->result = false;
     g_main_loop_quit (test_data->m_loop);
+
+    return FALSE;
 }
 
 static bool