Module: kamailio
Branch: master
Commit: b8b39e7d2f96cddd6ff2b7087c60f3f93fa90a1f
URL:
https://github.com/kamailio/kamailio/commit/b8b39e7d2f96cddd6ff2b7087c60f3f…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-02-03T21:18:36+01:00
Merge pull request #489 from mslehto/valuesh
modules/ims_icscf: removes values.h dependency
---
Modified: modules/ims_icscf/cxdx_lir.c
Modified: modules/ims_icscf/scscf_list.c
Modified: modules/ims_icscf/scscf_list.h
---
Diff:
https://github.com/kamailio/kamailio/commit/b8b39e7d2f96cddd6ff2b7087c60f3f…
Patch:
https://github.com/kamailio/kamailio/commit/b8b39e7d2f96cddd6ff2b7087c60f3f…
---
diff --git a/modules/ims_icscf/cxdx_lir.c b/modules/ims_icscf/cxdx_lir.c
index be18eb7..9e056f2 100644
--- a/modules/ims_icscf/cxdx_lir.c
+++ b/modules/ims_icscf/cxdx_lir.c
@@ -51,11 +51,6 @@
#include "mod.h"
#include "location.h"
-#if defined (__OS_freebsd)
-#include "sys/limits.h"
-#define MAXINT INT_MAX
-#endif
-
//we use pseudo variables to communicate back to config file this takes the result and
converys to a return code, publishes it a pseudo variable
int create_lia_return_code(int result) {
int rc;
@@ -183,7 +178,7 @@ void async_cdp_lir_callback(int is_timeout, void *param, AAAMessage
*lia, long e
success:
if (server_name.len) {
- list = new_scscf_entry(server_name, MAXINT, data->orig);
+ list = new_scscf_entry(server_name, INT_MAX, data->orig);
} else {
list = I_get_capab_ordered(server_name, m_capab, m_capab_cnt, o_capab,
o_capab_cnt, p_server_names, p_server_names_cnt, data->orig);
}
diff --git a/modules/ims_icscf/scscf_list.c b/modules/ims_icscf/scscf_list.c
index 1d21ba3..3634285 100644
--- a/modules/ims_icscf/scscf_list.c
+++ b/modules/ims_icscf/scscf_list.c
@@ -47,11 +47,6 @@
#include "db.h"
#include "../../lib/ims/useful_defs.h"
-#if defined (__OS_freebsd)
-#include "sys/limits.h"
-#define MAXINT INT_MAX
-#endif
-
extern int scscf_entry_expiry; //time for scscf entries to remain the scscf_list
extern struct tm_binds tmb; //Structure with pointers to tm funcs
@@ -188,10 +183,10 @@ scscf_entry* I_get_capab_ordered(str scscf_name, int *m, int mcnt,
int *o, int o
scscf_entry *list = 0;
int i, r;
- if (scscf_name.len) list = I_add_to_scscf_list(list, scscf_name, MAXINT, orig);
+ if (scscf_name.len) list = I_add_to_scscf_list(list, scscf_name, INT_MAX, orig);
for (i = 0; i < pcnt; i++)
- list = I_add_to_scscf_list(list, p[i], MAXINT - i, orig);
+ list = I_add_to_scscf_list(list, p[i], INT_MAX - i, orig);
for (i = 0; i < SCSCF_Capabilities_cnt; i++) {
r = I_get_capab_match(SCSCF_Capabilities + i, m, mcnt, o, ocnt);
diff --git a/modules/ims_icscf/scscf_list.h b/modules/ims_icscf/scscf_list.h
index b3d4cfd..3b72ba7 100644
--- a/modules/ims_icscf/scscf_list.h
+++ b/modules/ims_icscf/scscf_list.h
@@ -49,22 +49,13 @@
#include "../../sr_module.h"
#include "../../modules/tm/tm_load.h"
#include "mod.h"
-#ifndef __OS_darwin
-#include <values.h>
-#endif
+#include <limits.h>
#include "../../mem/shm_mem.h"
#include "../../dset.h"
#include "../../timer.h"
-#ifdef __OS_darwin
-#ifndef MAXINT
-#define MAXINT INT_MAX
-#endif
-#endif
-
-
/** S-CSCF list element */
typedef struct _scscf_entry {
str scscf_name; /**< SIP URI of the S-CSCF */