summaryrefslogtreecommitdiff
path: root/libvxi11client/libvxi11client.c
diff options
context:
space:
mode:
Diffstat (limited to 'libvxi11client/libvxi11client.c')
-rw-r--r--libvxi11client/libvxi11client.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libvxi11client/libvxi11client.c b/libvxi11client/libvxi11client.c
index 601e490..c44f086 100644
--- a/libvxi11client/libvxi11client.c
+++ b/libvxi11client/libvxi11client.c
@@ -39,7 +39,7 @@ device_intr_srq_1_svc(Device_SrqParms *argp, struct svc_req *rqstp) {
#endif
if (interruptcallback != NULL ) {
- interruptcallback(argp->handle.handle_val);
+ interruptcallback(g_strndup(argp->handle.handle_val, argp->handle.handle_len));
}
static char * result;
@@ -196,7 +196,7 @@ int vxi11_write(VXI11Context* context, char* data, int len, bool waitlock, bool
Device_WriteParms params = { .lid = context->devicelink, .io_timeout = VXI11_DEFAULT_TIMEOUT, .lock_timeout =
VXI11_DEFAULT_TIMEOUT, .flags = vxi11_generateflags(waitlock, end, false) };
- params.data.data_len = len < 0 ? (strlen(data) + 1) : len;
+ params.data.data_len = len < 0 ? strlen(data) : len;
params.data.data_val = data;
Device_WriteResp* resp = device_write_1(&params, context->clnt);
@@ -497,7 +497,7 @@ static gpointer interruptthreadfunc(gpointer data) {
return NULL ;
}
-int vxi11_start_interrupt_server(void (*callback)(char* handle)) {
+int vxi11_start_interrupt_server(void (*callback)(gchar* handle)) {
interruptcallback = callback;
interruptserverstarted = true;
g_thread_init(NULL );
@@ -617,7 +617,7 @@ int vxi11_enable_srq(VXI11Context* context, bool enable, char* handle) {
if (enable) {
if (handle != NULL ) {
params.handle.handle_val = handle;
- params.handle.handle_len = strlen(handle) + 1;
+ params.handle.handle_len = strlen(handle);
}
}
else {