]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-7924: [mod_rtmp] Modify initStream & createStream responses
authorPaul Cuttler <paulcuttler@gmail.com>
Wed, 7 Oct 2015 03:50:27 +0000 (14:50 +1100)
committerPaul Cuttler <paulcuttler@gmail.com>
Wed, 7 Oct 2015 03:50:27 +0000 (14:50 +1100)
Moved the response message mistakenly placed in the initStream
handler to the createStream handler

src/mod/endpoints/mod_rtmp/rtmp_sig.c

index 711d368736db5c9f2d5dda8689f409cb2a0c2b55..c319fc7881f1017bcea1c3ef481e1cf60435d5bb 100644 (file)
@@ -127,6 +127,13 @@ RTMP_INVOKE_FUNCTION(rtmp_i_connect)
 
 RTMP_INVOKE_FUNCTION(rtmp_i_createStream)
 {
+       rtmp_send_invoke_free(rsession, amfnumber, 0, 0,
+               amf0_str("_result"),
+               amf0_number_new(transaction_id),
+               amf0_null_new(),
+               amf0_number_new(rsession->next_streamid),
+               NULL);
+
        switch_log_printf(SWITCH_CHANNEL_UUID_LOG(rsession->uuid), SWITCH_LOG_INFO, "Replied to createStream (%u)\n", amf0_get_number(argv[1]));
 
        rsession->next_streamid++;
@@ -136,13 +143,6 @@ RTMP_INVOKE_FUNCTION(rtmp_i_createStream)
 
 RTMP_INVOKE_FUNCTION(rtmp_i_initStream)
 {
-       rtmp_send_invoke_free(rsession, amfnumber, 0, 0,
-               amf0_str("_result"),
-               amf0_number_new(transaction_id),
-               amf0_null_new(),
-               amf0_number_new(rsession->next_streamid),
-               NULL);
-
        switch_log_printf(SWITCH_CHANNEL_UUID_LOG(rsession->uuid), SWITCH_LOG_INFO, "Received initStream (%u)\n", rsession->next_streamid);
 
        rsession->next_streamid++;