Browse code

geoip2: removed unneeded lib kmi from Makefile

- bits of formatting and removed svn ids

Daniel-Constantin Mierla authored on 02/01/2017 08:10:18
Showing 4 changed files
... ...
@@ -1,4 +1,4 @@
1
-# $Id$
1
+# geoip2 module
2 2
 #
3 3
 # WARNING: do not run this directly, it should be run by the master Makefile
4 4
 
... ...
@@ -9,7 +9,4 @@ LIBS= -lmaxminddb
9 9
 
10 10
 DEFS+=-DKAMAILIO_MOD_INTERFACE
11 11
 
12
-SERLIBPATH=../../lib
13
-SER_LIBS+=$(SERLIBPATH)/kmi/kmi
14
-
15 12
 include ../../Makefile.modules
... ...
@@ -1,5 +1,4 @@
1 1
 /**
2
- * $Id$
3 2
  *
4 3
  * This file is part of Kamailio, a free SIP server.
5 4
  *
... ...
@@ -115,7 +114,7 @@ static int geoip2_match(struct sip_msg *msg, gparam_t *target, gparam_t *pvname)
115 114
 {
116 115
 	str tomatch;
117 116
 	str pvclass;
118
-	
117
+
119 118
 	if(msg==NULL)
120 119
 	{
121 120
 		LM_ERR("received null msg\n");
... ...
@@ -1,5 +1,4 @@
1 1
 /**
2
- * $Id$
3 2
  *
4 3
  * This file is part of Kamailio, a free SIP server.
5 4
  *
... ...
@@ -178,14 +177,14 @@ int pv_parse_geoip2_name(pv_spec_p sp, str *in)
178 177
 
179 178
 	switch(pvs.len)
180 179
 	{
181
-		case 2: 
180
+		case 2:
182 181
 			if(strncmp(pvs.s, "cc", 2)==0)
183 182
 				gpv->type = 0;
184 183
 			else if(strncmp(pvs.s, "tz", 2)==0)
185 184
 				gpv->type = 1;
186 185
 			else goto error;
187 186
 		break;
188
-		case 3: 
187
+		case 3:
189 188
 			if(strncmp(pvs.s, "zip", 3)==0)
190 189
 				gpv->type = 2;
191 190
 			else if(strncmp(pvs.s, "lat", 3)==0)
... ...
@@ -194,7 +193,7 @@ int pv_parse_geoip2_name(pv_spec_p sp, str *in)
194 193
 				gpv->type = 4;
195 194
 			else goto error;
196 195
 		break;
197
-		case 4: 
196
+		case 4:
198 197
 			if(strncmp(pvs.s, "city", 4)==0)
199 198
 				gpv->type = 8;
200 199
 			else if(strncmp(pvs.s, "regc", 4)==0)
... ...
@@ -203,7 +202,7 @@ int pv_parse_geoip2_name(pv_spec_p sp, str *in)
203 202
 				gpv->type = 11;
204 203
 			else goto error;
205 204
 		break;
206
-		case 5: 
205
+		case 5:
207 206
 			if(strncmp(pvs.s, "metro", 5)==0)
208 207
 				gpv->type = 12;
209 208
 			else if(strncmp(pvs.s, "nmask", 5)==0)
... ...
@@ -433,7 +432,7 @@ int pv_get_geoip2(struct sip_msg *msg, pv_param_t *param,
433 432
 int geoip2_init_pv(char *path)
434 433
 {
435 434
 	int status = MMDB_open(path, MMDB_MODE_MMAP, &_handle_GeoIP);
436
-	
435
+
437 436
 	if(MMDB_SUCCESS != status)
438 437
 	{
439 438
 		LM_ERR("cannot open GeoIP database file at: %s\n", path);
... ...
@@ -454,7 +453,7 @@ void geoip2_destroy_pv(void)
454 453
 void geoip2_pv_reset(str *name)
455 454
 {
456 455
 	sr_geoip2_record_t *gr = NULL;
457
-	
456
+
458 457
 	gr = sr_geoip2_get_record(name);
459 458
 
460 459
 	if(gr==NULL)
... ...
@@ -466,13 +465,13 @@ int geoip2_update_pv(str *tomatch, str *name)
466 465
 {
467 466
 	sr_geoip2_record_t *gr = NULL;
468 467
 	int gai_error, mmdb_error;
469
-	
468
+
470 469
 	if(tomatch->len>255)
471 470
 	{
472 471
 		LM_DBG("target too long (max 255): %s\n", tomatch->s);
473 472
 		return -3;
474 473
 	}
475
-	
474
+
476 475
 	gr = sr_geoip2_get_record(name);
477 476
 	if(gr==NULL)
478 477
 	{
... ...
@@ -1,5 +1,4 @@
1 1
 /**
2
- * $Id$
3 2
  *
4 3
  * This file is part of Kamailio, a free SIP server.
5 4
  *