summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libvxi11client/README2
-rw-r--r--vxi11_server.c9
2 files changed, 7 insertions, 4 deletions
diff --git a/libvxi11client/README b/libvxi11client/README
index 71d5153..b09e63f 100644
--- a/libvxi11client/README
+++ b/libvxi11client/README
@@ -31,7 +31,7 @@ perl's XS functionality (http://perldoc.perl.org/perlxs.html).
The guts of this are are perlbits/Client.xs.
There are then some perl wrapper functions to help with
pulling arguments out of a hash and passing it to the XS code.
-This are in perlbits/Client.pm.
+These are in perlbits/Client.pm.
The perl module has one more requirement; ExtUtils::PkgConfig.
This is only used at build time and is used to find where
diff --git a/vxi11_server.c b/vxi11_server.c
index 1faa821..741b3fb 100644
--- a/vxi11_server.c
+++ b/vxi11_server.c
@@ -184,10 +184,13 @@ device_read_1_svc(Device_ReadParms *argp, struct svc_req *rqstp) {
}
else {
if (globals.Registers.pending_output_message != NULL) {
- result.data.data_val = globals.Registers.pending_output_message;
- result.data.data_len = strlen(result.data.data_val) + 1;
+ result.data.data_len = strlen(globals.Registers.pending_output_message) + 1;
+ result.data.data_val = calloc(result.data.data_len, 1);
+ strncpy(result.data.data_val, globals.Registers.pending_output_message, result.data.data_len);
+ g_free(globals.Registers.pending_output_message);
+ globals.Registers.pending_output_message = NULL;
#ifdef DEBUG
- printf("sending ---%s---\n", globals.Registers.pending_output_message);
+ printf("sending ---%s---\n", result.data.data_val);
#endif
}
else {