Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/neutrinolabs/xrdp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatt335672 <30179339+matt335672@users.noreply.github.com>2022-05-19 15:19:25 +0300
committerKoichiro IWAO <meta@vmeta.jp>2022-09-11 04:45:00 +0300
commit676c3ed00e44c4b58a8286cd348fedf2ed1f83bd (patch)
treedd97526f95e54fe38182abc49e0ca231ce761e60
parent8dfc28409db12ed1d03388ccac3a43995ff4591c (diff)
Add xrdpapi/simple.c to the CI
(cherry picked from commit dabd049ad2f4c5a688a0a522014c2055e8ddff34)
-rw-r--r--xrdpapi/Makefile.am14
-rw-r--r--xrdpapi/simple.c12
2 files changed, 20 insertions, 6 deletions
diff --git a/xrdpapi/Makefile.am b/xrdpapi/Makefile.am
index d40109a9..55014bc5 100644
--- a/xrdpapi/Makefile.am
+++ b/xrdpapi/Makefile.am
@@ -13,3 +13,17 @@ module_LTLIBRARIES = \
libxrdpapi_la_SOURCES = \
xrdpapi.c \
xrdpapi.h
+
+libxrdpapi_la_LIBADD = \
+ $(top_builddir)/common/libcommon.la
+
+# Build the 'simple' example program, so it's added to the CI
+noinst_PROGRAMS = xrdp-xrdpapi-simple
+
+xrdp_xrdpapi_simple_SOURCES = \
+ simple.c
+
+# If you change this, update the standalone build instructions in simple.c
+xrdp_xrdpapi_simple_LDADD = \
+ libxrdpapi.la \
+ $(top_builddir)/common/libcommon.la
diff --git a/xrdpapi/simple.c b/xrdpapi/simple.c
index 0599b350..6b5cee2b 100644
--- a/xrdpapi/simple.c
+++ b/xrdpapi/simple.c
@@ -102,18 +102,18 @@ run_echo_test(void)
int rv;
int count;
int pkt_count;
- int i;
- int bytes_written;
- int bytes_read;
+ unsigned int i;
+ unsigned int bytes_written;
+ unsigned int bytes_read;
unsigned char c;
- unsigned char *rd_ptr;
- unsigned char *wr_ptr;
+ char *rd_ptr;
+ char *wr_ptr;
/* fill out_buf[] with incremental values */
for (i = 0, c = 0; i < 8192; i++, c++)
{
- out_buf[i] = c;
+ out_buf[i] = (char)c;
}
/* open a virtual channel named ECHO */