diff options
| author | 郑超 <[email protected]> | 2018-11-22 19:56:55 +0800 |
|---|---|---|
| committer | 郑超 <[email protected]> | 2018-11-22 19:56:55 +0800 |
| commit | ba34d6342312461f6ea63e4a6341b8bc31a752fe (patch) | |
| tree | bc52066e899185e738b54356a5bb3b5a9839be9d | |
| parent | bd9a70a386ddf7ef7eabefabf9e7c3971fcbe9e9 (diff) | |
| parent | 9a665ddae1f0497847e93937d19cb1b11f842e53 (diff) | |
Merge branch 'trival-rename-output-style-define' into 'master'
修正变量名
See merge request MESA_framework/FieldStat2!3
| -rw-r--r-- | inc/field_stat2.h | 2 | ||||
| -rw-r--r-- | src/MESA_field_stat.cpp | 8 | ||||
| -rw-r--r-- | test/fs2_test.cpp | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/inc/field_stat2.h b/inc/field_stat2.h index da89b0f..4af7b51 100644 --- a/inc/field_stat2.h +++ b/inc/field_stat2.h @@ -28,7 +28,7 @@ enum field_op enum stats_output_format { - FS_OUTPUT_STATD=1, + FS_OUTPUT_STATSD=1, FS_OUTPUT_INFLUX=2 }; diff --git a/src/MESA_field_stat.cpp b/src/MESA_field_stat.cpp index ff7b3b0..aa8e527 100644 --- a/src/MESA_field_stat.cpp +++ b/src/MESA_field_stat.cpp @@ -486,7 +486,7 @@ int FS_set_para(screen_stat_handle_t handle, enum FS_option type,const void* va { return -1; } - _handle->statsd_switch=FS_OUTPUT_STATD; + _handle->statsd_switch=FS_OUTPUT_STATSD; break; case STATS_SERVER_PORT: if((size_t)size==sizeof(unsigned short)) @@ -508,7 +508,7 @@ int FS_set_para(screen_stat_handle_t handle, enum FS_option type,const void* va _handle->server_port=*((unsigned short *)value); break; case STATS_FORMAT: - if(size!=4||(int_val!=FS_OUTPUT_STATD&&int_val!=FS_OUTPUT_INFLUX)) + if(size!=4||(int_val!=FS_OUTPUT_STATSD&&int_val!=FS_OUTPUT_INFLUX)) { return -1; } @@ -593,7 +593,7 @@ void FS_start(screen_stat_handle_t handle) if(_handle->statsd_switch > 0) { _handle->statsd_socket=startup_udp(); - if(_handle->statsd_switch == FS_OUTPUT_STATD) + if(_handle->statsd_switch == FS_OUTPUT_STATSD) { append_statsd_counter(_handle, "RESTART", 1); flush_metric(_handle); @@ -1442,7 +1442,7 @@ void FS_passive_output(screen_stat_handle_t handle) if(_handle->statsd_switch > 0) { pthread_mutex_lock(&(_handle->reg_lock)); - if(_handle->statsd_switch == FS_OUTPUT_STATD) + if(_handle->statsd_switch == FS_OUTPUT_STATSD) { StatsD_output(_handle); } diff --git a/test/fs2_test.cpp b/test/fs2_test.cpp index 81f2a42..3fb7732 100644 --- a/test/fs2_test.cpp +++ b/test/fs2_test.cpp @@ -41,7 +41,7 @@ int main(int argc,char* argv[]) FS_set_para(handle, STATS_SERVER_PORT, &value, sizeof(value)); //value=FS_OUTPUT_INFLUX; - value=FS_OUTPUT_STATD; + value=FS_OUTPUT_STATSD; FS_set_para(handle, STATS_FORMAT, &value, sizeof(value)); |
