Den 01-09-2011 17:25, Niels Baggesen skrev:
> First off it fixes the compile.
>
> This was a quick warning of a problem. I will see if I can set up a
> MySQL server to test, unless some of you have a working setup ...

Right, having set up a test environment under CentOS 5, the patch is as 
follows:

diff --git a/README.sql b/README.sql
index e2f7038..95cfc87 100644
--- a/README.sql
+++ b/README.sql
@@ -12,6 +12,9 @@ The MySQL database location and password must be 
configured i
         password=sql

  User may also be configured, if using a MySQL user besides root.
+WARNING: Some versions of MySQL (5.0 with CentOS 5) may require
+an additional dummy parameter (x=y), otherwise the last parameter
+in .my.cnf may be ignored.

  snmptrapd.conf must be configured to for the queue size and
  periodic flush interval:
diff --git a/apps/snmptrapd_sql.c b/apps/snmptrapd_sql.c
index c7433dc..59dfa6c 100644
--- a/apps/snmptrapd_sql.c
+++ b/apps/snmptrapd_sql.c
@@ -437,7 +437,7 @@ netsnmp_mysql_init(void)
          return -1;
      }

-    MY_INIT("snmptrapd");
+    my_init();

      /** load .my.cnf values */
      load_defaults ("my", _sql.groups, &not_argc, &not_argv);

Not calling my_init() results in load_defaults trying to access 
~/.my.cnf without expanding ~. Yuk!

RFV, please

/Niels

-- 
Niels Baggesen - @home - Ã…rhus - Denmark - [email protected]
The purpose of computing is insight, not numbers   ---   R W Hamming

------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to