Browse Source

- fixed 64bits compiling: pointers are on 64 and they need to be cast to interger via long type!

git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@3934 689a6050-402a-0410-94f2-e92a70836424
Bogdan-Andrei Iancu 17 years ago
parent
commit
5339fe7c7e
1 changed files with 4 additions and 4 deletions
  1. 4 4
      modules_k/ratelimit/ratelimit.c

+ 4 - 4
modules_k/ratelimit/ratelimit.c

@@ -680,8 +680,8 @@ static int w_rl_drop(struct sip_msg* msg, char *p1, char *p2)
 {
 	unsigned int low, high;
 
-	low = (unsigned int)p1;
-	high = (unsigned int)p2;
+	low = (unsigned int)(unsigned long)p1;
+	high = (unsigned int)(unsigned long)p2;
 
 	if (high < low) {
 		return rl_drop(msg, low, low);
@@ -695,7 +695,7 @@ static int w_rl_drop_forced(struct sip_msg* msg, char *p1, char *p2)
 	unsigned int i;
 
 	if (p1) {
-		i = (unsigned int)p1;
+		i = (unsigned int)(unsigned long)p1;
 		LM_DBG("send retry in %d s\n", i);
 	} else {
 		i = 5;
@@ -870,7 +870,7 @@ static int w_rl_check_forced_pipe(struct sip_msg* msg, char *p1, char *p2)
 	int pipe;
 
 	if (p1) {
-		pipe = (int)(unsigned int)p1;
+		pipe = (int)(unsigned int)(unsigned long)p1;
 		LM_DBG("trying pipe %d\n", pipe);
 	} else {
 		pipe = -1;