summaryrefslogtreecommitdiffstats
path: root/sesman/libscp
diff options
context:
space:
mode:
authorPavel Roskin <plroskin@gmail.com>2016-06-21 16:30:17 -0700
committerPavel Roskin <plroskin@gmail.com>2016-07-08 04:29:42 +0000
commitaeeb3d2c2e26677758a64db496c86020f99d2f1a (patch)
tree3337017e28744427743d447d4735c00537783321 /sesman/libscp
parenta680d46edf747ec17456b6b8e69c95bc4e4407cb (diff)
downloadxrdp-proprietary-aeeb3d2c2e26677758a64db496c86020f99d2f1a.tar.gz
xrdp-proprietary-aeeb3d2c2e26677758a64db496c86020f99d2f1a.zip
Fix warnings detected by -Wwrite-strings
Diffstat (limited to 'sesman/libscp')
-rw-r--r--sesman/libscp/libscp_session.c18
-rw-r--r--sesman/libscp/libscp_session.h18
-rw-r--r--sesman/libscp/libscp_v1s.c7
-rw-r--r--sesman/libscp/libscp_v1s.h7
-rw-r--r--sesman/libscp/libscp_v1s_mng.c2
-rw-r--r--sesman/libscp/libscp_v1s_mng.h2
6 files changed, 28 insertions, 26 deletions
diff --git a/sesman/libscp/libscp_session.c b/sesman/libscp/libscp_session.c
index 91f93b54..e6c77058 100644
--- a/sesman/libscp/libscp_session.c
+++ b/sesman/libscp/libscp_session.c
@@ -164,7 +164,7 @@ scp_session_set_rsr(struct SCP_SESSION *s, tui8 rsr)
/*******************************************************************/
int
-scp_session_set_locale(struct SCP_SESSION *s, char *str)
+scp_session_set_locale(struct SCP_SESSION *s, const char *str)
{
if (0 == str)
{
@@ -180,7 +180,7 @@ scp_session_set_locale(struct SCP_SESSION *s, char *str)
/*******************************************************************/
int
-scp_session_set_username(struct SCP_SESSION *s, char *str)
+scp_session_set_username(struct SCP_SESSION *s, const char *str)
{
if (0 == str)
{
@@ -206,7 +206,7 @@ scp_session_set_username(struct SCP_SESSION *s, char *str)
/*******************************************************************/
int
-scp_session_set_password(struct SCP_SESSION *s, char *str)
+scp_session_set_password(struct SCP_SESSION *s, const char *str)
{
if (0 == str)
{
@@ -232,7 +232,7 @@ scp_session_set_password(struct SCP_SESSION *s, char *str)
/*******************************************************************/
int
-scp_session_set_domain(struct SCP_SESSION *s, char *str)
+scp_session_set_domain(struct SCP_SESSION *s, const char *str)
{
if (0 == str)
{
@@ -258,7 +258,7 @@ scp_session_set_domain(struct SCP_SESSION *s, char *str)
/*******************************************************************/
int
-scp_session_set_program(struct SCP_SESSION *s, char *str)
+scp_session_set_program(struct SCP_SESSION *s, const char *str)
{
if (0 == str)
{
@@ -284,7 +284,7 @@ scp_session_set_program(struct SCP_SESSION *s, char *str)
/*******************************************************************/
int
-scp_session_set_directory(struct SCP_SESSION *s, char *str)
+scp_session_set_directory(struct SCP_SESSION *s, const char *str)
{
if (0 == str)
{
@@ -310,7 +310,7 @@ scp_session_set_directory(struct SCP_SESSION *s, char *str)
/*******************************************************************/
int
-scp_session_set_client_ip(struct SCP_SESSION *s, char *str)
+scp_session_set_client_ip(struct SCP_SESSION *s, const char *str)
{
if (0 == str)
{
@@ -336,7 +336,7 @@ scp_session_set_client_ip(struct SCP_SESSION *s, char *str)
/*******************************************************************/
int
-scp_session_set_hostname(struct SCP_SESSION *s, char *str)
+scp_session_set_hostname(struct SCP_SESSION *s, const char *str)
{
if (0 == str)
{
@@ -362,7 +362,7 @@ scp_session_set_hostname(struct SCP_SESSION *s, char *str)
/*******************************************************************/
int
-scp_session_set_errstr(struct SCP_SESSION *s, char *str)
+scp_session_set_errstr(struct SCP_SESSION *s, const char *str)
{
if (0 == str)
{
diff --git a/sesman/libscp/libscp_session.h b/sesman/libscp/libscp_session.h
index 4a9e9d70..51b6d03e 100644
--- a/sesman/libscp/libscp_session.h
+++ b/sesman/libscp/libscp_session.h
@@ -59,28 +59,28 @@ int
scp_session_set_rsr(struct SCP_SESSION* s, tui8 rsr);
int
-scp_session_set_locale(struct SCP_SESSION* s, char* str);
+scp_session_set_locale(struct SCP_SESSION* s, const char *str);
int
-scp_session_set_username(struct SCP_SESSION* s, char* str);
+scp_session_set_username(struct SCP_SESSION* s, const char *str);
int
-scp_session_set_password(struct SCP_SESSION* s, char* str);
+scp_session_set_password(struct SCP_SESSION* s, const char *str);
int
-scp_session_set_domain(struct SCP_SESSION* s, char* str);
+scp_session_set_domain(struct SCP_SESSION* s, const char *str);
int
-scp_session_set_program(struct SCP_SESSION* s, char* str);
+scp_session_set_program(struct SCP_SESSION* s, const char *str);
int
-scp_session_set_directory(struct SCP_SESSION* s, char* str);
+scp_session_set_directory(struct SCP_SESSION* s, const char *str);
int
-scp_session_set_client_ip(struct SCP_SESSION* s, char* str);
+scp_session_set_client_ip(struct SCP_SESSION* s, const char *str);
int
-scp_session_set_hostname(struct SCP_SESSION* s, char* str);
+scp_session_set_hostname(struct SCP_SESSION* s, const char *str);
int
scp_session_set_addr(struct SCP_SESSION* s, int type, const void* addr);
@@ -89,7 +89,7 @@ int
scp_session_set_display(struct SCP_SESSION* s, SCP_DISPLAY display);
int
-scp_session_set_errstr(struct SCP_SESSION* s, char* str);
+scp_session_set_errstr(struct SCP_SESSION* s, const char *str);
/**
*
diff --git a/sesman/libscp/libscp_v1s.c b/sesman/libscp/libscp_v1s.c
index 6cdf0b00..284c9b52 100644
--- a/sesman/libscp/libscp_v1s.c
+++ b/sesman/libscp/libscp_v1s.c
@@ -202,7 +202,7 @@ enum SCP_SERVER_STATES_E scp_v1s_accept(struct SCP_CONNECTION *c, struct SCP_SES
}
enum SCP_SERVER_STATES_E
-scp_v1s_deny_connection(struct SCP_CONNECTION *c, char *reason)
+scp_v1s_deny_connection(struct SCP_CONNECTION *c, const char *reason)
{
int rlen;
@@ -235,7 +235,8 @@ scp_v1s_deny_connection(struct SCP_CONNECTION *c, char *reason)
}
enum SCP_SERVER_STATES_E
-scp_v1s_request_password(struct SCP_CONNECTION *c, struct SCP_SESSION *s, char *reason)
+scp_v1s_request_password(struct SCP_CONNECTION *c, struct SCP_SESSION *s,
+ const char *reason)
{
tui8 sz;
tui32 version;
@@ -392,7 +393,7 @@ scp_v1s_connect_new_session(struct SCP_CONNECTION *c, SCP_DISPLAY d)
/* 032 */
enum SCP_SERVER_STATES_E
-scp_v1s_connection_error(struct SCP_CONNECTION *c, char *error)
+scp_v1s_connection_error(struct SCP_CONNECTION *c, const char *error)
{
tui16 len;
diff --git a/sesman/libscp/libscp_v1s.h b/sesman/libscp/libscp_v1s.h
index cc29d70d..69e64038 100644
--- a/sesman/libscp/libscp_v1s.h
+++ b/sesman/libscp/libscp_v1s.h
@@ -53,10 +53,11 @@ scp_v1s_accept(struct SCP_CONNECTION* c, struct SCP_SESSION** s, int skipVchk);
*/
/* 002 */
enum SCP_SERVER_STATES_E
-scp_v1s_deny_connection(struct SCP_CONNECTION* c, char* reason);
+scp_v1s_deny_connection(struct SCP_CONNECTION* c, const char *reason);
enum SCP_SERVER_STATES_E
-scp_v1s_request_password(struct SCP_CONNECTION* c, struct SCP_SESSION* s, char* reason);
+scp_v1s_request_password(struct SCP_CONNECTION* c, struct SCP_SESSION* s,
+ const char *reason);
/* 020 */
enum SCP_SERVER_STATES_E
@@ -72,7 +73,7 @@ scp_v1s_connect_new_session(struct SCP_CONNECTION* c, SCP_DISPLAY d);
/* 032 */
enum SCP_SERVER_STATES_E
-scp_v1s_connection_error(struct SCP_CONNECTION* c, char* error);
+scp_v1s_connection_error(struct SCP_CONNECTION* c, const char *error);
/* 040 */
enum SCP_SERVER_STATES_E
diff --git a/sesman/libscp/libscp_v1s_mng.c b/sesman/libscp/libscp_v1s_mng.c
index e48fc86b..d8c5290d 100644
--- a/sesman/libscp/libscp_v1s_mng.c
+++ b/sesman/libscp/libscp_v1s_mng.c
@@ -138,7 +138,7 @@ scp_v1s_mng_allow_connection(struct SCP_CONNECTION *c, struct SCP_SESSION *s)
/* 003 */
enum SCP_SERVER_STATES_E
-scp_v1s_mng_deny_connection(struct SCP_CONNECTION *c, char *reason)
+scp_v1s_mng_deny_connection(struct SCP_CONNECTION *c, const char *reason)
{
int rlen;
diff --git a/sesman/libscp/libscp_v1s_mng.h b/sesman/libscp/libscp_v1s_mng.h
index 867931a5..437a06d2 100644
--- a/sesman/libscp/libscp_v1s_mng.h
+++ b/sesman/libscp/libscp_v1s_mng.h
@@ -61,7 +61,7 @@ scp_v1s_mng_allow_connection(struct SCP_CONNECTION* c, struct SCP_SESSION* s);
*/
/* 003 */
enum SCP_SERVER_STATES_E
-scp_v1s_mng_deny_connection(struct SCP_CONNECTION* c, char* reason);
+scp_v1s_mng_deny_connection(struct SCP_CONNECTION* c, const char *reason);
/**
*