diff options
Diffstat (limited to 'libvxi11client/libvxi11client.c')
-rw-r--r-- | libvxi11client/libvxi11client.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libvxi11client/libvxi11client.c b/libvxi11client/libvxi11client.c index 0e01809..219a17f 100644 --- a/libvxi11client/libvxi11client.c +++ b/libvxi11client/libvxi11client.c @@ -384,8 +384,10 @@ static gpointer interruptthreadfunc(gpointer data) { return 0; } + interruptserverport = transp->xp_port; + #ifdef DEBUG - printf("Interrupt channel on port %d tcp\n", transp->xp_port); + printf("Interrupt channel on port %d tcp\n", interruptserverport); #endif if (!svc_register(transp, DEVICE_INTR, DEVICE_INTR_VERSION, device_intr_1, 0)) { @@ -393,7 +395,6 @@ static gpointer interruptthreadfunc(gpointer data) { return 0; } - interruptserverport = transp->xp_port; g_mutex_lock(mutex); g_cond_signal(cond); g_mutex_unlock(mutex); @@ -501,8 +502,8 @@ int vxi11_create_intr_chan(VXI11Context* context) { struct sockaddr_in myaddress; get_myaddress(&myaddress); - Device_RemoteFunc remotefunc = { .hostAddr = myaddress.sin_addr.s_addr, .hostPort = interruptserverport, .progNum = - DEVICE_INTR, .progVers = DEVICE_INTR_VERSION, .progFamily = DEVICE_TCP }; + Device_RemoteFunc remotefunc = { .hostAddr = ntohl(myaddress.sin_addr.s_addr), .hostPort = interruptserverport, + .progNum = DEVICE_INTR, .progVers = DEVICE_INTR_VERSION, .progFamily = DEVICE_TCP }; Device_Error* error = create_intr_chan_1(&remotefunc, context->clnt); if (error != NULL && error->error == 0) { context->interruptchannelopen = true; |