You have been requested to review the proposed merge of
lp:~stgraber/ubuntu/raring/libnih/libnih-dbus-as-type into lp:ubuntu/libnih.
For more details, see:
https://code.launchpad.net/~stgraber/ubuntu/raring/libnih/libnih-dbus-as-type/+merge/138582
This change updates the dbus code generator for the outgoing 'as' type.
'as' is a null terminated string array, that ends up as 'char * const *'
as generated by nih-dbus-tool.
As it's NULL terminated, the current nih_assert (var != NULL); will trigger
whenever the function is passed an empty array.
This has become a problem in upstart where we now have a new EventEmitted
signal which has an "env" property that's the list of environment variables.
An empty event environment would trigger the assert causing upstart to fail.
The change I made is simply to detect variables of type 'char * const *' and
skip the code adding the nih_assert. I updated the two existing tests to match
that change.
Please note that I have no experience with libnih development at all and very
limited experience as one of its users, so this change may very well be wrong.
However in the limited test scenario that's my upstart branch, the change
appears to work as expected.
--
https://code.launchpad.net/~stgraber/ubuntu/raring/libnih/libnih-dbus-as-type/+merge/138582
Your team Upstart Reviewers is requested to review the proposed merge of
lp:~stgraber/ubuntu/raring/libnih/libnih-dbus-as-type into lp:ubuntu/libnih.
=== modified file 'nih-dbus-tool/tests/expected/test_method_reply_function_deprecated.c'
--- nih-dbus-tool/tests/expected/test_method_reply_function_deprecated.c 2010-02-04 22:30:23 +0000
+++ nih-dbus-tool/tests/expected/test_method_reply_function_deprecated.c 2012-12-06 21:46:20 +0000
@@ -7,7 +7,6 @@
DBusMessageIter output_iter;
nih_assert (message != NULL);
- nih_assert (output != NULL);
/* If the sender doesn't care about a reply, don't bother wasting
* effort constructing and sending one.
=== modified file 'nih-dbus-tool/tests/expected/test_method_reply_function_standard.c'
--- nih-dbus-tool/tests/expected/test_method_reply_function_standard.c 2010-02-04 22:30:23 +0000
+++ nih-dbus-tool/tests/expected/test_method_reply_function_standard.c 2012-12-06 21:46:20 +0000
@@ -7,7 +7,6 @@
DBusMessageIter output_iter;
nih_assert (message != NULL);
- nih_assert (output != NULL);
/* If the sender doesn't care about a reply, don't bother wasting
* effort constructing and sending one.
=== modified file 'nih-dbus-tool/type.c'
--- nih-dbus-tool/type.c 2010-12-23 22:08:49 +0000
+++ nih-dbus-tool/type.c 2012-12-06 21:46:20 +0000
@@ -1101,7 +1101,7 @@
nih_assert (block != NULL);
nih_assert (var != NULL);
- if (! strchr (var->type, '*'))
+ if (! strchr (var->type, '*') || ! strcmp (var->type, "char * const *"))
return *block;
if (next && (! strcmp (next->type, "size_t"))) {
--
upstart-devel mailing list
[email protected]
Modify settings or unsubscribe at:
https://lists.ubuntu.com/mailman/listinfo/upstart-devel