setDERPMap sets the DERP map, triggering a configuration of the engine if it has changed. c.L MUST NOT be held. Returns if the derpMap is dirty.
(derpMap *tailcfg.DERPMap)
| 323 | // c.L MUST NOT be held. |
| 324 | // Returns if the derpMap is dirty. |
| 325 | func (c *configMaps) setDERPMap(derpMap *tailcfg.DERPMap) bool { |
| 326 | c.L.Lock() |
| 327 | defer c.L.Unlock() |
| 328 | if CompareDERPMaps(c.derpMap, derpMap) { |
| 329 | return false |
| 330 | } |
| 331 | c.derpMap = derpMap |
| 332 | c.derpMapDirty = true |
| 333 | c.Broadcast() |
| 334 | return true |
| 335 | } |
| 336 | |
| 337 | // derMapLocked returns the current DERPMap. c.L must be held |
| 338 | func (c *configMaps) derpMapLocked() *tailcfg.DERPMap { |