[BACK]Return to oxmisc.c CVS log [TXT][DIR] Up to [local] / OpenXM / src / kan96xx / plugin

Diff for /OpenXM/src/kan96xx/plugin/oxmisc.c between version 1.16 and 1.17

version 1.16, 2003/07/20 07:18:45 version 1.17, 2003/11/18 11:08:27
Line 1 
Line 1 
 /*  $OpenXM: OpenXM/src/kan96xx/plugin/oxmisc.c,v 1.15 2002/11/08 02:54:11 takayama Exp $ */  /*  $OpenXM: OpenXM/src/kan96xx/plugin/oxmisc.c,v 1.16 2003/07/20 07:18:45 takayama Exp $ */
 #include <stdio.h>  #include <stdio.h>
 #include <sys/types.h>  #include <sys/types.h>
 #include <sys/stat.h>  #include <sys/stat.h>
Line 1008  int oxSetByteOrder(int fd) {
Line 1008  int oxSetByteOrder(int fd) {
   return(OX_BYTE_NETWORK_BYTE_ORDER);    return(OX_BYTE_NETWORK_BYTE_ORDER);
 }  }
   
 int oxTellMyByteOrder(int fd) {  int oxTellMyByteOrder(int fdOut, int fdIn) {
   char data[1];    char data[1];
   int peertype;    int peertype;
   /* It is for server. read and next write. */    /* It is for server. read and next write. */
   
   /* We support only Network byte order */    /* We support only Network byte order */
   data[0] = OX_BYTE_NETWORK_BYTE_ORDER;    data[0] = OX_BYTE_NETWORK_BYTE_ORDER;
   write(fd,data,1);    write(fdOut,data,1);
   fsync(fd);  /* returns 0 if normal. Does it work for socket? */    fsync(fdOut);  /* returns 0 if normal. Does it work for socket? */
   
   read(fd,data,1);    read(fdIn,data,1); /* Read pear's byte order */
   
   return(OX_BYTE_NETWORK_BYTE_ORDER);    return(OX_BYTE_NETWORK_BYTE_ORDER);
 }  }

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>