Commit 230d2f1d authored by Scott Vokes's avatar Scott Vokes
Browse files

Add outgoing fd and seq_id to "Sending request", bad seq_id warning messages.

parent 5cc3b2d8
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -323,7 +323,8 @@ bool bus_send_request(struct bus *b, bus_user_msg *msg)
    int s_id = sender_id_of_socket(b, msg->fd);
    struct sender *s = b->senders[s_id];

    BUS_LOG(b, 3, LOG_SENDING_REQUEST, "Sending request...", b->udata);
    BUS_LOG_SNPRINTF(b, 3, LOG_SENDING_REQUEST, b->udata, 64,
        "Sending request <fd:%d, seq_id:%lld>", msg->fd, msg->seq_id);
    bool res = sender_send_request(s, box);
    BUS_LOG_SNPRINTF(b, 3, LOG_SENDING_REQUEST, b->udata, 64,
        "...request sent, result %d", res);
+2 −2
Original line number Diff line number Diff line
@@ -611,8 +611,8 @@ static void process_unpacked_message(listener *l,

        if (seq_id < ci->largest_seq_id_seen && ci->largest_seq_id_seen != 0) {
            BUS_LOG_SNPRINTF(b, 0, LOG_LISTENER, b->udata, 128,
                "suspicious sequence ID: largest seen is %lld, got %lld\n",
                (long long)ci->largest_seq_id_seen, (long long)seq_id);
                "suspicious sequence ID on %d: largest seen is %lld, got %lld\n",
                ci->fd, (long long)ci->largest_seq_id_seen, (long long)seq_id);
        }
        ci->largest_seq_id_seen = seq_id;

+2 −2
Original line number Diff line number Diff line
@@ -574,8 +574,8 @@ static void enqueue_write(struct sender *s, tx_info_t *info) {

        if (fdi->largest_seq_id_seen > out_seq_id && fdi->largest_seq_id_seen > 0) {
            BUS_LOG_SNPRINTF(b, 0 , LOG_SENDER, b->udata, 64,
                "suspicious outgoing sequence ID: got %lld, already sent up to %lld",
                (long long)out_seq_id, (long long)fdi->largest_seq_id_seen);
                "suspicious outgoing sequence ID on %d: got %lld, already sent up to %lld",
                fd, (long long)out_seq_id, (long long)fdi->largest_seq_id_seen);
            set_error_for_socket(s, fd, TX_ERROR_BAD_SEQUENCE_ID);
            return;
        }