Changed name of socksSetup to C_SocksSetup

This commit is contained in:
saxon 2018-08-07 12:05:58 +09:30
parent 10d655f69c
commit 36cae47dc3
1 changed files with 3 additions and 3 deletions

View File

@ -521,7 +521,7 @@ func C_RTMP_SetupUrl(r *C.RTMP, u string) int32 {
} }
} }
socksSetup(r, &r.Link.sockshost) C_SocksSetup(r, &r.Link.sockshost)
if r.Link.port == 0 { if r.Link.port == 0 {
switch { switch {
@ -536,7 +536,7 @@ func C_RTMP_SetupUrl(r *C.RTMP, u string) int32 {
return 1 return 1
} }
func socksSetup(r *C.RTMP, sockshost *C.AVal) { func C_SocksSetup(r *C.RTMP, sockshost *C.AVal) {
if sockshost.av_len != 0 { if sockshost.av_len != 0 {
socksport := strchr((*byte)(unsafe.Pointer(sockshost.av_val)), ':') socksport := strchr((*byte)(unsafe.Pointer(sockshost.av_val)), ':')
hostname := strdup((*byte)(unsafe.Pointer(sockshost.av_val))) hostname := strdup((*byte)(unsafe.Pointer(sockshost.av_val)))
@ -552,7 +552,7 @@ func socksSetup(r *C.RTMP, sockshost *C.AVal) {
unsafe.Pointer(socksport))+uintptr(1)), int(strlen((*byte)(unsafe.Pointer( unsafe.Pointer(socksport))+uintptr(1)), int(strlen((*byte)(unsafe.Pointer(
uintptr(unsafe.Pointer(socksport))+uintptr(1)))))+1))) uintptr(unsafe.Pointer(socksport))+uintptr(1)))))+1)))
if err != nil { if err != nil {
log.Println("socksSetup: bad string conversion!") log.Println("C_SocksSetup: bad string conversion!")
} }
if uintptr(unsafe.Pointer(socksport)) == 0 { if uintptr(unsafe.Pointer(socksport)) == 0 {
value = 1080 value = 1080