I've got a system setup where a Win95 client (written in Visual C++ 5.0)
presents a user with a GUI that collects information about hardware that
he/she would like to produce. This information is used to build a path
to the directory that contains the files to load into one of the
production machines. For example, through the use of menus and such the
user indicates that they would like to run a Laser Solder job on a F22
MLD board named xyz. Based upon this information, my application goes to
a directory called "p:\ois-data\laser\F22 MLD XYZ" and looks for files
that support paste and laser solder operations. This access is handled
through a read-only public share. Pretty simple stuff. All this stuff is
for the factory floor operators.
For the engineering activities (i.e., creating the files for doing the
pasting and soldering), I use a WWW interface that manipulates the
read-only data sets. An engineer indicates he'd like to edit the data,
it presents forms and such to accomplish this, verifies his identity and
privilege level, and then updates the data sets accordingly. The server
is a RedHat 5.0 system with Samba 1.9.18p8.
The problem that I'm having is that once a file has been opened from the
share, changes made to that file via the WWW interface are not seen by
the Win95 client, they still get the old file's contents. Time stamps
and size information is updated correctly and noticed by the
application, but when it reads files it gets the old content. I can quit
the application and run it again, and it will still read old data. The
only way I've found to make it get the current contents reliably is to
disconnect and reconnect the drive. This may be related to my previous
posting (that nobody seemed to be able to/or wanted to comment on)
regarding smbstatus showing files open when I know that they aren't.
During normal daily operations this isn't much of problem but when an
engineer is testing something out and doing a lot of modifications to
the data it causes problems. Its appears that the Samba daemon is not
checking if the file's contents have changed, even though its reporting
that the time stamps and size has changed. In one test I created a test
file with a couple of K in it, viewd it, then overwrote it with a
"data> file" command. When I looked at the file from the Win95 client it had
the same old contents but you only saw the first 29 bytes. These kind of
results occur in my own application, a new test application I wrote, and
with WordPad and NotePad. My application does a simple _stat(), _open(),
_read(), and _close() sequence. I'm absolutely positive that the file is
being closed. After a while or trying to do "QuickView" on the file
will
cause it to be displayed with its proper contents.
--
Charles Curley, Staff Engineer
Computer Integrated Manufacturing
Lockheed Martin Ocala Operations