Skip to content
Snippets Groups Projects
Commit ff82ca51 authored by rswindell's avatar rswindell
Browse files

No longer locks node.dab record when reading (unnecessary).

parent c7f9ca06
No related branches found
No related tags found
No related merge requests found
......@@ -38,8 +38,8 @@
#pragma hdrstop
#include <io.h>
#include <stdio.h>
#include <sys\stat.h>
#include <sys\locking.h>
#include <sys/stat.h>
//#include <sys/locking.h>
#include <fcntl.h>
#include <share.h>
#include "NodeFormUnit.h"
......@@ -163,19 +163,26 @@ void __fastcall TNodeForm::TimerTick(TObject *Sender)
lseek(nodedab, n*sizeof(node_t), SEEK_SET);
if(eof(nodedab))
break;
/*
if(locking(nodedab, LK_LOCK, sizeof(node_t))!=0) {
ListBox->Items->Add("Error "+AnsiString(errno)+" locking record for"
" node "+AnsiString(n+1));
break; /* was continue */
break;
}
*/
rd=read(nodedab,&node, sizeof(node_t));
/*
rderr=errno;
lseek(nodedab, n*sizeof(node_t), SEEK_SET);
locking(nodedab, LK_UNLCK, sizeof(node_t));
*/
if(rd!=sizeof(node_t)) {
continue;
/*
ListBox->Items->Add("Error "+AnsiString(rderr)+" reading record for"
" node "+AnsiString(n+1));
break;
*/
}
sprintf(str,"%3d ",n+1);
switch(node.status) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment