summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Volz <andreas@optolix.mittelerde>2008-10-15 23:08:20 +0200
committerAndreas Volz <andreas@optolix.mittelerde>2008-10-15 23:08:20 +0200
commitd0c41b03ff4d5845e3a348d2e938f0fd5f285b2d (patch)
tree62c4e05a0180d2c717b3a5f2afd86f4b7a198e69
parentc923153861b7574db572380ae23a57bf2317db97 (diff)
downloaddbus-c++-d0c41b03ff4d5845e3a348d2e938f0fd5f285b2d.tar.gz
fixed invoke_noreply call generation
-rw-r--r--include/dbus-c++/interface.h4
-rw-r--r--tools/xml2cpp.cpp8
2 files changed, 6 insertions, 6 deletions
diff --git a/include/dbus-c++/interface.h b/include/dbus-c++/interface.h
index 7a5297b..0c5c2ac 100644
--- a/include/dbus-c++/interface.h
+++ b/include/dbus-c++/interface.h
@@ -166,8 +166,8 @@ public:
InterfaceProxy(const std::string &name);
Message invoke_method(const CallMessage &);
-
- bool invoke_method_noreply(const CallMessage &call);
+
+ bool invoke_method_noreply(const CallMessage &call);
bool dispatch_signal(const SignalMessage &);
diff --git a/tools/xml2cpp.cpp b/tools/xml2cpp.cpp
index 69f4efa..dcde076 100644
--- a/tools/xml2cpp.cpp
+++ b/tools/xml2cpp.cpp
@@ -49,6 +49,7 @@ static const char *header = "\n\
static const char *dbus_includes = "\n\
#include <dbus-c++/dbus.h>\n\
+#include <cassert>\n\n\
\n\
";
@@ -538,18 +539,17 @@ void generate_proxy(Xml::Document &doc, const char *filename)
cerr << "Function: " << method.get("name") << ":" << endl;
cerr << "Option 'org.freedesktop.DBus.Method.NoReply' not allowed for methods with 'out' variables!" << endl << "-> Option ignored!" << endl;
- body << tab << tab << "::DBus::Message ret = invoke_method";
+ body << tab << tab << "::DBus::Message ret = invoke_method (call);" << endl;
}
else
{
- body << tab << tab << "::DBus::Message ret = invoke_method_noreply";
+ body << tab << tab << "assert (invoke_method_noreply (call));" << endl; // will only assert in case of no memory
}
}
else
{
- body << tab << tab << "::DBus::Message ret = invoke_method";
+ body << tab << tab << "::DBus::Message ret = invoke_method (call);" << endl;
}
- body << "(call);" << endl;
if (args_out.size() > 0)
{