anchor.diff:  process_status(MAC, S) ->
       case mnesia:dirty_read(gateways, MAC) of
           [] ->
  +            lager:error("Unknown MAC ~s", [binary_to_hex(MAC)]),
               {error, {unknown_mac, MAC}};
           [G] ->
               G2 = if
  
positive.code: 
      case mnesia:dirty_read(devices, DevEUI) of
          [] ->
              {error, {unknown_deveui, DevEUI}};
          [D] ->
              case aes_cmac:aes_cmac(D#device.appkey, Msg, 4) of
  
negative.code: check_link(DevAddr, FCnt) ->
      case mnesia:dirty_read(links, DevAddr) of
          [] ->
              lager:error("Unknown DevAddr ~s", [binary_to_hex(DevAddr)]),
              {error, {unknown_devaddr, DevAddr}};
          [L] ->
              case fcnt_gap(L#link.fcntup, FCnt) of
  