static sss_sifp_error sss_sifp_ifp_call(sss_sifp_ctx *ctx, const char *method, int first_arg_type, va_list ap, DBusMessage **_reply) { DBusMessage *msg = NULL; sss_sifp_error ret; msg = sss_sifp_create_message(SSS_SIFP_PATH_IFP, SSS_SIFP_IFACE_IFP, method); if (msg == NULL) { ret = SSS_SIFP_OUT_OF_MEMORY; goto done; } if (first_arg_type != DBUS_TYPE_INVALID) { dbus_message_append_args_valist(msg, first_arg_type, ap); } ret = sss_sifp_send_message(ctx, msg, _reply); done: if (msg != NULL) { dbus_message_unref(msg); } return ret; }
static sss_sifp_error sss_sifp_ifp_call(sss_sifp_ctx *ctx, const char *object_path, const char *interface, const char *method, int first_arg_type, va_list ap, DBusMessage **_reply) { DBusMessage *msg = NULL; sss_sifp_error ret; dbus_bool_t bret; if (object_path == NULL || interface == NULL || method == NULL) { return SSS_SIFP_INVALID_ARGUMENT; } msg = sss_sifp_create_message(object_path, interface, method); if (msg == NULL) { ret = SSS_SIFP_OUT_OF_MEMORY; goto done; } if (first_arg_type != DBUS_TYPE_INVALID) { bret = dbus_message_append_args_valist(msg, first_arg_type, ap); if (!bret) { ret = SSS_SIFP_IO_ERROR; goto done; } } ret = sss_sifp_send_message(ctx, msg, _reply); done: if (msg != NULL) { dbus_message_unref(msg); } return ret; }