Module: kamailio
Branch: master
Commit: 1d401e0a9b4c3010c32b0084ec6a218fc46e4f78
URL:
https://github.com/kamailio/kamailio/commit/1d401e0a9b4c3010c32b0084ec6a218…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-03-24T09:21:00+01:00
dispatcher: coherent indentation and whitespacing
---
Modified: modules/dispatcher/dispatch.c
Modified: modules/dispatcher/dispatcher.c
---
Diff:
https://github.com/kamailio/kamailio/commit/1d401e0a9b4c3010c32b0084ec6a218…
Patch:
https://github.com/kamailio/kamailio/commit/1d401e0a9b4c3010c32b0084ec6a218…
---
diff --git a/modules/dispatcher/dispatch.c b/modules/dispatcher/dispatch.c
index 6921aae..60c9121 100644
--- a/modules/dispatcher/dispatch.c
+++ b/modules/dispatcher/dispatch.c
@@ -305,7 +305,7 @@ int add_dest2list(int id, str uri, int flags, int priority, str
*attrs,
/* skip IPv6 references if IPv6 lookups are disabled */
if (default_core_cfg.dns_try_ipv6 == 0 &&
- puri.host.s[0] == '[' && puri.host.s[puri.host.len-1] ==
']') {
+ puri.host.s[0] == '[' && puri.host.s[puri.host.len-1] == ']')
{
LM_DBG("skipping IPv6 record %.*s\n", puri.host.len, puri.host.s);
return 0;
}
@@ -496,7 +496,7 @@ int dp_init_relative_weights(ds_set_t *dset)
if(dset==NULL || dset->dlist==NULL)
return -1;
-
+
int rw_sum = 0;
/* find the sum of relative weights*/
for(j=0; j<dset->nr; j++){
@@ -514,9 +514,9 @@ int dp_init_relative_weights(ds_set_t *dset)
for(j=0; j<dset->nr; j++)
{
if( ds_skip_dst(dset->dlist[j].flags ) )
- continue;
+ continue;
- int current_slice = dset->dlist[j].attrs.rweight*100/rw_sum; //truncate here;
+ int current_slice = dset->dlist[j].attrs.rweight*100/rw_sum; //truncate here;
for(k=0; k<current_slice; k++)
{
dset->rwlist[t] = (unsigned int)j;
@@ -525,7 +525,7 @@ int dp_init_relative_weights(ds_set_t *dset)
}
/* if the array was not completely filled (i.e., the sum of rweights is
* less than 100 due to truncated), then use last address to fill the rest */
- unsigned int last_insert = t>0? dset->rwlist[t-1] : (unsigned int)(dset->nr-1);
+ unsigned int last_insert = t>0? dset->rwlist[t-1] : (unsigned
int)(dset->nr-1);
for(j=t; j<100; j++)
dset->rwlist[j] = last_insert;
@@ -1765,7 +1765,7 @@ static inline int ds_update_dst(struct sip_msg *msg, str *uri,
return -1;
}
/* dst_uri changes, so it makes sense to re-use the current uri for
- forking */
+ * forking */
ruri_mark_new(); /* re-use uri for serial forking */
break;
}
@@ -2487,7 +2487,7 @@ static void ds_run_route(sip_msg_t *msg, str *uri, char *route)
/**
- recalculate relative states if some destination state was changed
+ * recalculate relative states if some destination state was changed
*/
int ds_reinit_rweight_on_state_change(int old_state, int new_state, ds_set_t *dset)
{
@@ -2495,7 +2495,7 @@ int ds_reinit_rweight_on_state_change(int old_state, int new_state,
ds_set_t *ds
LM_ERR("destination set is null\n");
return -1;
}
- if ( (!ds_skip_dst(old_state) && ds_skip_dst(new_state)) ||
+ if ( (!ds_skip_dst(old_state) && ds_skip_dst(new_state)) ||
(ds_skip_dst(old_state) && !ds_skip_dst(new_state)) )
{
dp_init_relative_weights(dset);
@@ -2804,8 +2804,8 @@ static void ds_options_callback( struct cell *t, int type,
{
/* Set the according entry back to "Active" */
state = 0;
- if (ds_probing_mode==DS_PROBE_ALL ||
- ((ds_probing_mode==DS_PROBE_ONLYFLAGGED)
+ if (ds_probing_mode==DS_PROBE_ALL ||
+ ((ds_probing_mode==DS_PROBE_ONLYFLAGGED)
&& (ds_get_state(group, &uri) & DS_PROBING_DST)))
state |= DS_PROBING_DST;
diff --git a/modules/dispatcher/dispatcher.c b/modules/dispatcher/dispatcher.c
index 51d1955..2a0ddbc 100644
--- a/modules/dispatcher/dispatcher.c
+++ b/modules/dispatcher/dispatcher.c
@@ -96,9 +96,9 @@ unsigned short sock_avp_type;
pv_elem_t * hash_param_model = NULL;
int probing_threshold = 1; /* number of failed requests, before a destination
- is taken into probing */
+ * is taken into probing */
int inactive_threshold = 1; /* number of replied requests, before a destination
- is taken into back in active state */
+ * is taken into back in active state */
str ds_ping_method = str_init("OPTIONS");
str ds_ping_from = str_init("sip:dispatcher@localhost");
static int ds_ping_interval = 0;