Module: kamailio
Branch: master
Commit: a5484f40c9fb27d7570906b96b8c951476cc12d7
URL:
https://github.com/kamailio/kamailio/commit/a5484f40c9fb27d7570906b96b8c951…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-01-02T09:10:57+01:00
geoip2: removed unneeded lib kmi from Makefile
- bits of formatting and removed svn ids
---
Modified: src/modules/geoip2/Makefile
Modified: src/modules/geoip2/geoip2_mod.c
Modified: src/modules/geoip2/geoip2_pv.c
Modified: src/modules/geoip2/geoip2_pv.h
---
Diff:
https://github.com/kamailio/kamailio/commit/a5484f40c9fb27d7570906b96b8c951…
Patch:
https://github.com/kamailio/kamailio/commit/a5484f40c9fb27d7570906b96b8c951…
---
diff --git a/src/modules/geoip2/Makefile b/src/modules/geoip2/Makefile
index f4b26a4..beb6d44 100644
--- a/src/modules/geoip2/Makefile
+++ b/src/modules/geoip2/Makefile
@@ -1,4 +1,4 @@
-# $Id$
+# geoip2 module
#
# WARNING: do not run this directly, it should be run by the master Makefile
@@ -9,7 +9,4 @@ LIBS= -lmaxminddb
DEFS+=-DKAMAILIO_MOD_INTERFACE
-SERLIBPATH=../../lib
-SER_LIBS+=$(SERLIBPATH)/kmi/kmi
-
include ../../Makefile.modules
diff --git a/src/modules/geoip2/geoip2_mod.c b/src/modules/geoip2/geoip2_mod.c
index 114e724..382a540 100644
--- a/src/modules/geoip2/geoip2_mod.c
+++ b/src/modules/geoip2/geoip2_mod.c
@@ -1,5 +1,4 @@
/**
- * $Id$
*
* This file is part of Kamailio, a free SIP server.
*
@@ -115,7 +114,7 @@ static int geoip2_match(struct sip_msg *msg, gparam_t *target,
gparam_t *pvname)
{
str tomatch;
str pvclass;
-
+
if(msg==NULL)
{
LM_ERR("received null msg\n");
diff --git a/src/modules/geoip2/geoip2_pv.c b/src/modules/geoip2/geoip2_pv.c
index a6464c4..cb5f6ea 100644
--- a/src/modules/geoip2/geoip2_pv.c
+++ b/src/modules/geoip2/geoip2_pv.c
@@ -1,5 +1,4 @@
/**
- * $Id$
*
* This file is part of Kamailio, a free SIP server.
*
@@ -178,14 +177,14 @@ int pv_parse_geoip2_name(pv_spec_p sp, str *in)
switch(pvs.len)
{
- case 2:
+ case 2:
if(strncmp(pvs.s, "cc", 2)==0)
gpv->type = 0;
else if(strncmp(pvs.s, "tz", 2)==0)
gpv->type = 1;
else goto error;
break;
- case 3:
+ case 3:
if(strncmp(pvs.s, "zip", 3)==0)
gpv->type = 2;
else if(strncmp(pvs.s, "lat", 3)==0)
@@ -194,7 +193,7 @@ int pv_parse_geoip2_name(pv_spec_p sp, str *in)
gpv->type = 4;
else goto error;
break;
- case 4:
+ case 4:
if(strncmp(pvs.s, "city", 4)==0)
gpv->type = 8;
else if(strncmp(pvs.s, "regc", 4)==0)
@@ -203,7 +202,7 @@ int pv_parse_geoip2_name(pv_spec_p sp, str *in)
gpv->type = 11;
else goto error;
break;
- case 5:
+ case 5:
if(strncmp(pvs.s, "metro", 5)==0)
gpv->type = 12;
else if(strncmp(pvs.s, "nmask", 5)==0)
@@ -433,7 +432,7 @@ int pv_get_geoip2(struct sip_msg *msg, pv_param_t *param,
int geoip2_init_pv(char *path)
{
int status = MMDB_open(path, MMDB_MODE_MMAP, &_handle_GeoIP);
-
+
if(MMDB_SUCCESS != status)
{
LM_ERR("cannot open GeoIP database file at: %s\n", path);
@@ -454,7 +453,7 @@ void geoip2_destroy_pv(void)
void geoip2_pv_reset(str *name)
{
sr_geoip2_record_t *gr = NULL;
-
+
gr = sr_geoip2_get_record(name);
if(gr==NULL)
@@ -466,13 +465,13 @@ int geoip2_update_pv(str *tomatch, str *name)
{
sr_geoip2_record_t *gr = NULL;
int gai_error, mmdb_error;
-
+
if(tomatch->len>255)
{
LM_DBG("target too long (max 255): %s\n", tomatch->s);
return -3;
}
-
+
gr = sr_geoip2_get_record(name);
if(gr==NULL)
{
diff --git a/src/modules/geoip2/geoip2_pv.h b/src/modules/geoip2/geoip2_pv.h
index ae42ff8..2878746 100644
--- a/src/modules/geoip2/geoip2_pv.h
+++ b/src/modules/geoip2/geoip2_pv.h
@@ -1,5 +1,4 @@
/**
- * $Id$
*
* This file is part of Kamailio, a free SIP server.
*