streamline the rodata "" fixes

remotes/origin/3.3+ngcp2.7
Richard Fuchs 14 years ago
parent 2130027715
commit a22187af59

@ -59,7 +59,7 @@ static str pv_uri_scheme[] = {
{ "urn", 3 },
{ 0, 0 }
};
static char *empty_str = "";
static char _empty_str[] = "";
int _pv_pid = 0;

@ -49,6 +49,12 @@
#include "pv_trans.h"
static char _empty_str[] = "";
static str _tr_empty = { _empty_str, 0 };
static str _tr_uri = {0, 0};
static struct sip_uri _tr_parsed_uri;
static param_t* _tr_uri_params = NULL;
/*! transformation buffer size */
#define TR_BUFFER_SIZE 65536
#define TR_BUFFER_SLOTS 4
@ -384,8 +390,7 @@ int tr_eval_string(struct sip_msg *msg, tr_param_t *tp, int subtype,
val->rs.s = p+1;
val->rs.len = s-p;
} else {
val->rs.s = val->rs.s + val->rs.len; /* empty string */
val->rs.len = 0;
val->rs = _tr_empty;
}
} else {
s = val->rs.s;
@ -406,8 +411,7 @@ int tr_eval_string(struct sip_msg *msg, tr_param_t *tp, int subtype,
val->rs.s = s;
val->rs.len = p-s;
} else {
val->rs.s = val->rs.s + val->rs.len; /* empty string */
val->rs.len = 0;
val->rs = _tr_empty;
}
}
break;
@ -748,11 +752,6 @@ int tr_eval_string(struct sip_msg *msg, tr_param_t *tp, int subtype,
return 0;
}
static str _tr_empty = { "", 0 };
static str _tr_uri = {0, 0};
static struct sip_uri _tr_parsed_uri;
static param_t* _tr_uri_params = NULL;
/*!
* \brief Evaluate URI transformations

Loading…
Cancel
Save