Skip to content

Commit

Permalink
fix #343
Browse files Browse the repository at this point in the history
  • Loading branch information
mpromonet committed Sep 28, 2024
1 parent 765d8da commit 97a0436
Showing 1 changed file with 24 additions and 4 deletions.
28 changes: 24 additions & 4 deletions inc/HTTPServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ class HTTPServer : public RTSPServer

virtual RTSPServer::ClientConnection* createNewClientConnection(int clientSocket, struct SOCKETCLIENT clientAddr)
{
return new HTTPClientConnection(*this, clientSocket, clientAddr, fOurConnectionsUseTLS);
return new HTTPClientConnection(*this, clientSocket, clientAddr, isRTSPS());
}

virtual RTSPServer::ClientSession* createNewClientSession(u_int32_t sessionId) {
Expand All @@ -272,9 +272,29 @@ class HTTPServer : public RTSPServer
#endif
}

bool isRTSPS() { return fOurConnectionsUseTLS; }
bool isSRTP() { return fWeServeSRTP; }
bool isSRTPEncrypted() { return fWeEncryptSRTP; }
bool isRTSPS() {
#if LIVEMEDIA_LIBRARY_VERSION_INT >= 1642723200
return fOurConnectionsUseTLS;
#else
return false;
#endif
}

bool isSRTP() {
#if LIVEMEDIA_LIBRARY_VERSION_INT >= 1642723200
return fWeServeSRTP;
#else
return false;
#endif
}

bool isSRTPEncrypted() {
#if LIVEMEDIA_LIBRARY_VERSION_INT >= 1642723200
return fWeEncryptSRTP;
#else
return false;
#endif
}

void addUserRecord(const char* username, const char* password) {
UserAuthenticationDatabase* auth = this->getAuthenticationDatabaseForCommand(NULL);
Expand Down

0 comments on commit 97a0436

Please sign in to comment.