Fixed CrashMail/CrashEcho highwaters suport
This commit is contained in:
parent
cf69e9116e
commit
61f978c8cd
@ -140,8 +140,10 @@ void JamArea::open_area() {
|
|||||||
memset(&data->hdrinfo, 0, sizeof(JamHdrInfo));
|
memset(&data->hdrinfo, 0, sizeof(JamHdrInfo));
|
||||||
read(data->fhjhr, &data->hdrinfo, sizeof(JamHdrInfo));
|
read(data->fhjhr, &data->hdrinfo, sizeof(JamHdrInfo));
|
||||||
|
|
||||||
if(not jamwide->smapihw and (data->fhjhw != -1))
|
if(not jamwide->smapihw and (data->fhjhw != -1)) {
|
||||||
|
lseek(data->fhjhw, 0, SEEK_SET);
|
||||||
read(data->fhjhw, &data->highwater, sizeof(long));
|
read(data->fhjhw, &data->highwater, sizeof(long));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
data->highwater = -1;
|
data->highwater = -1;
|
||||||
|
|
||||||
|
@ -74,8 +74,10 @@ void JamArea::lock() {
|
|||||||
Path file;
|
Path file;
|
||||||
sprintf(file, "%s.cmhw", path()); data->fhjhw = ::sopen(file, O_RDWR|O_BINARY, WideSharemode, S_STDRW);
|
sprintf(file, "%s.cmhw", path()); data->fhjhw = ::sopen(file, O_RDWR|O_BINARY, WideSharemode, S_STDRW);
|
||||||
}
|
}
|
||||||
if(data->fhjhw != -1)
|
if(data->fhjhw != -1) {
|
||||||
|
lseek(data->fhjhw, 0, SEEK_SET);
|
||||||
read(data->fhjhw, &data->highwater, sizeof(long));
|
read(data->fhjhw, &data->highwater, sizeof(long));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
data->highwater = -1;
|
data->highwater = -1;
|
||||||
}
|
}
|
||||||
@ -439,6 +441,7 @@ void JamArea::save_message(int __mode, gmsg* __msg, JamHdr& __hdr) {
|
|||||||
else if((data->highwater != -1) and (data->fhjhw != -1)) {
|
else if((data->highwater != -1) and (data->fhjhw != -1)) {
|
||||||
if(data->highwater >= __msg->msgno) {
|
if(data->highwater >= __msg->msgno) {
|
||||||
data->highwater = __msg->msgno - 1;
|
data->highwater = __msg->msgno - 1;
|
||||||
|
lseek(data->fhjhw, 0, SEEK_SET);
|
||||||
write(data->fhjhw, &data->highwater, sizeof(long));
|
write(data->fhjhw, &data->highwater, sizeof(long));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user