Branch Coverage

amqp_connection.c
Criterion Covered Total %
branch 16 86 18.6


line true false branch
49 0 33 if (state == NULL) {
54 0 33 if (0 != res) {
69 0 33 if (state->sock_inbound_buffer.bytes == NULL) {
89 1 0 return state->socket ? amqp_socket_get_sockfd(state->socket) : -1;
94 0 0 if (!socket) {
114 0 33 ENFORCE_STATE(state, CONNECTION_STATE_IDLE);
120 0 33 if (0 > state->heartbeat) {
126 0 33 if (AMQP_STATUS_OK != res) {
131 0 33 if (AMQP_STATUS_OK != res) {
137 0 33 if (newbuf == NULL) {
159 33 0 if (state) {
161 528 33 for (i = 0; i < POOL_TABLE_SIZE; ++i) {
163 0 528 while (NULL != entry) {
192 0 0 if (received_data->len < bytes_consumed) {
214 0 0 if (received_data.len == 0) {
218 0 0 if (state->state == CONNECTION_STATE_IDLE) {
226 0 0 if (state->inbound_offset < state->target_size) {
235 0 0 if (memcmp(raw_frame, "AMQP", 4) == 0) {
268 0 0 if (frame_size >= INT32_MAX) {
273 0 0 if ((size_t)state->frame_max < frame_size) {
278 0 0 if (NULL == channel_pool) {
283 0 0 if (NULL == state->inbound_buffer.bytes) {
295 0 0 if (state->inbound_offset < state->target_size) {
307 0 0 if (amqp_d8(amqp_offset(raw_frame, state->target_size - 1)) !=
317 0 0 if (NULL == channel_pool) {
331 0 0 if (res < 0) {
350 0 0 if (res < 0) {
388 0 0 ENFORCE_STATE(state, CONNECTION_STATE_IDLE);
390 0 0 for (i = 0; i < POOL_TABLE_SIZE; ++i) {
393 0 0 for (; NULL != entry; entry = entry->next) {
400 0 0 if (amqp_release_buffers_ok(state)) {
409 0 0 if (CONNECTION_STATE_IDLE != state->state) {
415 0 0 while (NULL != queued_link) {
417 0 0 if (channel == frame->channel) {
426 0 0 if (pool != NULL) {
459 0 1 if (res < 0) {
482 0 0 if (res < 0) {
526 1 0 if (AMQP_STATUS_OK != res) {
535 1 0 if (0 > sent) {
541 0 0 if ((ssize_t)encoded.len != sent) {
542 0 0 if (amqp_time_equal(next_timeout, deadline)) {
549 0 0 if (AMQP_STATUS_TIMEOUT == res) {
551 0 0 } else if (AMQP_STATUS_OK != res) {