diff options
author | daniel <danieruru@gmail.com> | 2013-01-10 21:47:42 +0900 |
---|---|---|
committer | daniel <danieruru@gmail.com> | 2013-01-10 21:47:42 +0900 |
commit | 48577c89c567a0d9f6efc88dc03fb94258b17fd5 (patch) | |
tree | 5c2cb34e07cfc8621910d464438945851fc393f0 /libvxi11client/libvxi11client.c | |
parent | 0e75195fd93cb3e4eb0c1e29eca11894edf5c076 (diff) |
more filling out on the server side
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); |