diff options
Diffstat (limited to 'libvxi11client/libvxi11client.c')
-rw-r--r-- | libvxi11client/libvxi11client.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libvxi11client/libvxi11client.c b/libvxi11client/libvxi11client.c index cf57f17..2f36147 100644 --- a/libvxi11client/libvxi11client.c +++ b/libvxi11client/libvxi11client.c @@ -117,7 +117,7 @@ int vxi11_open(char* address, char* device) { link = linkresp->lid; #ifdef DEBUG - printf("Link created, abort channel port %d\n", ntohs(linkresp->abortPort)); + printf("Link created, lid is %d, abort channel port %d\n", linkresp->lid, linkresp->abortPort); #endif struct sockaddr_in serveraddr; @@ -127,7 +127,7 @@ int vxi11_open(char* address, char* device) { inet_ntop(AF_INET, &serveraddr.sin_addr, addressstring, sizeof(addressstring)); printf("Remote is %s\n", addressstring); #endif - serveraddr.sin_port = linkresp->abortPort; + serveraddr.sin_port = htons(linkresp->abortPort); int sock = RPC_ANYSOCK; abortclnt = clnttcp_create(&serveraddr, DEVICE_ASYNC, DEVICE_ASYNC_VERSION, &sock, 0, 0); if (abortclnt == NULL) @@ -359,7 +359,7 @@ static gpointer interruptthreadfunc(gpointer data) { fprintf(stderr, "%s", "unable to register (DEVICE_INTR, DEVICE_INTR_VERSION, tcp).\n"); return 0; } - *((u_short*) data) = transp->xp_port; + *((unsigned int*) data) = transp->xp_port; int no_of_fds; int i; @@ -400,7 +400,7 @@ int vxi11_create_intr_chan() { return 0; interruptchannelopen = true; - u_short port = -1; + unsigned int port = -1; g_thread_init(NULL); interruptthread = g_thread_create(interruptthreadfunc, &port, true, NULL); |