()
| 177 | } |
| 178 | |
| 179 | func (router *WshRouter) SetAsRootRouter() { |
| 180 | router.lock.Lock() |
| 181 | defer router.lock.Unlock() |
| 182 | router.isRootRouter = true |
| 183 | |
| 184 | // also bind $control:root to the control RPC |
| 185 | linkId := router.routeMap[ControlRoute] |
| 186 | if linkId != baseds.NoLinkId { |
| 187 | router.routeMap[ControlRootRoute] = linkId |
| 188 | log.Printf("wshrouter registered control:root route linkid=%d", linkId) |
| 189 | } |
| 190 | } |
| 191 | |
| 192 | func noRouteErr(routeId string) error { |
| 193 | if routeId == "" { |
no outgoing calls
no test coverage detected