Constify the value argument to mod_set_param
This commit is contained in:
parent
a959a9f851
commit
b8ed23daab
2
mc/mc.c
2
mc/mc.c
@ -75,7 +75,7 @@ lib_mod_end(struct mod *mod)
|
||||
/******************************************************************************/
|
||||
/* return error */
|
||||
int DEFAULT_CC
|
||||
lib_mod_set_param(struct mod *mod, const char *name, char *value)
|
||||
lib_mod_set_param(struct mod *mod, const char *name, const char *value)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
2
mc/mc.h
2
mc/mc.h
@ -37,7 +37,7 @@ struct mod
|
||||
long param3, long param4);
|
||||
int (*mod_signal)(struct mod* v);
|
||||
int (*mod_end)(struct mod* v);
|
||||
int (*mod_set_param)(struct mod* v, const char *name, char* value);
|
||||
int (*mod_set_param)(struct mod *v, const char *name, const char *value);
|
||||
int (*mod_session_change)(struct mod* v, int, int);
|
||||
int (*mod_get_wait_objs)(struct mod* v, tbus* read_objs, int* rcount,
|
||||
tbus* write_objs, int* wcount, int* timeout);
|
||||
|
@ -427,7 +427,7 @@ lxrdp_end(struct mod *mod)
|
||||
/******************************************************************************/
|
||||
/* return error */
|
||||
static int DEFAULT_CC
|
||||
lxrdp_set_param(struct mod *mod, const char *name, char *value)
|
||||
lxrdp_set_param(struct mod *mod, const char *name, const char *value)
|
||||
{
|
||||
rdpSettings *settings;
|
||||
|
||||
|
@ -71,7 +71,7 @@ struct mod
|
||||
long param3, long param4);
|
||||
int (*mod_signal)(struct mod *v);
|
||||
int (*mod_end)(struct mod *v);
|
||||
int (*mod_set_param)(struct mod *v, const char *name, char *value);
|
||||
int (*mod_set_param)(struct mod *v, const char *name, const char *value);
|
||||
int (*mod_session_change)(struct mod *v, int, int);
|
||||
int (*mod_get_wait_objs)(struct mod *v, tbus *read_objs, int *rcount,
|
||||
tbus *write_objs, int *wcount, int *timeout);
|
||||
|
@ -242,7 +242,7 @@ lib_mod_end(struct mod *mod)
|
||||
/******************************************************************************/
|
||||
/* return error */
|
||||
int DEFAULT_CC
|
||||
lib_mod_set_param(struct mod *mod, const char *name, char *value)
|
||||
lib_mod_set_param(struct mod *mod, const char *name, const char *value)
|
||||
{
|
||||
if (g_strncasecmp(name, "ip", 255) == 0)
|
||||
{
|
||||
|
@ -262,7 +262,7 @@ struct mod
|
||||
long param3, long param4);
|
||||
int (*mod_signal)(struct mod* v);
|
||||
int (*mod_end)(struct mod* v);
|
||||
int (*mod_set_param)(struct mod* v, const char *name, char* value);
|
||||
int (*mod_set_param)(struct mod *v, const char *name, const char *value);
|
||||
int (*mod_session_change)(struct mod* v, int, int);
|
||||
int (*mod_get_wait_objs)(struct mod* v, tbus* read_objs, int* rcount,
|
||||
tbus* write_objs, int* wcount, int* timeout);
|
||||
|
@ -1415,7 +1415,7 @@ lib_mod_end(struct vnc *v)
|
||||
|
||||
/******************************************************************************/
|
||||
int DEFAULT_CC
|
||||
lib_mod_set_param(struct vnc *v, const char *name, char *value)
|
||||
lib_mod_set_param(struct vnc *v, const char *name, const char *value)
|
||||
{
|
||||
if (g_strcasecmp(name, "username") == 0)
|
||||
{
|
||||
|
@ -37,7 +37,7 @@ struct vnc
|
||||
long param3, long param4);
|
||||
int (*mod_signal)(struct vnc* v);
|
||||
int (*mod_end)(struct vnc* v);
|
||||
int (*mod_set_param)(struct vnc* v, const char *name, char* value);
|
||||
int (*mod_set_param)(struct vnc *v, const char *name, const char *value);
|
||||
int (*mod_session_change)(struct vnc* v, int, int);
|
||||
int (*mod_get_wait_objs)(struct vnc* v, tbus* read_objs, int* rcount,
|
||||
tbus* write_objs, int* wcount, int* timeout);
|
||||
|
@ -491,8 +491,8 @@ static int APP_CC
|
||||
xrdp_mm_setup_mod2(struct xrdp_mm *self, tui8 *guid)
|
||||
{
|
||||
char text[256];
|
||||
char *name;
|
||||
char *value;
|
||||
const char *name;
|
||||
const char *value;
|
||||
int i;
|
||||
int rv;
|
||||
int key_flags;
|
||||
@ -562,7 +562,7 @@ xrdp_mm_setup_mod2(struct xrdp_mm *self, tui8 *guid)
|
||||
/* always set these */
|
||||
|
||||
self->mod->mod_set_param(self->mod, "client_info",
|
||||
(char *)(self->wm->session->client_info));
|
||||
(const char *) (self->wm->session->client_info));
|
||||
|
||||
name = self->wm->session->client_info->hostname;
|
||||
self->mod->mod_set_param(self->mod, "hostname", name);
|
||||
@ -575,8 +575,8 @@ xrdp_mm_setup_mod2(struct xrdp_mm *self, tui8 *guid)
|
||||
|
||||
for (i = 0; i < self->login_names->count; i++)
|
||||
{
|
||||
name = (char *)list_get_item(self->login_names, i);
|
||||
value = (char *)list_get_item(self->login_values, i);
|
||||
name = (const char *) list_get_item(self->login_names, i);
|
||||
value = (const char *) list_get_item(self->login_values, i);
|
||||
self->mod->mod_set_param(self->mod, name, value);
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ struct xrdp_mod
|
||||
long param3, long param4);
|
||||
int (*mod_signal)(struct xrdp_mod* v);
|
||||
int (*mod_end)(struct xrdp_mod* v);
|
||||
int (*mod_set_param)(struct xrdp_mod* v, const char *name, char* value);
|
||||
int (*mod_set_param)(struct xrdp_mod *v, const char *name, const char *value);
|
||||
int (*mod_session_change)(struct xrdp_mod* v, int, int);
|
||||
int (*mod_get_wait_objs)(struct xrdp_mod* v, tbus* read_objs, int* rcount,
|
||||
tbus* write_objs, int* wcount, int* timeout);
|
||||
|
@ -1479,7 +1479,7 @@ lib_mod_end(struct mod *mod)
|
||||
/******************************************************************************/
|
||||
/* return error */
|
||||
int DEFAULT_CC
|
||||
lib_mod_set_param(struct mod *mod, const char *name, char *value)
|
||||
lib_mod_set_param(struct mod *mod, const char *name, const char *value)
|
||||
{
|
||||
if (g_strcasecmp(name, "username") == 0)
|
||||
{
|
||||
|
@ -39,7 +39,7 @@ struct mod
|
||||
tbus param3, tbus param4);
|
||||
int (*mod_signal)(struct mod* v);
|
||||
int (*mod_end)(struct mod* v);
|
||||
int (*mod_set_param)(struct mod* v, const char *name, char* value);
|
||||
int (*mod_set_param)(struct mod *v, const char *name, const char *value);
|
||||
int (*mod_session_change)(struct mod* v, int, int);
|
||||
int (*mod_get_wait_objs)(struct mod* v, tbus* read_objs, int* rcount,
|
||||
tbus* write_objs, int* wcount, int* timeout);
|
||||
|
Loading…
Reference in New Issue
Block a user