Skip to content

Commit 58d9e68

Browse files
committed
Restored functions renamed in 8.1.0.
1 parent 16721a8 commit 58d9e68

File tree

6 files changed

+33
-5
lines changed

6 files changed

+33
-5
lines changed

Developers_Guide.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,4 @@ When IP2Location_clear_memory() function is called, and if any other process(es)
7272
After calling IP2Location_clear_memory(), the next call to IP2Location_set_lookup_mode() with IP2LOCATION_SHARED_MEMORY option will result in a new shared memory and will not reuse the old one if one exists and used by any other process. Please refer shm_open and shm_unlink man pages for more info.
7373

7474

75-
Version 8.1.2 25/09/2020
75+
Version 8.1.3 27/09/2020

configure.ac

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
AC_PREREQ(2.59)
2-
AC_INIT([IP2Loc], [8.1.2], [[email protected]])
3-
AM_INIT_AUTOMAKE([IP2Loc], [8.1.2])
2+
AC_INIT([IP2Loc], [8.1.3], [[email protected]])
3+
AM_INIT_AUTOMAKE([IP2Loc], [8.1.3])
44

55
#AC_PREFIX_DEFAULT(/usr/)
66
AM_CONFIG_HEADER([config.h])

contrib/IP2Location.spec

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ install -p data/IPV6-COUNTRY.BIN %{buildroot}%{_datadir}/%{name}/IPV6-COUNTRY.SA
122122

123123

124124
%changelog
125+
* Fri Sep 27 2020 IP2Location <[email protected]> - 8.1.3
126+
- restored functions deleted in 8.1.0.
127+
125128
* Fri Sep 25 2020 IP2Location <[email protected]> - 8.1.2
126129
- fixed version number in multiple places
127130

contrib/IP2Location.spec.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ install -p data/IPV6-COUNTRY.BIN %{buildroot}%{_datadir}/%{name}/IPV6-COUNTRY.SA
122122

123123

124124
%changelog
125+
* Fri Sep 27 2020 IP2Location <[email protected]> - 8.1.3
126+
- restored functions renamed in 8.1.0.
127+
125128
* Fri Sep 25 2020 IP2Location <[email protected]> - 8.1.2
126129
- fixed version number in multiple places
127130

libIP2Location/IP2Location.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,12 @@ static int IP2Location_initialize(IP2Location *handler)
129129
return 0;
130130
}
131131

132+
// Setup lookup mode (Will deprecate in coming major version update)
133+
int32_t IP2Location_open_mem(IP2Location *handler, enum IP2Location_lookup_mode mode)
134+
{
135+
return IP2Location_set_lookup_mode(handler, mode);
136+
}
137+
132138
// Set lookup mode
133139
int32_t IP2Location_set_lookup_mode(IP2Location *handler, enum IP2Location_lookup_mode mode)
134140
{
@@ -169,6 +175,12 @@ uint32_t IP2Location_close(IP2Location *handler)
169175
return 0;
170176
}
171177

178+
// Clear memory object (Will deprecate in coming major version update)
179+
void IP2Location_delete_shm()
180+
{
181+
IP2Location_delete_shared_memory();
182+
}
183+
172184
// Clear memory object
173185
void IP2Location_clear_memory()
174186
{
@@ -747,6 +759,13 @@ static int IP2Location_is_ipv6(char *ip)
747759
return inet_pton(AF_INET6, ip, &result);
748760
}
749761

762+
763+
// Get API version numeric (Will deprecate in coming major version update)
764+
unsigned long int IP2Location_api_version_num(void)
765+
{
766+
return (API_VERSION_NUMERIC);
767+
}
768+
750769
// Get API version numeric
751770
unsigned long int IP2Location_api_version_number(void)
752771
{

libIP2Location/IP2Location.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ extern "C" {
5454
#endif
5555
#endif
5656

57-
#define API_VERSION 8.1.2
57+
#define API_VERSION 8.1.3
5858
#define API_VERSION_MAJOR 8
5959
#define API_VERSION_MINOR 1
60-
#define API_VERSION_RELEASE 2
60+
#define API_VERSION_RELEASE 3
6161
#define API_VERSION_NUMERIC (((API_VERSION_MAJOR * 100) + API_VERSION_MINOR) * 100 + API_VERSION_RELEASE)
6262

6363
#define MAX_IPV4_RANGE 4294967295U
@@ -148,6 +148,7 @@ typedef struct {
148148

149149
/* Public functions */
150150
IP2Location *IP2Location_open(char *bin);
151+
int IP2Location_open_mem(IP2Location *handler, enum IP2Location_lookup_mode);
151152
int IP2Location_set_lookup_mode(IP2Location *handler, enum IP2Location_lookup_mode);
152153
uint32_t IP2Location_close(IP2Location *handler);
153154
IP2LocationRecord *IP2Location_get_country_short(IP2Location *handler, char *ip);
@@ -172,8 +173,10 @@ IP2LocationRecord *IP2Location_get_elevation(IP2Location *handler, char *ip);
172173
IP2LocationRecord *IP2Location_get_usagetype(IP2Location *handler, char *ip);
173174
IP2LocationRecord *IP2Location_get_all(IP2Location *handler, char *ip);
174175
void IP2Location_free_record(IP2LocationRecord *record);
176+
void IP2Location_delete_shm();
175177
void IP2Location_clear_memory();
176178
unsigned long int IP2Location_api_version_number(void);
179+
unsigned long int IP2Location_api_version_num(void);
177180
char *IP2Location_api_version_string(void);
178181
char *IP2Location_lib_version_string(void);
179182
struct in6_addr IP2Location_read_ipv6_address(FILE *handle, uint32_t position);

0 commit comments

Comments
 (0)