Module: kamailio
Branch: master
Commit: 63942ce68faee014dbfb06dddce860be1c16474f
URL:
https://github.com/kamailio/kamailio/commit/63942ce68faee014dbfb06dddce860b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-01-02T09:10:57+01:00
geoip: removed unneeded lib kmi from Makefile
- bits of formatting and removed snv ids
---
Modified: src/modules/geoip/Makefile
Modified: src/modules/geoip/geoip_mod.c
Modified: src/modules/geoip/geoip_pv.c
Modified: src/modules/geoip/geoip_pv.h
---
Diff:
https://github.com/kamailio/kamailio/commit/63942ce68faee014dbfb06dddce860b…
Patch:
https://github.com/kamailio/kamailio/commit/63942ce68faee014dbfb06dddce860b…
---
diff --git a/src/modules/geoip/Makefile b/src/modules/geoip/Makefile
index a315246..d0f016d 100644
--- a/src/modules/geoip/Makefile
+++ b/src/modules/geoip/Makefile
@@ -8,7 +8,4 @@ LIBS= -lGeoIP
DEFS+=-DKAMAILIO_MOD_INTERFACE
-SERLIBPATH=../../lib
-SER_LIBS+=$(SERLIBPATH)/kmi/kmi
-
include ../../Makefile.modules
diff --git a/src/modules/geoip/geoip_mod.c b/src/modules/geoip/geoip_mod.c
index 61cf03b..1962172 100644
--- a/src/modules/geoip/geoip_mod.c
+++ b/src/modules/geoip/geoip_mod.c
@@ -1,5 +1,4 @@
/**
- * $Id$
*
* Copyright (C) 2010 Daniel-Constantin Mierla (
asipto.com)
*
@@ -117,7 +116,7 @@ static int geoip_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/geoip/geoip_pv.c b/src/modules/geoip/geoip_pv.c
index 12fe68f..1821c9b 100644
--- a/src/modules/geoip/geoip_pv.c
+++ b/src/modules/geoip/geoip_pv.c
@@ -1,5 +1,4 @@
/**
- * $Id$
*
* Copyright (C) 2010 Daniel-Constantin Mierla (
asipto.com)
*
@@ -174,14 +173,14 @@ int pv_parse_geoip_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)
@@ -196,7 +195,7 @@ int pv_parse_geoip_name(pv_spec_p sp, str *in)
gpv->type = 7;
else goto error;
break;
- case 4:
+ case 4:
if(strncmp(pvs.s, "city", 4)==0)
gpv->type = 8;
else if(strncmp(pvs.s, "area", 4)==0)
@@ -207,7 +206,7 @@ int pv_parse_geoip_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, "contc", 5)==0)
@@ -367,7 +366,7 @@ int pv_get_geoip(struct sip_msg *msg, pv_param_t *param,
int geoip_init_pv(char *path)
{
_handle_GeoIP = GeoIP_open(path, GEOIP_MMAP_CACHE);
-
+
if(_handle_GeoIP==NULL)
{
LM_ERR("cannot open GeoIP database file at: %s\n", path);
@@ -392,7 +391,7 @@ void geoip_destroy_pv(void)
void geoip_pv_reset(str *name)
{
sr_geoip_record_t *gr = NULL;
-
+
gr = sr_geoip_get_record(name);
if(gr==NULL)
@@ -407,13 +406,13 @@ void geoip_pv_reset(str *name)
int geoip_update_pv(str *tomatch, str *name)
{
sr_geoip_record_t *gr = NULL;
-
+
if(tomatch->len>255)
{
LM_DBG("target too long (max 255): %s\n", tomatch->s);
return -3;
}
-
+
gr = sr_geoip_get_record(name);
if(gr==NULL)
{
diff --git a/src/modules/geoip/geoip_pv.h b/src/modules/geoip/geoip_pv.h
index 8be5209..51c3312 100644
--- a/src/modules/geoip/geoip_pv.h
+++ b/src/modules/geoip/geoip_pv.h
@@ -1,5 +1,4 @@
/**
- * $Id$
*
* Copyright (C) 2010 Daniel-Constantin Mierla (
asipto.com)
*