winlin

refine the stat, use one ok. 1.0.200

@@ -1080,18 +1080,14 @@ void srs_api_dump_summaries(std::stringstream& ss) @@ -1080,18 +1080,14 @@ void srs_api_dump_summaries(std::stringstream& ss)
1080 n_sample_time = o.sample_time; 1080 n_sample_time = o.sample_time;
1081 } 1081 }
1082 1082
  1083 + // all data is ok?
  1084 + bool ok = (r->ok && u->ok && s->ok && c->ok
  1085 + && d->ok && m->ok && p->ok && n_ok && nrs->ok);
  1086 +
1083 ss << __SRS_JOBJECT_START 1087 ss << __SRS_JOBJECT_START
1084 << __SRS_JFIELD_ERROR(ERROR_SUCCESS) << __SRS_JFIELD_CONT 1088 << __SRS_JFIELD_ERROR(ERROR_SUCCESS) << __SRS_JFIELD_CONT
1085 << __SRS_JFIELD_ORG("data", __SRS_JOBJECT_START) 1089 << __SRS_JFIELD_ORG("data", __SRS_JOBJECT_START)
1086 - << __SRS_JFIELD_ORG("rusage_ok", (r->ok? "true":"false")) << __SRS_JFIELD_CONT  
1087 - << __SRS_JFIELD_ORG("self_cpu_stat_ok", (u->ok? "true":"false")) << __SRS_JFIELD_CONT  
1088 - << __SRS_JFIELD_ORG("system_cpu_stat_ok", (s->ok? "true":"false")) << __SRS_JFIELD_CONT  
1089 - << __SRS_JFIELD_ORG("cpuinfo_ok", (c->ok? "true":"false")) << __SRS_JFIELD_CONT  
1090 - << __SRS_JFIELD_ORG("disk_ok", (d->ok? "true":"false")) << __SRS_JFIELD_CONT  
1091 - << __SRS_JFIELD_ORG("meminfo_ok", (m->ok? "true":"false")) << __SRS_JFIELD_CONT  
1092 - << __SRS_JFIELD_ORG("platform_ok", (p->ok? "true":"false")) << __SRS_JFIELD_CONT  
1093 - << __SRS_JFIELD_ORG("network_ok", (n_ok? "true":"false")) << __SRS_JFIELD_CONT  
1094 - << __SRS_JFIELD_ORG("network_srs_ok", (nrs->ok? "true":"false")) << __SRS_JFIELD_CONT 1090 + << __SRS_JFIELD_ORG("ok", (ok? "true":"false")) << __SRS_JFIELD_CONT
1095 << __SRS_JFIELD_ORG("now_ms", now) << __SRS_JFIELD_CONT 1091 << __SRS_JFIELD_ORG("now_ms", now) << __SRS_JFIELD_CONT
1096 << __SRS_JFIELD_ORG("self", __SRS_JOBJECT_START) 1092 << __SRS_JFIELD_ORG("self", __SRS_JOBJECT_START)
1097 << __SRS_JFIELD_STR("version", RTMP_SIG_SRS_VERSION) << __SRS_JFIELD_CONT 1093 << __SRS_JFIELD_STR("version", RTMP_SIG_SRS_VERSION) << __SRS_JFIELD_CONT
@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 // current release version 31 // current release version
32 #define VERSION_MAJOR "0" 32 #define VERSION_MAJOR "0"
33 #define VERSION_MINOR "9" 33 #define VERSION_MINOR "9"
34 -#define VERSION_REVISION "199" 34 +#define VERSION_REVISION "200"
35 #define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION 35 #define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
36 // server info. 36 // server info.
37 #define RTMP_SIG_SRS_KEY "SRS" 37 #define RTMP_SIG_SRS_KEY "SRS"