zbxpcp.so: update module.h from upstream 3.2.1

"Marko Myllynen" <[email protected]>
Newsgroups gmane.comp.sysutils.pcp
Organization Red Hat
Message-ID <[email protected]>
Hi,

Zabbix Agent module API has been changed, every existing binary is
broken and we need to adjust our local module.h copy.

Otherwise QA/1067 passing but some of the error codes have changed, I
don't have exact recollection have I seen this before or was this due
to slightly different setup here and there.

Zabbix 3.2 is available from their repos for RHEL 5 and newer, I don't
think we need to preserve source level compatibility with API version 1.

https://www.zabbix.com/documentation/3.2/manual/config/items/loadablemodules

---
 src/zabbix-agent/src/module.h | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/zabbix-agent/src/module.h b/src/zabbix-agent/src/module.h
index c8ba990..f0134aa 100644
--- a/src/zabbix-agent/src/module.h
+++ b/src/zabbix-agent/src/module.h
@@ -21,7 +21,16 @@ typedef __uint64_t zbx_uint64_t;
 #define ZBX_MODULE_OK	0
 #define ZBX_MODULE_FAIL	-1
 
-#define ZBX_MODULE_API_VERSION_ONE	1
+/* zbx_module_api_version() MUST return this constant */
+#define ZBX_MODULE_API_VERSION		2
+
+/* old name alias is kept for source compatibility only, SHOULD NOT be used */
+#define ZBX_MODULE_API_VERSION_ONE	ZBX_MODULE_API_VERSION
+
+/* HINT: For conditional compilation with different module.h versions modules can use: */
+/* #if ZBX_MODULE_API_VERSION == X                                                     */
+/*         ...                                                                         */
+/* #endif                                                                              */
 
 #define get_rkey(request)		(request)->key
 #define get_rparams_num(request)	(request)->nparam

Thanks,

-- 
Marko Myllynen

-=-=-=-=-=-=-=-=-=-=-=-
pcp mailing list
[email protected]
https://groups.io/g/pcp/messages
-=-=-
Groups.io Links:

You receive all messages sent to this group.

View/Reply Online (#14629): https://groups.io/g/pcp/message/14629
View All Messages In Topic (1): https://groups.io/g/pcp/topic/2992464
Mute This Topic: https://groups.io/mt/2992464?uid=174580
New Topic: https://groups.io/g/pcp/post

Change Your Subscription: https://groups.io/g/pcp/editsub?uid=174580

Group Home: https://groups.io/g/pcp
Contact Group Owner: [email protected]

Terms of Service: https://groups.io/static/tos

Unsubscribe: https://groups.io/g/pcp/leave/354243/563757577/xyzzy
-=-=-=-=-=-=-=-=-=-=-=-
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.