Fix
This commit is contained in:
parent
1c9d112d6c
commit
b893e0af71
|
@ -132,7 +132,7 @@ func readFromWebSocket(conn net.Conn, ws *websocket.Conn) {
|
||||||
log.Printf("I generated link: %v\n", l)
|
log.Printf("I generated link: %v\n", l)
|
||||||
log.Printf("Link data as string is: %s\n", string(l.Data))
|
log.Printf("Link data as string is: %s\n", string(l.Data))
|
||||||
tmpLink = &l
|
tmpLink = &l
|
||||||
answ, err := com.ClientSendServerLink(l)
|
answ, err := com.ClientSendServerLink(r.ID, l)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("Error: com: %v", err)
|
log.Printf("Error: com: %v", err)
|
||||||
continue
|
continue
|
||||||
|
|
|
@ -167,7 +167,7 @@ func DecodeLink(data []byte) (*Link, error) {
|
||||||
return &l, nil
|
return &l, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func ClientSendServerLink(l Link) ([]byte, error) {
|
func ClientSendServerLink(from uint16, l Link) ([]byte, error) {
|
||||||
bb, err := l.Bytes()
|
bb, err := l.Bytes()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@ -175,7 +175,7 @@ func ClientSendServerLink(l Link) ([]byte, error) {
|
||||||
c := Message{
|
c := Message{
|
||||||
Version: V1,
|
Version: V1,
|
||||||
ID: ID_CLIENT_SEND_SERVER_LINK,
|
ID: ID_CLIENT_SEND_SERVER_LINK,
|
||||||
FromID: 0,
|
FromID: from,
|
||||||
ToID: 0,
|
ToID: 0,
|
||||||
DataLen: uint16(len(bb)),
|
DataLen: uint16(len(bb)),
|
||||||
Data: bb,
|
Data: bb,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user