Skip to content

Commit

Permalink
Restored functions renamed in 8.1.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
ip2location committed Sep 27, 2020
1 parent 16721a8 commit 58d9e68
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Developers_Guide.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ When IP2Location_clear_memory() function is called, and if any other process(es)
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.


Version 8.1.2 25/09/2020
Version 8.1.3 27/09/2020
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AC_PREREQ(2.59)
AC_INIT([IP2Loc], [8.1.2], [[email protected]])
AM_INIT_AUTOMAKE([IP2Loc], [8.1.2])
AC_INIT([IP2Loc], [8.1.3], [[email protected]])
AM_INIT_AUTOMAKE([IP2Loc], [8.1.3])

#AC_PREFIX_DEFAULT(/usr/)
AM_CONFIG_HEADER([config.h])
Expand Down
3 changes: 3 additions & 0 deletions contrib/IP2Location.spec
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ install -p data/IPV6-COUNTRY.BIN %{buildroot}%{_datadir}/%{name}/IPV6-COUNTRY.SA


%changelog
* Fri Sep 27 2020 IP2Location <[email protected]> - 8.1.3
- restored functions deleted in 8.1.0.

* Fri Sep 25 2020 IP2Location <[email protected]> - 8.1.2
- fixed version number in multiple places

Expand Down
3 changes: 3 additions & 0 deletions contrib/IP2Location.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ install -p data/IPV6-COUNTRY.BIN %{buildroot}%{_datadir}/%{name}/IPV6-COUNTRY.SA


%changelog
* Fri Sep 27 2020 IP2Location <[email protected]> - 8.1.3
- restored functions renamed in 8.1.0.

* Fri Sep 25 2020 IP2Location <[email protected]> - 8.1.2
- fixed version number in multiple places

Expand Down
19 changes: 19 additions & 0 deletions libIP2Location/IP2Location.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ static int IP2Location_initialize(IP2Location *handler)
return 0;
}

// Setup lookup mode (Will deprecate in coming major version update)
int32_t IP2Location_open_mem(IP2Location *handler, enum IP2Location_lookup_mode mode)
{
return IP2Location_set_lookup_mode(handler, mode);
}

// Set lookup mode
int32_t IP2Location_set_lookup_mode(IP2Location *handler, enum IP2Location_lookup_mode mode)
{
Expand Down Expand Up @@ -169,6 +175,12 @@ uint32_t IP2Location_close(IP2Location *handler)
return 0;
}

// Clear memory object (Will deprecate in coming major version update)
void IP2Location_delete_shm()
{
IP2Location_delete_shared_memory();
}

// Clear memory object
void IP2Location_clear_memory()
{
Expand Down Expand Up @@ -747,6 +759,13 @@ static int IP2Location_is_ipv6(char *ip)
return inet_pton(AF_INET6, ip, &result);
}


// Get API version numeric (Will deprecate in coming major version update)
unsigned long int IP2Location_api_version_num(void)
{
return (API_VERSION_NUMERIC);
}

// Get API version numeric
unsigned long int IP2Location_api_version_number(void)
{
Expand Down
7 changes: 5 additions & 2 deletions libIP2Location/IP2Location.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ extern "C" {
#endif
#endif

#define API_VERSION 8.1.2
#define API_VERSION 8.1.3
#define API_VERSION_MAJOR 8
#define API_VERSION_MINOR 1
#define API_VERSION_RELEASE 2
#define API_VERSION_RELEASE 3
#define API_VERSION_NUMERIC (((API_VERSION_MAJOR * 100) + API_VERSION_MINOR) * 100 + API_VERSION_RELEASE)

#define MAX_IPV4_RANGE 4294967295U
Expand Down Expand Up @@ -148,6 +148,7 @@ typedef struct {

/* Public functions */
IP2Location *IP2Location_open(char *bin);
int IP2Location_open_mem(IP2Location *handler, enum IP2Location_lookup_mode);
int IP2Location_set_lookup_mode(IP2Location *handler, enum IP2Location_lookup_mode);
uint32_t IP2Location_close(IP2Location *handler);
IP2LocationRecord *IP2Location_get_country_short(IP2Location *handler, char *ip);
Expand All @@ -172,8 +173,10 @@ IP2LocationRecord *IP2Location_get_elevation(IP2Location *handler, char *ip);
IP2LocationRecord *IP2Location_get_usagetype(IP2Location *handler, char *ip);
IP2LocationRecord *IP2Location_get_all(IP2Location *handler, char *ip);
void IP2Location_free_record(IP2LocationRecord *record);
void IP2Location_delete_shm();
void IP2Location_clear_memory();
unsigned long int IP2Location_api_version_number(void);
unsigned long int IP2Location_api_version_num(void);
char *IP2Location_api_version_string(void);
char *IP2Location_lib_version_string(void);
struct in6_addr IP2Location_read_ipv6_address(FILE *handle, uint32_t position);
Expand Down

0 comments on commit 58d9e68

Please sign in to comment.