aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYong-iL Joh <yong-il.joh@windriver.com>2016-02-18 14:11:29 +0900
committerYong-iL Joh <yong-il.joh@windriver.com>2016-02-18 14:11:29 +0900
commit534920c5f56d98bcdf9b2e3dbc602d5b88dcdad2 (patch)
tree69ed0f057a0aa0549c529726b49550ff8b817f34
parent992c40382af09a1bcc71de856fec1c2e02ddb320 (diff)
downloadmeta-ivi-534920c5f56d98bcdf9b2e3dbc602d5b88dcdad2.tar.gz
meta-ivi-534920c5f56d98bcdf9b2e3dbc602d5b88dcdad2.tar.bz2
meta-ivi-534920c5f56d98bcdf9b2e3dbc602d5b88dcdad2.zip
dbus: change patches for common API c++/c++-dbus 3.1.5
Signed-off-by: Yong-iL Joh <yong-il.joh@windriver.com>
-rw-r--r--meta-ivi/recipes-core-ivi/dbus/dbus/capi-dbus-add-send-with-reply-set-notify.patch4
-rw-r--r--meta-ivi/recipes-core-ivi/dbus/dbus/capi-dbus-add-support-for-custom-marshalling.patch (renamed from meta-ivi/recipes-core-ivi/dbus/dbus/dbus-DBusMessage-add-support-for-custom-marshaling.patch)120
-rw-r--r--meta-ivi/recipes-core-ivi/dbus/dbus/capi-dbus-block-acquire-io-path-on-send.patch14
-rw-r--r--meta-ivi/recipes-core-ivi/dbus/dbus/capi-dbus-correct-dbus-connection-block-pending-call.patch13
-rw-r--r--meta-ivi/recipes-core-ivi/dbus/dbus_%.bbappend4
5 files changed, 67 insertions, 88 deletions
diff --git a/meta-ivi/recipes-core-ivi/dbus/dbus/capi-dbus-add-send-with-reply-set-notify.patch b/meta-ivi/recipes-core-ivi/dbus/dbus/capi-dbus-add-send-with-reply-set-notify.patch
index 3f92169..fee91c3 100644
--- a/meta-ivi/recipes-core-ivi/dbus/dbus/capi-dbus-add-send-with-reply-set-notify.patch
+++ b/meta-ivi/recipes-core-ivi/dbus/dbus/capi-dbus-add-send-with-reply-set-notify.patch
@@ -106,17 +106,17 @@ index e1068e3..233f179 100644
+ timeout_milliseconds,
+ reply_handler_timeout);
+
++ CONNECTION_UNLOCK (connection);
+ if (pending == NULL)
+ {
-+ CONNECTION_UNLOCK (connection);
+ return FALSE;
+ }
+
+ if (!dbus_pending_call_set_notify(pending, function0, user_data0, free_user_data0))
+ {
-+ CONNECTION_UNLOCK (connection);
+ return FALSE;
+ }
++ CONNECTION_LOCK (connection);
+
+ /* Assign a serial to the message */
+ serial = dbus_message_get_serial (message);
diff --git a/meta-ivi/recipes-core-ivi/dbus/dbus/dbus-DBusMessage-add-support-for-custom-marshaling.patch b/meta-ivi/recipes-core-ivi/dbus/dbus/capi-dbus-add-support-for-custom-marshalling.patch
index 5f225f3..78b073c 100644
--- a/meta-ivi/recipes-core-ivi/dbus/dbus/dbus-DBusMessage-add-support-for-custom-marshaling.patch
+++ b/meta-ivi/recipes-core-ivi/dbus/dbus/capi-dbus-add-support-for-custom-marshalling.patch
@@ -1,75 +1,23 @@
-From 467a2e307462b02865b35397c572b6048c2934e2 Mon Sep 17 00:00:00 2001
-From: Aleksandar Kanchev <kanchev@itestra.com>
-Date: Mon, 9 Jul 2012 18:09:04 +0200
-Subject: [PATCH] DBusMessage: add support for custom marshaling
+From 7b0925938400b970bf699a9188fe03b7271eeead Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=BCrgen=20Gehring?= <juergen.gehring@bmw.de>
+Date: Thu, 23 Apr 2015 01:18:11 -0700
+Subject: [PATCH] Add functions to support querying and manipulating the
+ message body and signature. This is useful for code generators, which can
+ generate custom marshaling functions based on a given IDL. Those functions
+ tend to be optimized and faster than the generic iterator based marshaling.
-Add functions to support querying and manipulating the message body and
-signature. This is useful for code generators, which can generate custom
-marshaling functions based on a given IDL. Those functions tend to be
-optimized and faster than the generic iterator based marshaling.
---
- dbus/dbus-message.c | 143 +++++++++++++++++++++++++++++++++++----------------
- dbus/dbus-message.h | 13 +++++
- dbus/dbus-string.c | 16 ++++++
- dbus/dbus-string.h | 4 ++
- 4 files changed, 132 insertions(+), 44 deletions(-)
+ dbus/dbus-message.c | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++++
+ dbus/dbus-message.h | 14 ++++++++
+ dbus/dbus-string.c | 16 +++++++++
+ dbus/dbus-string.h | 5 +++
+ 4 files changed, 134 insertions(+)
diff --git a/dbus/dbus-message.c b/dbus/dbus-message.c
-index 24ef5ac..fbacfba 100644
+index 43cb1be..d34663a 100644
--- a/dbus/dbus-message.c
+++ b/dbus/dbus-message.c
-@@ -356,50 +356,6 @@ set_or_delete_string_field (DBusMessage *message,
- &value);
- }
-
--#if 0
--/* Probably we don't need to use this */
--/**
-- * Sets the signature of the message, i.e. the arguments in the
-- * message payload. The signature includes only "in" arguments for
-- * #DBUS_MESSAGE_TYPE_METHOD_CALL and only "out" arguments for
-- * #DBUS_MESSAGE_TYPE_METHOD_RETURN, so is slightly different from
-- * what you might expect (it does not include the signature of the
-- * entire C++-style method).
-- *
-- * The signature is a string made up of type codes such as
-- * #DBUS_TYPE_INT32. The string is terminated with nul (nul is also
-- * the value of #DBUS_TYPE_INVALID). The macros such as
-- * #DBUS_TYPE_INT32 evaluate to integers; to assemble a signature you
-- * may find it useful to use the string forms, such as
-- * #DBUS_TYPE_INT32_AS_STRING.
-- *
-- * An "unset" or #NULL signature is considered the same as an empty
-- * signature. In fact dbus_message_get_signature() will never return
-- * #NULL.
-- *
-- * @param message the message
-- * @param signature the type signature or #NULL to unset
-- * @returns #FALSE if no memory
-- */
--static dbus_bool_t
--_dbus_message_set_signature (DBusMessage *message,
-- const char *signature)
--{
-- _dbus_return_val_if_fail (message != NULL, FALSE);
-- _dbus_return_val_if_fail (!message->locked, FALSE);
-- _dbus_return_val_if_fail (signature == NULL ||
-- _dbus_check_is_valid_signature (signature));
-- /* can't delete the signature if you have a message body */
-- _dbus_return_val_if_fail (_dbus_string_get_length (&message->body) == 0 ||
-- signature != NULL);
--
-- return set_or_delete_string_field (message,
-- DBUS_HEADER_FIELD_SIGNATURE,
-- DBUS_TYPE_SIGNATURE,
-- signature);
--}
--#endif
--
- /* Message Cache
- *
- * We cache some DBusMessage to reduce the overhead of allocating
-@@ -3370,6 +3326,47 @@ dbus_message_get_sender (DBusMessage *message)
+@@ -3445,6 +3445,47 @@ dbus_message_get_sender (DBusMessage *message)
}
/**
@@ -117,7 +65,7 @@ index 24ef5ac..fbacfba 100644
* Gets the type signature of the message, i.e. the arguments in the
* message payload. The signature includes only "in" arguments for
* #DBUS_MESSAGE_TYPE_METHOD_CALL and only "out" arguments for
-@@ -4519,6 +4516,64 @@ dbus_message_type_to_string (int type)
+@@ -4632,6 +4673,64 @@ dbus_message_type_to_string (int type)
}
/**
@@ -183,7 +131,7 @@ index 24ef5ac..fbacfba 100644
* specification.
*
diff --git a/dbus/dbus-message.h b/dbus/dbus-message.h
-index 5500492..55388ac 100644
+index 4fd44da..76377b8 100644
--- a/dbus/dbus-message.h
+++ b/dbus/dbus-message.h
@@ -138,6 +138,9 @@ dbus_bool_t dbus_message_set_sender (DBusMessage *message,
@@ -196,28 +144,29 @@ index 5500492..55388ac 100644
const char* dbus_message_get_signature (DBusMessage *message);
DBUS_EXPORT
void dbus_message_set_no_reply (DBusMessage *message,
-@@ -264,6 +267,16 @@ void dbus_message_iter_abandon_container (DBusMessageIter *iter,
- DBusMessageIter *sub);
-
+@@ -262,6 +265,17 @@ dbus_bool_t dbus_message_iter_close_container (DBusMessageIter *iter,
DBUS_EXPORT
-+char* dbus_message_get_body (DBusMessage *message);
+ void dbus_message_iter_abandon_container (DBusMessageIter *iter,
+ DBusMessageIter *sub);
+DBUS_EXPORT
-+dbus_bool_t dbus_message_set_body_length (DBusMessage *message,
-+ int length);
++char* dbus_message_get_body (DBusMessage *message);
++
+DBUS_EXPORT
-+int dbus_message_get_body_length (DBusMessage *message);
++dbus_bool_t dbus_message_set_body_length (DBusMessage *message,
++ int length);
+DBUS_EXPORT
-+int dbus_message_get_body_allocated (DBusMessage *message);
++int dbus_message_get_body_length (DBusMessage *message);
+
+DBUS_EXPORT
- void dbus_message_lock (DBusMessage *message);
++int dbus_message_get_body_allocated (DBusMessage *message);
DBUS_EXPORT
+ void dbus_message_lock (DBusMessage *message);
diff --git a/dbus/dbus-string.c b/dbus/dbus-string.c
-index e2eb93b..d8628ba 100644
+index 0f63612..a084eca 100644
--- a/dbus/dbus-string.c
+++ b/dbus/dbus-string.c
-@@ -848,6 +848,22 @@ _dbus_string_get_length (const DBusString *str)
+@@ -730,6 +730,22 @@ _dbus_string_get_length (const DBusString *str)
}
#endif /* !_dbus_string_get_length */
@@ -241,10 +190,10 @@ index e2eb93b..d8628ba 100644
* Makes a string longer by the given number of bytes. Checks whether
* adding additional_length to the current length would overflow an
diff --git a/dbus/dbus-string.h b/dbus/dbus-string.h
-index 2f1ed31..490aea6 100644
+index 86fb8c3..bfa2a39 100644
--- a/dbus/dbus-string.h
+++ b/dbus/dbus-string.h
-@@ -62,6 +62,7 @@ struct DBusString
+@@ -61,6 +61,7 @@ struct DBusString
*/
#define _dbus_string_get_data(s) ((char*)(((DBusString*)(s))->dummy1))
#define _dbus_string_get_length(s) (((DBusString*)(s))->dummy2)
@@ -252,16 +201,17 @@ index 2f1ed31..490aea6 100644
#define _dbus_string_set_byte(s, i, b) ((((unsigned char*)(((DBusString*)(s))->dummy1))[(i)]) = (unsigned char) (b))
#define _dbus_string_get_byte(s, i) (((const unsigned char*)(((DBusString*)(s))->dummy1))[(i)])
#define _dbus_string_get_const_data(s) ((const char*)(((DBusString*)(s))->dummy1))
-@@ -131,6 +132,9 @@ void _dbus_string_copy_to_buffer_with_nul (const DBusString *str,
- #ifndef _dbus_string_get_length
+@@ -131,6 +132,10 @@ void _dbus_string_copy_to_buffer_with_nul (const DBusString *str,
int _dbus_string_get_length (const DBusString *str);
#endif /* !_dbus_string_get_length */
+
+#ifndef _dbus_string_get_allocated
+int _dbus_string_get_allocated (const DBusString *str);
+#endif /* !_dbus_string_get_allocated */
-
++
dbus_bool_t _dbus_string_lengthen (DBusString *str,
int additional_length);
+ void _dbus_string_shorten (DBusString *str,
--
-1.7.10.2
+1.9.1
diff --git a/meta-ivi/recipes-core-ivi/dbus/dbus/capi-dbus-block-acquire-io-path-on-send.patch b/meta-ivi/recipes-core-ivi/dbus/dbus/capi-dbus-block-acquire-io-path-on-send.patch
new file mode 100644
index 0000000..1fb7316
--- /dev/null
+++ b/meta-ivi/recipes-core-ivi/dbus/dbus/capi-dbus-block-acquire-io-path-on-send.patch
@@ -0,0 +1,14 @@
+diff --git a/dbus/dbus-connection.c b/dbus/dbus-connection.c
+index a3dafa0..1fc7254 100644
+--- a/dbus/dbus-connection.c
++++ b/dbus/dbus-connection.c
+@@ -1207,8 +1207,7 @@ _dbus_connection_do_iteration_unlocked (DBusConnection *connection,
+ if (connection->n_outgoing == 0)
+ flags &= ~DBUS_ITERATION_DO_WRITING;
+
+- if (_dbus_connection_acquire_io_path (connection,
+- (flags & DBUS_ITERATION_BLOCK) ? timeout_milliseconds : 0))
++ if (_dbus_connection_acquire_io_path (connection, timeout_milliseconds))
+ {
+ HAVE_LOCK_CHECK (connection);
+
diff --git a/meta-ivi/recipes-core-ivi/dbus/dbus/capi-dbus-correct-dbus-connection-block-pending-call.patch b/meta-ivi/recipes-core-ivi/dbus/dbus/capi-dbus-correct-dbus-connection-block-pending-call.patch
new file mode 100644
index 0000000..ce17128
--- /dev/null
+++ b/meta-ivi/recipes-core-ivi/dbus/dbus/capi-dbus-correct-dbus-connection-block-pending-call.patch
@@ -0,0 +1,13 @@
+diff --git a/dbus/dbus-connection.c b/dbus/dbus-connection.c
+index b574207..a617457 100644
+--- a/dbus/dbus-connection.c
++++ b/dbus/dbus-connection.c
+@@ -2525,7 +2525,7 @@ _dbus_connection_block_pending_call (DBusPendingCall *pending)
+ {
+ /* block again, we don't have the reply buffered yet. */
+ _dbus_connection_do_iteration_unlocked (connection,
+- NULL,
++ pending,
+ DBUS_ITERATION_DO_READING |
+ DBUS_ITERATION_BLOCK,
+ timeout_milliseconds - elapsed_milliseconds);
diff --git a/meta-ivi/recipes-core-ivi/dbus/dbus_%.bbappend b/meta-ivi/recipes-core-ivi/dbus/dbus_%.bbappend
index 495f219..4f0b25b 100644
--- a/meta-ivi/recipes-core-ivi/dbus/dbus_%.bbappend
+++ b/meta-ivi/recipes-core-ivi/dbus/dbus_%.bbappend
@@ -10,8 +10,10 @@ SRC_URI_AFBUS = ""
# add support for GENIVI CommonAPI D-Bus runtime
# - http://projects.genivi.org/commonapi/
SRC_URI_COMMONAPI = " \
- file://dbus-DBusMessage-add-support-for-custom-marshaling.patch \
file://capi-dbus-add-send-with-reply-set-notify.patch \
+ file://capi-dbus-add-support-for-custom-marshalling.patch \
+ file://capi-dbus-block-acquire-io-path-on-send.patch \
+ file://capi-dbus-correct-dbus-connection-block-pending-call.patch \
"
SRC_URI_append = "\