diff --git a/rtmp/rtmp.go b/rtmp/rtmp.go index 41a4ccc4..f5053fe9 100644 --- a/rtmp/rtmp.go +++ b/rtmp/rtmp.go @@ -795,8 +795,8 @@ func handShake(r *C.RTMP, FP9HandShake int32) int { log.Println("handShake: type mismatch: client sent %v, server sent: %v", clientbuf[0], typ) } - //if readN(r, (*byte)(unsafe.Pointer(&serversig[0])), RTMP_SIG_SIZE) != RTMP_SIG_SIZE { - if C.ReadN(r, (*C.char)(unsafe.Pointer(&serversig[0])), RTMP_SIG_SIZE) != RTMP_SIG_SIZE { + if readN(r, (*byte)(unsafe.Pointer(&serversig[0])), RTMP_SIG_SIZE) != RTMP_SIG_SIZE { + //if C.ReadN(r, (*C.char)(unsafe.Pointer(&serversig[0])), RTMP_SIG_SIZE) != RTMP_SIG_SIZE { return 0 }