Commit e12892fb authored by Scott Vokes's avatar Scott Vokes Committed by Greg Williams
Browse files

Use special BUS_NO_SEQ_ID value for default sequence ID.

parent 29814005
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -35,6 +35,9 @@ struct boxed_msg;
/* Default number of seconds before a message response times out. */
#define BUS_DEFAULT_TIMEOUT_SEC 10

/* Special sequence ID value indicating none was available. */
#define BUS_NO_SEQ_ID (-1)

#define BUS_LOG(B, LEVEL, EVENT_KEY, MSG, UDATA)                       \
    do {                                                               \
        struct bus *_b = (B);                                          \
+1 −1
Original line number Diff line number Diff line
@@ -673,7 +673,7 @@ static void process_unpacked_message(listener *l,
            }
        } else {
            /* We received a response that we weren't expecting. */
            if (seq_id != 0) {
            if (seq_id != BUS_NO_SEQ_ID) {
                BUS_LOG_SNPRINTF(b, 2 - 2, LOG_LISTENER, b->udata, 128,
                    "Couldn't find info for fd:%d, seq_id:%lld, msg %p",
                    ci->fd, (long long)seq_id, opaque_msg);
+1 −1
Original line number Diff line number Diff line
@@ -220,7 +220,7 @@ STATIC bus_unpack_cb_res_t unpack_cb(void *msg, void *socket_udata) {
            memcpy(response->value, &si->buf[si->header.protobufLength], si->header.valueLength);
        }

        int64_t seq_id = 0;
        int64_t seq_id = BUS_NO_SEQ_ID;
        if (response->command != NULL &&
            response->command->header != NULL)
        {