X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=vnfs%2FVES5.0%2Fevel%2Fevel-library%2Fcode%2Fevel_library%2Fevel_event_mgr.c;h=d10543b0907e429dc0a8e1c8b0280c8a4b800227;hb=39f35cca6560c97ecd719a13793ead184f6e7e3c;hp=5c6ca4b375452ea4e78e810e1f858cf4d4b918a1;hpb=a19bd423c1e4d2f5552bab090ba2650c38fa7192;p=demo.git diff --git a/vnfs/VES5.0/evel/evel-library/code/evel_library/evel_event_mgr.c b/vnfs/VES5.0/evel/evel-library/code/evel_library/evel_event_mgr.c index 5c6ca4b3..d10543b0 100644 --- a/vnfs/VES5.0/evel/evel-library/code/evel_library/evel_event_mgr.c +++ b/vnfs/VES5.0/evel/evel-library/code/evel_library/evel_event_mgr.c @@ -115,6 +115,7 @@ static char * evel_batch_api_url; * @param[in] throt_api_url * The URL where the Throttling API is expected to be. * @param[in] source_ip Source IP of VES Agent + * @param[in] ring_buf_size Initial size of ring buffer * @param[in] secure Whether Using http or https * @param[in] cert_file_path Path to Client Certificate file * @param[in] key_file_path Path to Client key file @@ -130,6 +131,7 @@ static char * evel_batch_api_url; EVEL_ERR_CODES event_handler_initialize(const char * const event_api_url, const char * const throt_api_url, const char * const source_ip, + int ring_buf_size, int secure, const char * const cert_file_path, const char * const key_file_path, @@ -473,6 +475,12 @@ EVEL_ERR_CODES event_handler_initialize(const char * const event_api_url, /* Initialize a message ring-buffer to be used between the foreground and */ /* the thread which sends the messages. This can't fail. */ /***************************************************************************/ + if( ring_buf_size < EVEL_EVENT_BUFFER_DEPTH ) + { + log_error_state("Warning: Failed to initialize Ring buffer size to %d. " + ring_buf_size); + goto exit_label; + } ring_buffer_initialize(&event_buffer, EVEL_EVENT_BUFFER_DEPTH); /***************************************************************************/