-/* $Id$ */
-
/***
This file is part of avahi.
text = avahi_strerror(error);
reply = dbus_message_new_error(m, avahi_error_number_to_dbus(error), text);
+
+ if (!reply) {
+ avahi_log_error("Failed allocate message");
+ return DBUS_HANDLER_RESULT_NEED_MEMORY;
+ }
+
dbus_connection_send(c, reply, NULL);
dbus_message_unref(reply);
DBusMessage *reply;
reply = dbus_message_new_method_return(m);
+
+ if (!reply) {
+ avahi_log_error("Failed allocate message");
+ return DBUS_HANDLER_RESULT_NEED_MEMORY;
+ }
+
dbus_message_append_args(reply, DBUS_TYPE_STRING, &text, DBUS_TYPE_INVALID);
dbus_connection_send(c, reply, NULL);
dbus_message_unref(reply);
DBusMessage *reply;
reply = dbus_message_new_method_return(m);
+
+ if (!reply) {
+ avahi_log_error("Failed allocate message");
+ return DBUS_HANDLER_RESULT_NEED_MEMORY;
+ }
+
dbus_message_append_args(reply, DBUS_TYPE_INT32, &i, DBUS_TYPE_INVALID);
dbus_connection_send(c, reply, NULL);
dbus_message_unref(reply);
DBusMessage *reply;
reply = dbus_message_new_method_return(m);
+
+ if (!reply) {
+ avahi_log_error("Failed allocate message");
+ return DBUS_HANDLER_RESULT_NEED_MEMORY;
+ }
+
dbus_message_append_args(reply, DBUS_TYPE_UINT32, &u, DBUS_TYPE_INVALID);
dbus_connection_send(c, reply, NULL);
dbus_message_unref(reply);
DBusMessage *reply;
reply = dbus_message_new_method_return(m);
+
+ if (!reply) {
+ avahi_log_error("Failed allocate message");
+ return DBUS_HANDLER_RESULT_NEED_MEMORY;
+ }
+
dbus_message_append_args(reply, DBUS_TYPE_BOOLEAN, &b, DBUS_TYPE_INVALID);
dbus_connection_send(c, reply, NULL);
dbus_message_unref(reply);
DBusMessage *reply;
reply = dbus_message_new_method_return(m);
+
+ if (!reply) {
+ avahi_log_error("Failed allocate message");
+ return DBUS_HANDLER_RESULT_NEED_MEMORY;
+ }
+
dbus_connection_send(c, reply, NULL);
dbus_message_unref(reply);
DBusMessage *reply;
reply = dbus_message_new_method_return(m);
+
+ if (!reply) {
+ avahi_log_error("Failed allocate message");
+ return DBUS_HANDLER_RESULT_NEED_MEMORY;
+ }
+
dbus_message_append_args(reply, DBUS_TYPE_OBJECT_PATH, &path, DBUS_TYPE_INVALID);
dbus_connection_send(c, reply, NULL);
dbus_message_unref(reply);