Refine the random id by srs_random_str

pull/2448/head
winlin 4 years ago
parent 6ea270adf3
commit 98e56f5325

@ -54,12 +54,7 @@ srs_error_t SrsLatestVersion::start()
return srs_success; return srs_success;
} }
char buf[10]; server_id_ = srs_random_str(10);
srs_random_generate(buf, sizeof(buf));
for (int i = 0; i < (int)sizeof(buf); i++) {
buf[i] = 'a' + uint8_t(buf[i])%25;
}
server_id_ = string(buf, sizeof(buf));
return trd_->start(); return trd_->start();
} }

Loading…
Cancel
Save