home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 2 BBS
/
02-BBS.zip
/
orionful.zip
/
Docs
/
Adepttoss.Txt
next >
Wrap
Text File
|
1997-08-28
|
2KB
|
72 lines
This outlines the information of the AdeptToss.Log File
-------------------------------------------------------
Adept now keeps track of all net/echo areas in which any
new messages have been posted, and can dump these areas
to a file called AdeptToss.Log on request.
GateKpr has also been enhanced to take advantage of this
feature.
This is how it works
--------------------
Whenever GateKpr is run, it will ask Adept to dump the
current new message (net/echo) areas to AdeptToss.Log so
that it scans only those areas for new mail.
Adept will also dump this file on ShutDown.
AdeptToss.Log will be created only if any areas (net/echo)
have had any new messages since the last time the
AdeptToss.Log file was dumped.
Adept will always append (add) to the AdeptToss.Log, never
erase it. GateKpr will always erase (delete) the AdeptToss.Log
file if it finds one (after processing it).
Format of the AdeptToss.Log file
--------------------------------
The AdeptToss.Log is a plain ASCII file which contains only
the message area number, one, per line ended by a CR LF.
Tech Details
------------
Adept creates a shared semaphore for the AdeptToss.Log feature
to work seamlessly with GateKpr. GateKpr checks for the
semaphore, and if present, posts to it, which tells Adept to
dump the AdeptToss.Log file.
Adept, in turn, makes another post to the event semaphore to
signal to GateKpr that it is done with dumping the log.
The following is the code fragment example for anyone who wants
to implement the seamless dumping of the AdeptToss.Log in their
own programs.
APIRET RetCode;
ULONG PostCt;
USHORT Tries = 300;
DosOpenEventSem("\\SEM32\\AdeptXBBS\\GateKpr", &AdepTossSEM);
DosResetEventSem( AdepTossSEM, &PostCt );
DosPostEventSem( AdepTossSEM );
while ( ((RetCode = DosQueryEventSem( AdepTossSEM, &PostCt)) == 0) && Tries-- )
{
if ( PostCt >= 3 )
{
DosResetEventSem( AdepTossSEM, &PostCt );
break;
}
DosSleep( 1000L );
}
}
DosCloseEventSem( AdepTossSEM );