mirror of https://bitbucket.org/ausocean/av.git
Removed used Session.checkCounter and link.token.
This commit is contained in:
parent
60af77017d
commit
bef7177c5a
20
rtmp/rtmp.go
20
rtmp/rtmp.go
|
@ -609,6 +609,9 @@ func handleInvoke(s *Session, body []byte) error {
|
|||
s.log(DebugLevel, pkg+"invoking method "+meth)
|
||||
switch meth {
|
||||
case av_result:
|
||||
if (s.link.protocol & featureWrite) == 0 {
|
||||
return errNotWritable
|
||||
}
|
||||
var methodInvoked string
|
||||
for i, m := range s.methodCalls {
|
||||
if float64(m.num) == txn {
|
||||
|
@ -625,12 +628,6 @@ func handleInvoke(s *Session, body []byte) error {
|
|||
|
||||
switch methodInvoked {
|
||||
case avConnect:
|
||||
if s.link.token != "" {
|
||||
s.log(FatalLevel, pkg+"no support for link token")
|
||||
}
|
||||
if (s.link.protocol & featureWrite) == 0 {
|
||||
return errNotWritable
|
||||
}
|
||||
err := sendReleaseStream(s)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -650,9 +647,6 @@ func handleInvoke(s *Session, body []byte) error {
|
|||
return err
|
||||
}
|
||||
s.streamID = int32(n)
|
||||
if s.link.protocol&featureWrite == 0 {
|
||||
return errNotWritable
|
||||
}
|
||||
err = sendPublish(s)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -663,11 +657,9 @@ func handleInvoke(s *Session, body []byte) error {
|
|||
}
|
||||
|
||||
case avOnBWDone:
|
||||
if s.checkCounter == 0 { // ToDo: why is this always zero?
|
||||
err := sendCheckBW(s)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err := sendCheckBW(s)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
case avOnStatus:
|
||||
|
|
|
@ -46,7 +46,6 @@ type Session struct {
|
|||
url string
|
||||
inChunkSize int32
|
||||
outChunkSize int32
|
||||
checkCounter int32
|
||||
nBytesIn int32
|
||||
nBytesInSent int32
|
||||
streamID int32
|
||||
|
@ -75,7 +74,6 @@ type link struct {
|
|||
url string
|
||||
app string
|
||||
auth string
|
||||
token string
|
||||
flags int32
|
||||
protocol int32
|
||||
timeout uint
|
||||
|
|
Loading…
Reference in New Issue