openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/dbus/1.12.16-r0/dbus-1.12.16/bus/bus.c
static void complain_about_message(BusContext* context, const char* error_name,
                                   const char* complaint, int matched_rules,
                                   DBusMessage* message, DBusConnection* sender,
                                   DBusConnection* proposed_recipient,
                                   dbus_bool_t requested_reply, dbus_bool_t log,
                                   DBusError* error)
{
    DBusError stack_error = DBUS_ERROR_INIT;
    const char* sender_name;
    const char* sender_loginfo;
    const char* proposed_recipient_loginfo;

    if (error == NULL && !log)
        return;

    if (sender != NULL)
    {
        sender_name = bus_connection_get_name(sender);
        sender_loginfo = bus_connection_get_loginfo(sender);
    }
    else
    {
        sender_name = "(unset)";
        sender_loginfo = "(bus)";
    }

    if (proposed_recipient != NULL)
        proposed_recipient_loginfo =
            bus_connection_get_loginfo(proposed_recipient);
    else
        proposed_recipient_loginfo = "bus";

    dbus_set_error(
        &stack_error, error_name,
        "%s, %d matched rules; type=\"%s\", sender=\"%s\" (%s) "
        "interface=\"%s\" member=\"%s\" error name=\"%s\" "
        "requested_reply=\"%d\" destination=\"%s\" (%s)",
        complaint, matched_rules,
        dbus_message_type_to_string(dbus_message_get_type(message)),
        sender_name, sender_loginfo,
        nonnull(dbus_message_get_interface(message), "(unset)"),
        nonnull(dbus_message_get_member(message), "(unset)"),
        nonnull(dbus_message_get_error_name(message), "(unset)"),
        requested_reply,
        nonnull(dbus_message_get_destination(message), DBUS_SERVICE_DBUS),
        proposed_recipient_loginfo);

    /* If we hit OOM while setting the error, this will syslog "out of memory"
     * which is itself an indication that something is seriously wrong */
    if (log)
        bus_context_log_literal(context, DBUS_SYSTEM_LOG_SECURITY,
                                stack_error.message);

    dbus_move_error(&stack_error, error);
}
/*
 * Log something about a message, usually that it was rejected.
 */
Log something about a message, usually that it was rejected.
Log something about a message usually that it was rejected .
static void complain_about_message(BusContext* context, const char* error_name,
                                   const char* complaint, int matched_rules,
                                   DBusMessage* message, DBusConnection* sender,
                                   DBusConnection* proposed_recipient,
                                   dbus_bool_t requested_reply, dbus_bool_t log,
                                   DBusError* error)
{
    DBusError stack_error = DBUS_ERROR_INIT;
    const char* sender_name;
    const char* sender_loginfo;
    const char* proposed_recipient_loginfo;
    if (error == NULL && !log)
        return;
    if (sender != NULL)
    {
        sender_name = bus_connection_get_name(sender);
        sender_loginfo = bus_connection_get_loginfo(sender);
    }
    else
    {
        sender_name = "(unset)";
        sender_loginfo = "(bus)";
    }
    if (proposed_recipient != NULL)
        proposed_recipient_loginfo =
            bus_connection_get_loginfo(proposed_recipient);
    else
        proposed_recipient_loginfo = "bus";
    dbus_set_error(
        &stack_error, error_name,
        "%s, %d matched rules; type=\"%s\", sender=\"%s\" (%s) "
        "interface=\"%s\" member=\"%s\" error name=\"%s\" "
        "requested_reply=\"%d\" destination=\"%s\" (%s)",
        complaint, matched_rules,
        dbus_message_type_to_string(dbus_message_get_type(message)),
        sender_name, sender_loginfo,
        nonnull(dbus_message_get_interface(message), "(unset)"),
        nonnull(dbus_message_get_member(message), "(unset)"),
        nonnull(dbus_message_get_error_name(message), "(unset)"),
        requested_reply,
        nonnull(dbus_message_get_destination(message), DBUS_SERVICE_DBUS),
        proposed_recipient_loginfo);
    if (log)
        bus_context_log_literal(context, DBUS_SYSTEM_LOG_SECURITY,
                                stack_error.message);
    dbus_move_error(&stack_error, error);
}
static void complain_about_message ( BusContext * context , const char * error_name , const char * complaint , int matched_rules , DBusMessage * message , DBusConnection * sender , DBusConnection * proposed_recipient , dbus_bool_t requested_reply , dbus_bool_t log , DBusError * error ) { DBusError stack_error = DBUS_ERROR_INIT ; const char * sender_name ; const char * sender_loginfo ; const char * proposed_recipient_loginfo ; if ( error == NULL && ! log ) return ; if ( sender != NULL ) { sender_name = bus_connection_get_name ( sender ) ; sender_loginfo = bus_connection_get_loginfo ( sender ) ; } else { sender_name = " " ; sender_loginfo = " " ; } if ( proposed_recipient != NULL ) proposed_recipient_loginfo = bus_connection_get_loginfo ( proposed_recipient ) ; else proposed_recipient_loginfo = " " ; dbus_set_error ( & stack_error , error_name , " \" \" \" \" " " \" \" \" \" \" \" " " \" \" \" \" " , complaint , matched_rules , dbus_message_type_to_string ( dbus_message_get_type ( message ) ) , sender_name , sender_loginfo , nonnull ( dbus_message_get_interface ( message ) , " " ) , nonnull ( dbus_message_get_member ( message ) , " " ) , nonnull ( dbus_message_get_error_name ( message ) , " " ) , requested_reply , nonnull ( dbus_message_get_destination ( message ) , DBUS_SERVICE_DBUS ) , proposed_recipient_loginfo ) ; if ( log ) bus_context_log_literal ( context , DBUS_SYSTEM_LOG_SECURITY , stack_error . message ) ; dbus_move_error ( & stack_error , error ) ; }
Log something about a message, usually that it was rejected.
Log something about a message usually that it was rejected .
/* If we hit OOM while setting the error, this will syslog "out of memory"
     * which is itself an indication that something is seriously wrong */