Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
VirusCheckPlugin4Rosetta
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Digital Preservation
VirusCheckPlugin4Rosetta
Commits
a335766b
Commit
a335766b
authored
6 years ago
by
Andreas Romeyke
Browse files
Options
Downloads
Patches
Plain Diff
- Keepalive enabled
- ReUseAddress enabled - more detailed error log
parent
7dee39ba
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
PLUGIN-INF/metadata_SLUBVirusCheckClamAVPlugin.xml
+1
-1
1 addition, 1 deletion
PLUGIN-INF/metadata_SLUBVirusCheckClamAVPlugin.xml
java/org/slub/rosetta/dps/repository/plugin/SLUBVirusCheckClamAVPlugin.java
+12
-2
12 additions, 2 deletions
...tta/dps/repository/plugin/SLUBVirusCheckClamAVPlugin.java
with
13 additions
and
3 deletions
PLUGIN-INF/metadata_SLUBVirusCheckClamAVPlugin.xml
+
1
−
1
View file @
a335766b
...
...
@@ -49,7 +49,7 @@
</fr:x_form>
</pl:initParameters>
<pl:description>
SLUB Virus Check Plugin using installed ClamAV daemon via tcp-sockets
</pl:description>
<pl:version>
1.
5
</pl:version>
<pl:version>
1.
6
</pl:version>
<pl:materialType>
DIGITAL
</pl:materialType>
<pl:module>
Repository
</pl:module>
<pl:generalType>
TASK
</pl:generalType>
...
...
This diff is collapsed.
Click to expand it.
java/org/slub/rosetta/dps/repository/plugin/SLUBVirusCheckClamAVPlugin.java
+
12
−
2
View file @
a335766b
...
...
@@ -186,6 +186,16 @@ public class SLUBVirusCheckClamAVPlugin implements VirusCheckPlugin {
//System.out.println("Could not set socket timeout to " + getTimeOut() + "ms " + e);
log
.
error
(
"Could not set socket timeout to "
+
getTimeOut
()
+
"ms"
,
e
);
}
try
{
socket
.
setKeepAlive
(
true
);
}
catch
(
SocketException
e
)
{
log
.
error
(
"Could not enable KeepAlive"
,
e
);
}
try
{
socket
.
setReuseAddress
(
true
);
}
catch
(
SocketException
e
)
{
log
.
error
(
"Could not set ReUseAddress"
,
e
);
}
return
socket
;
}
...
...
@@ -286,7 +296,7 @@ public class SLUBVirusCheckClamAVPlugin implements VirusCheckPlugin {
//System.out.println("clamd protocol not fully implemented");
}
}
catch
(
IOException
e
)
{
log
.
error
(
"exception creation socket, clamd not available at host="
+
host
+
"port="
+
port
,
e
);
log
.
error
(
"exception creation socket
in scan()
, clamd not available at host="
+
host
+
"port="
+
port
,
e
);
//System.out.println("exception creation socket, clamd not available at host=" + host + "port=" + port + " " + e);
setStatus
(
Status
.
FAILED
);
setSignature
(
"ERROR: clamd not available"
);
...
...
@@ -314,7 +324,7 @@ public class SLUBVirusCheckClamAVPlugin implements VirusCheckPlugin {
callSocketCommand
(
socket
,
command
);
return
response
.
trim
();
}
catch
(
IOException
e
)
{
log
.
error
(
"exception creation socket, clamd not available at host="
+
host
+
"port="
+
port
,
e
);
log
.
error
(
"exception creation socket
in getAgent()
, clamd not available at host="
+
host
+
"port="
+
port
,
e
);
//System.out.println("exception creation socket, clamd not available at host=" + host + "port=" + port + " " + e);
setStatus
(
Status
.
FAILED
);
setSignature
(
"ERROR: clamd not available"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment