Created
August 21, 2014 14:13
-
-
Save razvancrainea/e83c075fed688412efec to your computer and use it in GitHub Desktop.
RTPProxy sockets creation patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git rtpp_command.c rtpp_command.c | |
index fa342b8..1a6852e 100644 | |
--- rtpp_command.c | |
+++ rtpp_command.c | |
@@ -898,6 +923,23 @@ handle_command(struct cfg *cf, int controlfd, double dtime) | |
append_session(cf, spb, 0); | |
append_session(cf, spb, 1); | |
+ /* TODO hack to create both ports */ | |
+ if (1) { | |
+ if (create_listener(cf, spa->laddr[1], &lport, fds) == -1) { | |
+ rtpp_log_write(RTPP_LOG_ERR, spa->log, "can't create listener"); | |
+ reply_error(cf, controlfd, &raddr, rlen, cookie, 7); | |
+ return 0; | |
+ } | |
+ spa->fds[1] = fds[0]; | |
+ spa->rtcp->fds[1] = fds[1]; | |
+ spa->ports[1] = lport; | |
+ spa->rtcp->ports[1] = lport + 1; | |
+ append_session(cf, spa, 1); | |
+ append_session(cf, spa->rtcp, 1); | |
+ lport = spa->ports[0]; | |
+ } | |
+ | |
+ | |
hash_table_append(cf, spa); | |
cf->sessions_created++; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment