Exemplo n.º 1
0
 private void HandleCreateBlock(byte id, LogConfig config, byte errorStatus)
 {
     if (config != null)
     {
         if (errorStatus == 0 || errorStatus == EEXIST)
         {
             if (!config.Added)
             {
                 _log.Debug($"Have successfully added id={id}");
                 config.Added = true;
                 config.StartAlreadyAdded();
             }
         }
         else
         {
             LogErrorStatus(id, errorStatus, "adding");
             config.ErrorNumber = errorStatus;
             // TODO:
             //block.added_cb.call(False)
             //block.error_cb.call(block, msg)
         }
     }
     else
     {
         _log.Warn($"No LogEntry to assign block to; id: {id}");
     }
 }