7
7
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
11
<META NAME="description" CONTENT="Limits">
10
<TITLE>Error handling</TITLE>
11
<META NAME="description" CONTENT="Error handling">
12
12
<META NAME="keywords" CONTENT="clamdoc">
13
13
<META NAME="resource-type" CONTENT="document">
14
14
<META NAME="distribution" CONTENT="global">
19
19
<LINK REL="STYLESHEET" HREF="clamdoc.css">
21
21
<LINK REL="next" HREF="node48.html">
22
<LINK REL="previous" HREF="node43.html">
23
<LINK REL="up" HREF="node32.html">
22
<LINK REL="previous" HREF="node46.html">
23
<LINK REL="up" HREF="node43.html">
24
24
<LINK REL="next" HREF="node48.html">
29
29
<DIV CLASS="navigation"><!--Navigation Panel-->
31
31
HREF="node48.html">
32
32
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
35
35
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
37
37
HREF="node46.html">
38
38
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
41
41
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>
43
<B> Next:</B> <A NAME="tex2html818"
44
HREF="node48.html">Database reloading</A>
45
<B> Up:</B> <A NAME="tex2html814"
46
HREF="node32.html">LibClamAV</A>
47
<B> Previous:</B> <A NAME="tex2html808"
48
HREF="node46.html">Engine structure</A>
49
<B> <A NAME="tex2html816"
43
<B> Next:</B> <A NAME="tex2html834"
44
HREF="node48.html">Engine structure</A>
45
<B> Up:</B> <A NAME="tex2html830"
46
HREF="node43.html">API</A>
47
<B> Previous:</B> <A NAME="tex2html824"
48
HREF="node46.html">Database loading</A>
49
<B> <A NAME="tex2html832"
50
50
HREF="node1.html">Contents</A></B>
53
53
<!--End of Navigation Panel-->
55
<H2><A NAME="SECTION00075000000000000000">
58
When you create a new engine with <code>cl_engine_new()</code>, it will have
59
all internal settings set to default values as recommended by the
60
ClamAV authors. It's possible to check and modify the values (numerical
61
and strings) using the following set of functions:
55
<H3><A NAME="SECTION00073400000000000000">
58
Use <code>cl_strerror()</code> to convert error codes into human readable
59
messages. The function returns a statically allocated string:
63
int cl_engine_set_num(struct cl_engine *engine,
64
enum cl_engine_field field, long long num);
66
long long cl_engine_get_num(const struct cl_engine *engine,
67
enum cl_engine_field field, int *err);
69
int cl_engine_set_str(struct cl_engine *engine,
70
enum cl_engine_field field, const char *str);
72
const char *cl_engine_get_str(const struct cl_engine *engine,
73
enum cl_engine_field field, int *err);
61
if(ret != CL_SUCCESS) {
62
printf("cl_load() error: %s\n", cl_strerror(ret));
63
cl_engine_free(engine);
75
Please don't modify the default values unless you know what you're doing.
76
Refer to the ClamAV sources (clamscan, clamd) for examples.