Skip to content

Commit f97d055

Browse files
NothNothNeb
andauthored
Added a Wirego version string (in addition to API version string). (#33)
Switching to v2.1 Co-authored-by: Neb <bgirard@quarkslab.com>
1 parent 0a32cee commit f97d055

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

wirego_bridge/version.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
#ifndef _VERSION_H_
22
#define _VERSION_H_
33

4-
// Note: must match the ones defined in ../wirego/version.go
4+
//Wirego ZMQ API version
5+
//Note: must match the ones defined in language packages (../wirego_remote/go/wirego/version.go and ../wirego_remote/python/wirego.py)
6+
#define WIREGO_API_VERSION_MAJOR 2
7+
#define WIREGO_API_VERSION_MINOR 0
8+
9+
10+
//Wirego plugin version
511
#define WIREGO_VERSION_MAJOR 2
6-
#define WIREGO_VERSION_MINOR 0
12+
#define WIREGO_VERSION_MINOR 1
713

814
#endif

wirego_bridge/wirego.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ void proto_register_wirego(void) {
6262
wirego_h.proto_wirego = -1;
6363
wirego_h.fields_mapping = NULL;
6464

65-
ws_warning("Wirego starting with czmq %d.%d\n", ZMQ_VERSION_MAJOR, ZMQ_VERSION_MINOR);
65+
ws_warning("Wirego (v%d.%d) starting with czmq %d.%d\n", WIREGO_VERSION_MAJOR, WIREGO_VERSION_MINOR, ZMQ_VERSION_MAJOR, ZMQ_VERSION_MINOR);
6666

6767
//Register preferences menu (used to set the ZMQ endpoint)
6868
register_preferences_menu();
@@ -119,9 +119,9 @@ void proto_register_wirego(void) {
119119
ws_warning("Wirego: failed to retrieve remote version");
120120
return;
121121
}
122-
ws_warning("Wirego bridge version: %d.%d", WIREGO_VERSION_MAJOR, WIREGO_VERSION_MINOR);
122+
ws_warning("Wirego bridge version: %d.%d", WIREGO_API_VERSION_MAJOR, WIREGO_API_VERSION_MINOR);
123123
ws_warning("Wirego remote version: %d.%d", vmajor, vminor);
124-
if ((vmajor != WIREGO_VERSION_MAJOR) || (vminor != WIREGO_VERSION_MINOR)) {
124+
if ((vmajor != WIREGO_API_VERSION_MAJOR) || (vminor != WIREGO_API_VERSION_MINOR)) {
125125
ws_warning("Wirego versions differs, aborting.");
126126
return;
127127
}

0 commit comments

Comments
 (0)