MCPcopy Create free account
hub / github.com/DreamSourceLab/DSView / xlog_set_receiver_enable

Function xlog_set_receiver_enable

common/log/xlog.c:387–406  ·  view source on GitHub ↗

* Set the log receiver enable to disable. */

Source from the content-addressed store, hash-verified

385 * Set the log receiver enable to disable.
386*/
387XLOG_API int xlog_set_receiver_enable(xlog_context* ctx, int index, int bEnable)
388{
389 if (ctx == NULL){
390 return -1;
391 }
392
393 pthread_mutex_lock(&ctx->_mutext);
394
395 if (index < 0 || index >= ctx->_count){
396 strcpy(ctx->_error, "index out of range");
397 pthread_mutex_unlock(&ctx->_mutext);
398 return -1;
399 }
400
401 ctx->_receivers[index]._enable = bEnable > 0 ? 1 : 0;
402
403 pthread_mutex_unlock(&ctx->_mutext);
404
405 return 0;
406}
407
408/**
409 * clear all receiver,return 0 if success.

Callers 1

dsv_set_log_file_enableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected