diff options
Diffstat (limited to 'toxcore')
-rw-r--r-- | toxcore/tox.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/toxcore/tox.c b/toxcore/tox.c index c28c5178..23d0d3e4 100644 --- a/toxcore/tox.c +++ b/toxcore/tox.c | |||
@@ -72,23 +72,26 @@ typedef struct Messenger Tox; | |||
72 | 72 | ||
73 | uint32_t tox_version_major(void) | 73 | uint32_t tox_version_major(void) |
74 | { | 74 | { |
75 | return 0; | 75 | return TOX_VERSION_MAJOR; |
76 | } | 76 | } |
77 | 77 | ||
78 | uint32_t tox_version_minor(void) | 78 | uint32_t tox_version_minor(void) |
79 | { | 79 | { |
80 | return 0; | 80 | return TOX_VERSION_MINOR; |
81 | } | 81 | } |
82 | 82 | ||
83 | uint32_t tox_version_patch(void) | 83 | uint32_t tox_version_patch(void) |
84 | { | 84 | { |
85 | return 0; | 85 | return TOX_VERSION_PATCH; |
86 | } | 86 | } |
87 | 87 | ||
88 | bool tox_version_is_compatible(uint32_t major, uint32_t minor, uint32_t patch) | 88 | bool tox_version_is_compatible(uint32_t major, uint32_t minor, uint32_t patch) |
89 | { | 89 | { |
90 | //TODO | 90 | return (TOX_VERSION_MAJOR == major && /* Force the major version */ |
91 | return 1; | 91 | (TOX_VERSION_MINOR > minor || /* Current minor version must be newer than requested -- or -- */ |
92 | (TOX_VERSION_MINOR == minor && TOX_VERSION_PATCH >= patch) /* the patch must be the same or newer */ | ||
93 | ) | ||
94 | ); | ||
92 | } | 95 | } |
93 | 96 | ||
94 | 97 | ||