diff --git a/libpri.h b/libpri.h index fa891d3..74ffe81 100644 --- a/libpri.h +++ b/libpri.h @@ -528,9 +528,9 @@ extern int pri_sr_set_caller(struct pri_sr *sr, char *caller, char *callername, extern int pri_sr_set_redirecting(struct pri_sr *sr, char *num, int plan, int pres, int reason); #define PRI_USER_USER_TX /* Set the user user field. Warning! don't send binary data accross this field */ -extern void pri_sr_set_useruser(struct pri_sr *sr, char *userchars); +extern void pri_sr_set_useruser(struct pri_sr *sr, const char *userchars); -extern void pri_call_set_useruser(q931_call *sr, char *userchars); +extern void pri_call_set_useruser(q931_call *sr, const char *userchars); extern int pri_setup(struct pri *pri, q931_call *call, struct pri_sr *req); diff --git a/pri.c b/pri.c index 1cb8069..b56b140 100644 --- a/pri.c +++ b/pri.c @@ -247,13 +247,13 @@ static struct pri *__pri_new(int fd, int node, int switchtype, struct pri *maste return p; } -void pri_call_set_useruser(q931_call *c, char *userchars) +void pri_call_set_useruser(q931_call *c, const char *userchars) { if (userchars) libpri_copy_string(c->useruserinfo, userchars, sizeof(c->useruserinfo)); } -void pri_sr_set_useruser(struct pri_sr *sr, char *userchars) +void pri_sr_set_useruser(struct pri_sr *sr, const char *userchars) { sr->useruserinfo = userchars; } diff --git a/pri_internal.h b/pri_internal.h index a057d92..8912a30 100644 --- a/pri_internal.h +++ b/pri_internal.h @@ -129,7 +129,7 @@ struct pri_sr { int redirectingpres; int redirectingreason; int justsignalling; - char *useruserinfo; + const char *useruserinfo; }; /* Internal switch types */