give "proper" status line

git-svn-id: file:///var/lib/svn/clamav-devel/branches/clamd-proto@4616 77e5149b-7576-45b1-b177-96237e5ba77b
remotes/push_mirror/0.95
aCaB 17 years ago
parent d100458f04
commit 01925d6506
  1. 8
      clamdscan/client.c

@ -90,10 +90,10 @@ static int dsresult(int sockd, const char *scantype, const char *filename, const
break;
}
while(r && (eol = memchr(pt, 0, r))) {
logg("~%s\n", bol);
if(eol-bol > 7) {
if(!memcmp(eol - 6, " FOUND", 6)) {
infected++;
logg("%s\n", bol);
if(optget(opts, "move")->enabled || optget(opts, "copy")->enabled) {
char *com = strrchr(bol, ':');
if(com) {
@ -112,8 +112,7 @@ static int dsresult(int sockd, const char *scantype, const char *filename, const
}
}
}
} else if(memcmp(eol-7, ": ERROR", 7)) {
logg("~%s\n", bol);
} else if(!memcmp(eol-6, " ERROR", 6)) {
waserror = 1;
}
}
@ -134,8 +133,7 @@ static int dsresult(int sockd, const char *scantype, const char *filename, const
bol = buff;
}
if(!infected && !printinfected)
logg("~%s: OK\n", filename);
if(!infected && !printinfected && !waserror)
return infected ? infected : (waserror ? -1 : 0);
}

Loading…
Cancel
Save