1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

for #155, refine code, donot check network devices for osx.

This commit is contained in:
winlin 2015-03-21 15:38:22 +08:00
parent 33cca3e027
commit 2f2aaf5ee4

View file

@ -147,7 +147,7 @@ SrsProcSelfStat::SrsProcSelfStat()
pid = 0; pid = 0;
memset(comm, 0, sizeof(comm)); memset(comm, 0, sizeof(comm));
state = 0; state = '0';
ppid = 0; ppid = 0;
pgrp = 0; pgrp = 0;
session = 0; session = 0;
@ -1146,7 +1146,6 @@ void srs_api_dump_summaries(std::stringstream& ss)
int64_t now = srs_get_system_time_ms(); int64_t now = srs_get_system_time_ms();
double srs_uptime = (now - p->srs_startup_time) / 100 / 10.0; double srs_uptime = (now - p->srs_startup_time) / 100 / 10.0;
bool n_ok = false;
int64_t n_sample_time = 0; int64_t n_sample_time = 0;
int64_t nr_bytes = 0; int64_t nr_bytes = 0;
int64_t ns_bytes = 0; int64_t ns_bytes = 0;
@ -1160,7 +1159,6 @@ void srs_api_dump_summaries(std::stringstream& ss)
continue; continue;
} }
n_ok = true;
nr_bytes += o.rbytes; nr_bytes += o.rbytes;
ns_bytes += o.sbytes; ns_bytes += o.sbytes;
n_sample_time = o.sample_time; n_sample_time = o.sample_time;
@ -1168,7 +1166,7 @@ void srs_api_dump_summaries(std::stringstream& ss)
// all data is ok? // all data is ok?
bool ok = (r->ok && u->ok && s->ok && c->ok bool ok = (r->ok && u->ok && s->ok && c->ok
&& d->ok && m->ok && p->ok && n_ok && nrs->ok); && d->ok && m->ok && p->ok && nrs->ok);
ss << SRS_JOBJECT_START ss << SRS_JOBJECT_START
<< SRS_JFIELD_ERROR(ERROR_SUCCESS) << SRS_JFIELD_CONT << SRS_JFIELD_ERROR(ERROR_SUCCESS) << SRS_JFIELD_CONT