[Julius-cvs 792] CVS update: julius4/libsent/src/net

Back to archive index

sumom****@users***** sumom****@users*****
2012年 10月 10日 (水) 11:36:03 JST


Index: julius4/libsent/src/net/rdwt.c
diff -u julius4/libsent/src/net/rdwt.c:1.5 julius4/libsent/src/net/rdwt.c:1.6
--- julius4/libsent/src/net/rdwt.c:1.5	Fri Jul 27 17:44:56 2012
+++ julius4/libsent/src/net/rdwt.c	Wed Oct 10 11:36:03 2012
@@ -12,7 +12,7 @@
  * @author Akinobu LEE
  * @date   Wed Feb 16 07:09:25 2005
  *
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
  * 
  */
 /*
@@ -61,6 +61,9 @@
     toread -= ret;
     off += ret;
   }
+#ifdef WORDS_BIGENDIAN
+  swap_bytes((char *)len, sizeof(int), 1);
+#endif
   if (*len > maxlen) {
     jlog("Error: rdwt: transfer data length exceeded: %d (>%d)\n", len, maxlen);
     return(-1);
@@ -98,6 +101,9 @@
 {
   int tmpbytes;
 
+#ifdef WORDS_BIGENDIAN
+  swap_bytes((char *)&len, sizeof(int), 1);
+#endif
   /* len == 0 is used to tell end of segment ack */
   if ((tmpbytes=
 #ifdef WINSOCK
@@ -109,6 +115,9 @@
     /*jlog( "failed to write num\n");*/
     return(-1);
   }
+#ifdef WORDS_BIGENDIAN
+  swap_bytes((char *)&len, sizeof(int), 1);
+#endif
   if (len > 0) {
     if ((tmpbytes=
 #ifdef WINSOCK



Julius-cvs メーリングリストの案内
Back to archive index