removed redundant endding semicolons

This commit is contained in:
hyung-hwan 2025-03-07 21:12:21 +09:00
parent e56c45b3bf
commit ecc1d4580f
7 changed files with 11 additions and 11 deletions

View File

@ -85,4 +85,4 @@ cmd/tls.key:
cmd/rsa.key: cmd/rsa.key:
openssl genrsa -traditional -out cmd/rsa.key 2048 openssl genrsa -traditional -out cmd/rsa.key 2048
.PHONY: clean test .PHONY: all clean test

View File

@ -351,7 +351,7 @@ func (ctl *client_ctl_client_conns_id) ServeHTTP(w http.ResponseWriter, req *htt
var r *ClientRoute var r *ClientRoute
var spla string = "" var spla string = ""
r = cts.route_map[ri]; r = cts.route_map[ri]
if r.server_peer_listen_addr != nil { spla = r.server_peer_listen_addr.String() } if r.server_peer_listen_addr != nil { spla = r.server_peer_listen_addr.String() }
jsp = append(jsp, json_out_client_route{ jsp = append(jsp, json_out_client_route{
Id: r.Id, Id: r.Id,

View File

@ -1670,7 +1670,7 @@ func (c *Client) FindClientConnByIdStr(conn_id string) (*ClientConn, error) {
conn_nid, err = strconv.ParseUint(conn_id, 10, int(unsafe.Sizeof(ConnId(0)) * 8)) conn_nid, err = strconv.ParseUint(conn_id, 10, int(unsafe.Sizeof(ConnId(0)) * 8))
if err != nil { if err != nil {
return nil, fmt.Errorf("invalid connection id %s - %s", conn_id, err.Error()); return nil, fmt.Errorf("invalid connection id %s - %s", conn_id, err.Error())
//cts = c.FindClientConnByToken(conn_id) // if not numeric, attempt to use it as a token //cts = c.FindClientConnByToken(conn_id) // if not numeric, attempt to use it as a token
//if cts == nil { return nil, fmt.Errorf("non-existent connection token '%s'", conn_id) } //if cts == nil { return nil, fmt.Errorf("non-existent connection token '%s'", conn_id) }
} else { } else {

View File

@ -148,10 +148,10 @@ func (l *AppLogger) write(id string, level hodu.LogLevel, call_depth int, fmtstr
now = time.Now() now = time.Now()
_, off_s = now.Zone() _, off_s = now.Zone()
off_m = off_s / 60; off_m = off_s / 60
off_h = off_m / 60; off_h = off_m / 60
off_m = off_m % 60; off_m = off_m % 60
if off_m < 0 { off_m = -off_m; } if off_m < 0 { off_m = -off_m }
sb.WriteString( sb.WriteString(
fmt.Sprintf("%04d-%02d-%02d %02d:%02d:%02d %+03d%02d ", fmt.Sprintf("%04d-%02d-%02d %02d:%02d:%02d %+03d%02d ",

View File

@ -483,7 +483,7 @@ func (ctl *server_ctl_server_conns_id_routes_id_peers) ServeHTTP(w http.Response
r.pts_mtx.Lock() r.pts_mtx.Lock()
for _, pi = range r.pts_map.get_sorted_keys() { for _, pi = range r.pts_map.get_sorted_keys() {
var p *ServerPeerConn var p *ServerPeerConn
p = r.pts_map[pi]; p = r.pts_map[pi]
jcp = append(jcp, json_out_server_peer{ jcp = append(jcp, json_out_server_peer{
Id: p.conn_id, Id: p.conn_id,
ServerPeerAddr: p.conn.RemoteAddr().String(), ServerPeerAddr: p.conn.RemoteAddr().String(),

View File

@ -170,8 +170,8 @@ func (spc *ServerPeerConn) ReportEvent(event_type PACKET_KIND, event_data interf
pd, ok = event_data.(*PeerDesc) pd, ok = event_data.(*PeerDesc)
if !ok { if !ok {
// something wrong. leave it unknown. // something wrong. leave it unknown.
spc.client_peer_laddr = ""; spc.client_peer_laddr = ""
spc.client_peer_raddr = ""; spc.client_peer_raddr = ""
} else { } else {
spc.client_peer_laddr = pd.LocalAddrStr spc.client_peer_laddr = pd.LocalAddrStr
spc.client_peer_raddr = pd.RemoteAddrStr spc.client_peer_raddr = pd.RemoteAddrStr

View File

@ -1883,7 +1883,7 @@ func (s *Server) FindServerConnByIdStr(conn_id string) (*ServerConn, error) {
conn_nid, err = strconv.ParseUint(conn_id, 10, int(unsafe.Sizeof(ConnId(0)) * 8)) conn_nid, err = strconv.ParseUint(conn_id, 10, int(unsafe.Sizeof(ConnId(0)) * 8))
if err != nil { if err != nil {
//return nil, fmt.Errorf("invalid connection id %s - %s", conn_id, err.Error()); //return nil, fmt.Errorf("invalid connection id %s - %s", conn_id, err.Error())
cts = s.FindServerConnByClientToken(conn_id) // if not numeric, attempt to use it as a token cts = s.FindServerConnByClientToken(conn_id) // if not numeric, attempt to use it as a token
if cts == nil { return nil, fmt.Errorf("non-existent connection token '%s'", conn_id) } if cts == nil { return nil, fmt.Errorf("non-existent connection token '%s'", conn_id) }
} else { } else {