Branch Coverage

amqp_connection.c
Criterion Covered Total %
branch 49 86 56.9


line true false branch
81 0 30 if (state == NULL) {
86 0 30 if (0 != res) {
101 0 30 if (state->sock_inbound_buffer.bytes == NULL) {
121 780 0 return state->socket ? amqp_socket_get_sockfd(state->socket) : -1;
126 0 0 if (!socket) {
146 0 67 ENFORCE_STATE(state, CONNECTION_STATE_IDLE);
152 0 67 if (0 > state->heartbeat) {
158 0 67 if (AMQP_STATUS_OK != res) {
163 0 67 if (AMQP_STATUS_OK != res) {
169 0 67 if (newbuf == NULL) {
191 29 0 if (state) {
193 464 29 for (i = 0; i < POOL_TABLE_SIZE; ++i) {
195 50 464 while (NULL != entry) {
224 5 960 if (received_data->len < bytes_consumed) {
246 0 485 if (received_data.len == 0) {
250 453 32 if (state->state == CONNECTION_STATE_IDLE) {
258 0 485 if (state->inbound_offset < state->target_size) {
267 0 27 if (memcmp(raw_frame, "AMQP", 4) == 0) {
300 0 480 if (frame_size >= INT32_MAX) {
305 0 480 if ((size_t)state->frame_max < state->target_size) {
310 0 480 if (NULL == channel_pool) {
316 0 480 if (NULL == state->inbound_buffer.bytes) {
328 5 475 if (state->inbound_offset < state->target_size) {
340 0 480 if (amqp_d8(amqp_offset(raw_frame, state->target_size - 1)) !=
350 0 480 if (NULL == channel_pool) {
364 0 396 if (res < 0) {
383 0 25 if (res < 0) {
421 0 291 ENFORCE_STATE(state, CONNECTION_STATE_IDLE);
423 4656 291 for (i = 0; i < POOL_TABLE_SIZE; ++i) {
426 474 4656 for (; NULL != entry; entry = entry->next) {
433 37 0 if (amqp_release_buffers_ok(state)) {
442 0 479 if (CONNECTION_STATE_IDLE != state->state) {
448 21 478 while (NULL != queued_link) {
450 1 20 if (channel == frame->channel) {
459 478 0 if (pool != NULL) {
492 0 409 if (res < 0) {
515 0 28 if (res < 0) {
559 0 486 if (AMQP_STATUS_OK != res) {
568 4 482 if (0 > sent) {
574 0 482 if ((ssize_t)encoded.len != sent) {
575 0 0 if (amqp_time_equal(next_timeout, deadline)) {
582 0 0 if (AMQP_STATUS_TIMEOUT == res) {
584 0 0 } else if (AMQP_STATUS_OK != res) {