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("Link data as string is: %s\n", string(l.Data))
|
||||
tmpLink = &l
|
||||
answ, err := com.ClientSendServerLink(l)
|
||||
answ, err := com.ClientSendServerLink(r.ID, l)
|
||||
if err != nil {
|
||||
log.Printf("Error: com: %v", err)
|
||||
continue
|
||||
|
|
|
@ -167,7 +167,7 @@ func DecodeLink(data []byte) (*Link, error) {
|
|||
return &l, nil
|
||||
}
|
||||
|
||||
func ClientSendServerLink(l Link) ([]byte, error) {
|
||||
func ClientSendServerLink(from uint16, l Link) ([]byte, error) {
|
||||
bb, err := l.Bytes()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -175,7 +175,7 @@ func ClientSendServerLink(l Link) ([]byte, error) {
|
|||
c := Message{
|
||||
Version: V1,
|
||||
ID: ID_CLIENT_SEND_SERVER_LINK,
|
||||
FromID: 0,
|
||||
FromID: from,
|
||||
ToID: 0,
|
||||
DataLen: uint16(len(bb)),
|
||||
Data: bb,
|
||||
|
|
Loading…
Reference in New Issue
Block a user