Constify the value argument to mod_set_param

master
Pavel Roskin 8 years ago committed by Jay Sorg
parent a959a9f851
commit b8ed23daab

@ -75,7 +75,7 @@ lib_mod_end(struct mod *mod)
/******************************************************************************/ /******************************************************************************/
/* return error */ /* return error */
int DEFAULT_CC 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; return 0;
} }

@ -37,7 +37,7 @@ struct mod
long param3, long param4); long param3, long param4);
int (*mod_signal)(struct mod* v); int (*mod_signal)(struct mod* v);
int (*mod_end)(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_session_change)(struct mod* v, int, int);
int (*mod_get_wait_objs)(struct mod* v, tbus* read_objs, int* rcount, int (*mod_get_wait_objs)(struct mod* v, tbus* read_objs, int* rcount,
tbus* write_objs, int* wcount, int* timeout); tbus* write_objs, int* wcount, int* timeout);

@ -427,7 +427,7 @@ lxrdp_end(struct mod *mod)
/******************************************************************************/ /******************************************************************************/
/* return error */ /* return error */
static int DEFAULT_CC 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; rdpSettings *settings;

@ -71,7 +71,7 @@ struct mod
long param3, long param4); long param3, long param4);
int (*mod_signal)(struct mod *v); int (*mod_signal)(struct mod *v);
int (*mod_end)(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_session_change)(struct mod *v, int, int);
int (*mod_get_wait_objs)(struct mod *v, tbus *read_objs, int *rcount, int (*mod_get_wait_objs)(struct mod *v, tbus *read_objs, int *rcount,
tbus *write_objs, int *wcount, int *timeout); tbus *write_objs, int *wcount, int *timeout);

@ -242,7 +242,7 @@ lib_mod_end(struct mod *mod)
/******************************************************************************/ /******************************************************************************/
/* return error */ /* return error */
int DEFAULT_CC 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) if (g_strncasecmp(name, "ip", 255) == 0)
{ {

@ -262,7 +262,7 @@ struct mod
long param3, long param4); long param3, long param4);
int (*mod_signal)(struct mod* v); int (*mod_signal)(struct mod* v);
int (*mod_end)(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_session_change)(struct mod* v, int, int);
int (*mod_get_wait_objs)(struct mod* v, tbus* read_objs, int* rcount, int (*mod_get_wait_objs)(struct mod* v, tbus* read_objs, int* rcount,
tbus* write_objs, int* wcount, int* timeout); tbus* write_objs, int* wcount, int* timeout);

@ -1415,7 +1415,7 @@ lib_mod_end(struct vnc *v)
/******************************************************************************/ /******************************************************************************/
int DEFAULT_CC 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) if (g_strcasecmp(name, "username") == 0)
{ {

@ -37,7 +37,7 @@ struct vnc
long param3, long param4); long param3, long param4);
int (*mod_signal)(struct vnc* v); int (*mod_signal)(struct vnc* v);
int (*mod_end)(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_session_change)(struct vnc* v, int, int);
int (*mod_get_wait_objs)(struct vnc* v, tbus* read_objs, int* rcount, int (*mod_get_wait_objs)(struct vnc* v, tbus* read_objs, int* rcount,
tbus* write_objs, int* wcount, int* timeout); 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) xrdp_mm_setup_mod2(struct xrdp_mm *self, tui8 *guid)
{ {
char text[256]; char text[256];
char *name; const char *name;
char *value; const char *value;
int i; int i;
int rv; int rv;
int key_flags; int key_flags;
@ -562,7 +562,7 @@ xrdp_mm_setup_mod2(struct xrdp_mm *self, tui8 *guid)
/* always set these */ /* always set these */
self->mod->mod_set_param(self->mod, "client_info", 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; name = self->wm->session->client_info->hostname;
self->mod->mod_set_param(self->mod, "hostname", name); 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++) for (i = 0; i < self->login_names->count; i++)
{ {
name = (char *)list_get_item(self->login_names, i); name = (const char *) list_get_item(self->login_names, i);
value = (char *)list_get_item(self->login_values, i); value = (const char *) list_get_item(self->login_values, i);
self->mod->mod_set_param(self->mod, name, value); self->mod->mod_set_param(self->mod, name, value);
} }

@ -42,7 +42,7 @@ struct xrdp_mod
long param3, long param4); long param3, long param4);
int (*mod_signal)(struct xrdp_mod* v); int (*mod_signal)(struct xrdp_mod* v);
int (*mod_end)(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_session_change)(struct xrdp_mod* v, int, int);
int (*mod_get_wait_objs)(struct xrdp_mod* v, tbus* read_objs, int* rcount, int (*mod_get_wait_objs)(struct xrdp_mod* v, tbus* read_objs, int* rcount,
tbus* write_objs, int* wcount, int* timeout); tbus* write_objs, int* wcount, int* timeout);

@ -1479,7 +1479,7 @@ lib_mod_end(struct mod *mod)
/******************************************************************************/ /******************************************************************************/
/* return error */ /* return error */
int DEFAULT_CC 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) if (g_strcasecmp(name, "username") == 0)
{ {

@ -39,7 +39,7 @@ struct mod
tbus param3, tbus param4); tbus param3, tbus param4);
int (*mod_signal)(struct mod* v); int (*mod_signal)(struct mod* v);
int (*mod_end)(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_session_change)(struct mod* v, int, int);
int (*mod_get_wait_objs)(struct mod* v, tbus* read_objs, int* rcount, int (*mod_get_wait_objs)(struct mod* v, tbus* read_objs, int* rcount,
tbus* write_objs, int* wcount, int* timeout); tbus* write_objs, int* wcount, int* timeout);

Loading…
Cancel
Save