summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xrdpapi/xrdpapi.c1
-rw-r--r--xrdpapi/xrdpapi.h8
2 files changed, 9 insertions, 0 deletions
diff --git a/xrdpapi/xrdpapi.c b/xrdpapi/xrdpapi.c
index 3190cd39..8223c3b2 100644
--- a/xrdpapi/xrdpapi.c
+++ b/xrdpapi/xrdpapi.c
@@ -151,6 +151,7 @@ send_init(struct wts_obj* wts)
char initmsg[64];
memset(initmsg, 0, 64);
+ strncpy(initmsg, wts->name, 8);
if (!can_send(wts->fd, 500))
{
return 1;
diff --git a/xrdpapi/xrdpapi.h b/xrdpapi/xrdpapi.h
index cb451559..c39c4f1b 100644
--- a/xrdpapi/xrdpapi.h
+++ b/xrdpapi/xrdpapi.h
@@ -24,6 +24,10 @@
#if !defined(XRDPAPI_H_)
#define XRDPAPI_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define WTS_CURRENT_SERVER_HANDLE 0
#define WTS_CURRENT_SESSION 0xffffffff
@@ -59,4 +63,8 @@ WTSVirtualChannelQuery(void* hChannelHandle, WTS_VIRTUAL_CLASS WtsVirtualClass,
void
WTSFreeMemory(void* pMemory);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* XRDPAPI_H_ */