diff options
author | daniel <danieruru@gmail.com> | 2013-01-29 01:04:04 +0900 |
---|---|---|
committer | daniel <danieruru@gmail.com> | 2013-01-29 01:04:04 +0900 |
commit | e15319368bf6d69fe84dc5afa63f740252c8dfcc (patch) | |
tree | e6d8291e5c9cbfc2c9c655f268486834670c1034 /libvxi11client/libvxi11client.c | |
parent | e183a9956be3c9ad3cb50c56a634041ece49e41a (diff) |
Endian fixes.
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; |