mirror of https://github.com/OpenVidu/openvidu.git
openvidu-server COTURN DB configuration extended on startup
parent
3166f67f0d
commit
b480eca0af
|
@ -207,8 +207,10 @@ public abstract class SessionManager {
|
|||
if (this.coturnCredentialsService.isCoturnAvailable()) {
|
||||
turnCredentials = coturnCredentialsService.createUser();
|
||||
if (turnCredentials != null) {
|
||||
token += "&turnUsername=" + turnCredentials.getUsername();
|
||||
token += "&turnCredential=" + turnCredentials.getCredential();
|
||||
if (turnCredentials != null) {
|
||||
token += "&turnUsername=" + turnCredentials.getUsername();
|
||||
token += "&turnCredential=" + turnCredentials.getCredential();
|
||||
}
|
||||
}
|
||||
}
|
||||
Token t = new Token(token, role, serverMetadata, turnCredentials);
|
||||
|
@ -282,8 +284,10 @@ public abstract class SessionManager {
|
|||
TurnCredentials turnCredentials = null;
|
||||
if (this.coturnCredentialsService.isCoturnAvailable()) {
|
||||
turnCredentials = coturnCredentialsService.createUser();
|
||||
token += "&turnUsername=" + turnCredentials.getUsername();
|
||||
token += "&turnCredential=" + turnCredentials.getCredential();
|
||||
if (turnCredentials != null) {
|
||||
token += "&turnUsername=" + turnCredentials.getUsername();
|
||||
token += "&turnCredential=" + turnCredentials.getCredential();
|
||||
}
|
||||
}
|
||||
Token t = new Token(token, role, serverMetadata, turnCredentials);
|
||||
|
||||
|
|
|
@ -22,9 +22,15 @@ public class BashCoturnCredentialsService extends CoturnCredentialsService {
|
|||
if (response.contains("turnadmin: not found")) {
|
||||
// No coturn installed in the host machine
|
||||
log.warn("No COTURN server is installed in the host machine");
|
||||
log.warn("No COTURN server will be configured for clients");
|
||||
this.coturnAvailable = false;
|
||||
} else if (response.contains("Cannot open SQLite DB connection")) {
|
||||
log.warn("COTURN SQLite database is not accesible at path " + this.coturnDatabaseLocation);
|
||||
log.warn("No COTURN server will be configured for clients");
|
||||
this.coturnAvailable = false;
|
||||
} else {
|
||||
log.info("COTURN sqlite database location: " + this.openviduConfig.getCoturnSqlite());
|
||||
}
|
||||
log.info("COTURN sqlite database location: " + this.openviduConfig.getCoturnSqlite());
|
||||
} catch (IOException | InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue