And file said... let trunk build again! Accomplished by some more constification, and marking a function in chan_sip as purposely unused until it is fixed up.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89290 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.6.0
Joshua Colp 18 years ago
parent 6260590ec2
commit e7e208009f

@ -1362,7 +1362,7 @@ static int update_common_options(struct ast_variable *v, struct call_options *op
return 0; return 0;
} }
static struct oh323_user *build_user(char *name, struct ast_variable *v, struct ast_variable *alt, int realtime) static struct oh323_user *build_user(const char *name, struct ast_variable *v, struct ast_variable *alt, int realtime)
{ {
struct oh323_user *user; struct oh323_user *user;
struct ast_ha *oldha; struct ast_ha *oldha;
@ -1446,7 +1446,7 @@ static struct oh323_user *realtime_user(const call_details_t *cd)
{ {
struct ast_variable *var, *tmp; struct ast_variable *var, *tmp;
struct oh323_user *user; struct oh323_user *user;
char *username; const char *username;
if (userbyalias) if (userbyalias)
var = ast_load_realtime("h323", "name", username = cd->call_source_aliases, NULL); var = ast_load_realtime("h323", "name", username = cd->call_source_aliases, NULL);

@ -9951,7 +9951,7 @@ static int get_also_info(struct sip_pvt *p, struct sip_request *oreq)
* Note that ast_sip_ouraddrfor() still rewrites p->ourip * Note that ast_sip_ouraddrfor() still rewrites p->ourip
* if you specify externip/seternaddr/stunaddr. * if you specify externip/seternaddr/stunaddr.
*/ */
static void check_via_response(struct sip_pvt *p, struct sip_request *req) static attribute_unused void check_via_response(struct sip_pvt *p, struct sip_request *req)
{ {
char via[256]; char via[256];
char *cur, *opts; char *cur, *opts;

@ -435,7 +435,7 @@ static int _enum_array_map (void)
return 0; return 0;
} }
static int get_cfg_position (char *name, int type) static int get_cfg_position (const char *name, int type)
{ {
int i; int i;
@ -861,11 +861,12 @@ int misdn_cfg_get_next_port_spin (int port)
return (p > 0) ? p : misdn_cfg_get_next_port(0); return (p > 0) ? p : misdn_cfg_get_next_port(0);
} }
static int _parse (union misdn_cfg_pt *dest, char *value, enum misdn_cfg_type type, int boolint_def) static int _parse (union misdn_cfg_pt *dest, const char *value, enum misdn_cfg_type type, int boolint_def)
{ {
int re = 0; int re = 0;
int len, tmp; int len, tmp;
char *valtmp; char *valtmp;
char *tmp2 = ast_strdupa(value);
switch (type) { switch (type) {
case MISDN_CTYPE_STR: case MISDN_CTYPE_STR:
@ -905,7 +906,7 @@ static int _parse (union misdn_cfg_pt *dest, char *value, enum misdn_cfg_type ty
} }
break; break;
case MISDN_CTYPE_MSNLIST: case MISDN_CTYPE_MSNLIST:
for (valtmp = strsep(&value, ","); valtmp; valtmp = strsep(&value, ",")) { for (valtmp = strsep(&tmp2, ","); valtmp; valtmp = strsep(&tmp2, ",")) {
if ((len = strlen(valtmp))) { if ((len = strlen(valtmp))) {
struct msn_list *ml = ast_malloc(sizeof(*ml)); struct msn_list *ml = ast_malloc(sizeof(*ml));
ml->msn = ast_calloc(len+1, sizeof(char)); ml->msn = ast_calloc(len+1, sizeof(char));
@ -961,10 +962,10 @@ static void _build_port_config (struct ast_variable *v, char *cat)
for (; v; v = v->next) { for (; v; v = v->next) {
if (!strcasecmp(v->name, "ports")) { if (!strcasecmp(v->name, "ports")) {
char *token; char *token, *tmp = ast_strdupa(v->value);
char ptpbuf[BUFFERSIZE] = ""; char ptpbuf[BUFFERSIZE] = "";
int start, end; int start, end;
for (token = strsep(&v->value, ","); token; token = strsep(&v->value, ","), *ptpbuf = 0) { for (token = strsep(&tmp, ","); token; token = strsep(&tmp, ","), *ptpbuf = 0) {
if (!*token) if (!*token)
continue; continue;
if (sscanf(token, "%d-%d%s", &start, &end, ptpbuf) >= 2) { if (sscanf(token, "%d-%d%s", &start, &end, ptpbuf) >= 2) {

Loading…
Cancel
Save