X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=vnfs%2FVES5.0%2Fevel%2Fevel-library%2Fcode%2Fevel_library%2Fring_buffer.c;fp=vnfs%2FVES5.0%2Fevel%2Fevel-library%2Fcode%2Fevel_library%2Fring_buffer.c;h=248baf2fb8a1f8dce1171d76613a8e8b4fca6edd;hb=822c418921c5abf96a48decf81c7bdf595b76c16;hp=ad508743cd066f91877e0f558b545e7625f10b0f;hpb=b2c608a794d454fffc738e691919fddf5ca1578b;p=demo.git diff --git a/vnfs/VES5.0/evel/evel-library/code/evel_library/ring_buffer.c b/vnfs/VES5.0/evel/evel-library/code/evel_library/ring_buffer.c index ad508743..248baf2f 100644 --- a/vnfs/VES5.0/evel/evel-library/code/evel_library/ring_buffer.c +++ b/vnfs/VES5.0/evel/evel-library/code/evel_library/ring_buffer.c @@ -101,9 +101,9 @@ void * ring_buffer_read(ring_buffer * buffer) msg = (buffer->ring)[buffer->next_read]; buffer->ring[buffer->next_read] = NULL; buffer->next_read = (buffer->next_read + 1) % buffer->size; - EVEL_DEBUG("RBR: next read location is %d", buffer->next_read); pthread_mutex_unlock(&buffer->ring_mutex); - break; + EVEL_DEBUG("RBR: next read location is %d data %lp", buffer->next_read,msg); + return msg; } else { @@ -112,7 +112,7 @@ void * ring_buffer_read(ring_buffer * buffer) EVEL_DEBUG("RBR: Condition variable wait completed"); } } - EVEL_DEBUG("RBR: Ring buffer read returning data at %lp", msg); + pthread_mutex_unlock(&buffer->ring_mutex); return msg; }