mirror of
https://bitbucket.org/jsuto/piler.git
synced 2026-04-05 17:49:19 +02:00
revised ms journal handling
This commit is contained in:
@@ -47,16 +47,10 @@ int make_digests(struct session_data *sdata, struct __config *cfg){
|
||||
fd = open(sdata->filename, O_RDONLY);
|
||||
if(fd == -1) return -1;
|
||||
|
||||
if(sdata->ms_journal == 1 && sdata->journal_envelope_length < sizeof(buf)){
|
||||
n = read(fd, buf, sdata->journal_envelope_length);
|
||||
}
|
||||
|
||||
|
||||
while((n = read(fd, buf, sizeof(buf))) > 0){
|
||||
len += n;
|
||||
|
||||
if(sdata->ms_journal == 1 && len > sdata->tot_len) n -= len - sdata->tot_len;
|
||||
|
||||
SHA256_Update(&context2, buf, n);
|
||||
|
||||
body = (char *)&buf[0];
|
||||
|
||||
Reference in New Issue
Block a user