2
0
Эх сурвалжийг харах

acc_radius/misc_radius(k): use uint32_t type instead of UINT4

- UINT4 is not defined by freeradiusclient library
- libradiusclient-ng typedefs anyhow UINT4 to uint32_t in radiusclient-ng.h
Daniel-Constantin Mierla 13 жил өмнө
parent
commit
5db228f1a4

+ 4 - 4
modules_k/acc_radius/acc_radius_mod.c

@@ -293,7 +293,7 @@ int acc_radius_init(acc_init_info_t *inf)
 	return 0;
 }
 
-static inline UINT4 rad_status( struct sip_msg *req, int code )
+static inline uint32_t rad_status( struct sip_msg *req, int code )
 {
         str tag;
         unsigned int in_dialog_req = 0;
@@ -324,7 +324,7 @@ int acc_radius_send_request(struct sip_msg *req, acc_info_t *inf)
 {
 	int attr_cnt;
 	VALUE_PAIR *send;
-	UINT4 av_type;
+	uint32_t av_type;
 	int offset;
 	int i;
 
@@ -340,14 +340,14 @@ int acc_radius_send_request(struct sip_msg *req, acc_info_t *inf)
 	av_type = rd_vals[RV_SIP_SESSION].v; /* session*/
 	ADD_RAD_AVPAIR( RA_SERVICE_TYPE, &av_type, -1);
 
-	av_type = (UINT4)inf->env->code; /* status=integer */
+	av_type = (uint32_t)inf->env->code; /* status=integer */
 	ADD_RAD_AVPAIR( RA_SIP_RESPONSE_CODE, &av_type, -1);
 
 	av_type = req->REQ_METHOD; /* method */
 	ADD_RAD_AVPAIR( RA_SIP_METHOD, &av_type, -1);
 
 	/* unix time */
-	av_type = (UINT4)inf->env->ts;
+	av_type = (uint32_t)inf->env->ts;
 	ADD_RAD_AVPAIR( RA_TIME_STAMP, &av_type, -1);
 
 	/* add extra also */

+ 5 - 5
modules_k/misc_radius/functions.c

@@ -164,7 +164,7 @@ int radius_load_caller_avps(struct sip_msg* _m, char* _caller, char* _s2)
 {
     str user;
     VALUE_PAIR *send, *received;
-    UINT4 service;
+    uint32_t service;
     static char msg[4096];
     int extra_cnt, offset, i, res;
 
@@ -245,7 +245,7 @@ int radius_load_callee_avps(struct sip_msg* _m, char* _callee, char* _s2)
 {
     str user;
     VALUE_PAIR *send, *received;
-    UINT4 service;
+    uint32_t service;
     static char msg[4096];
     int extra_cnt, offset, i, res;
 
@@ -328,7 +328,7 @@ int radius_is_user_in(struct sip_msg* _m, char* _user, char* _group)
 {
     str user, *group;
     VALUE_PAIR *send, *received;
-    UINT4 service;
+    uint32_t service;
     static char msg[4096];
     int extra_cnt, offset, i, res;
 
@@ -423,7 +423,7 @@ int radius_does_uri_user_host_exist(struct sip_msg* _m, str user, str host)
 {
     char* at, *user_host;
     VALUE_PAIR *send, *received;
-    UINT4 service;
+    uint32_t service;
     static char msg[4096];
     int extra_cnt, offset, i, res;
 
@@ -589,7 +589,7 @@ int radius_does_uri_user_exist(struct sip_msg* _m, str user)
 {
     static char msg[4096];
     VALUE_PAIR *send, *received;
-    UINT4 service;
+    uint32_t service;
     int res, extra_cnt, offset, i;
     
     send = received = 0;