[enet-cvs] CVS: enet Makefile, 1.4, 1.5 host.c, 1.11, 1.12 list.c, 1.4, 1.5 memory.c, 1.4, 1.5 packet.c, 1.5, 1.6 peer.c, 1.11, 1.12 protocol.c, 1.19, 1.20 unix.c, 1.10, 1.11 win32.c, 1.9, 1.10

Lee Salzman enet at sferik.cubik.org
Thu Oct 30 07:55:34 PST 2003


Update of /home/enet/cvsroot/enet
In directory sferik:/tmp/cvs-serv5344

Modified Files:
	Makefile host.c list.c memory.c packet.c peer.c protocol.c 
	unix.c win32.c 
Log Message:
fragment fixes, and include dir fixes


Index: Makefile
===================================================================
RCS file: /home/enet/cvsroot/enet/Makefile,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Makefile	2003/07/24 03:08:36	1.4
+++ Makefile	2003/10/30 15:55:31	1.5
@@ -2,11 +2,11 @@
 COPTFLAGS=-Wall -pedantic -O3 -fomit-frame-pointer
 
 # Linux
-CFLAGS=$(COPTFLAGS) -Iinclude/enet -DHAS_GETHOSTBYNAME_R -DHAS_GETHOSTBYADDR_R -DHAS_POLL -DHAS_FCNTL -DHAS_MSGHDR_FLAGS
+CFLAGS=$(COPTFLAGS) -Iinclude -DHAS_GETHOSTBYNAME_R -DHAS_GETHOSTBYADDR_R -DHAS_POLL -DHAS_FCNTL -DHAS_MSGHDR_FLAGS
 # FreeBSD, etc.
-# CFLAGS=$(COPTFLAGS) -Iinclude/enet -DHAS_POLL -DHAS_FCNTL -DHAS_MSGHDR_FLAGS
+# CFLAGS=$(COPTFLAGS) -Iinclude -DHAS_POLL -DHAS_FCNTL -DHAS_MSGHDR_FLAGS
 # Solaris
-# CFLAGS=$(COPTFLAGS) -Iinclude/enet -DHAS_GETHOSTBYNAME_R -DHAS_GETHOSTBYADDR_R -DHAS_FCNTL
+# CFLAGS=$(COPTFLAGS) -Iinclude -DHAS_GETHOSTBYNAME_R -DHAS_GETHOSTBYADDR_R -DHAS_FCNTL
 
 OBJS= \
 	host.o \

Index: host.c
===================================================================
RCS file: /home/enet/cvsroot/enet/host.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- host.c	2003/10/29 17:53:38	1.11
+++ host.c	2003/10/30 15:55:31	1.12
@@ -3,8 +3,8 @@
  @brief ENet host management functions
 */
 #define ENET_BUILDING_LIB 1
-#include "memory.h"
-#include "enet.h"
+#include "enet/memory.h"
+#include "enet/enet.h"
 
 /** @defgroup host ENet host functions
     @{

Index: list.c
===================================================================
RCS file: /home/enet/cvsroot/enet/list.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- list.c	2003/03/09 02:17:05	1.4
+++ list.c	2003/10/30 15:55:31	1.5
@@ -3,7 +3,7 @@
  @brief ENet linked list functions
 */
 #define ENET_BUILDING_LIB 1
-#include "list.h"
+#include "enet/list.h"
 
 /** 
     @defgroup list ENet linked list utility functions

Index: memory.c
===================================================================
RCS file: /home/enet/cvsroot/enet/memory.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- memory.c	2003/03/09 02:17:05	1.4
+++ memory.c	2003/10/30 15:55:31	1.5
@@ -3,8 +3,8 @@
  @brief ENet memory management functions
 */
 #define ENET_BUILDING_LIB 1
-#include "types.h"
-#include "memory.h"
+#include "enet/types.h"
+#include "enet/memory.h"
 
 void *
 enet_malloc (size_t size)

Index: packet.c
===================================================================
RCS file: /home/enet/cvsroot/enet/packet.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- packet.c	2003/03/09 02:17:05	1.5
+++ packet.c	2003/10/30 15:55:31	1.6
@@ -2,10 +2,10 @@
  @file  packet.c
  @brief ENet packet management functions
 */
-#define ENET_BUILDING_LIB 1
 #include <string.h>
-#include "memory.h"
-#include "enet.h"
+#define ENET_BUILDING_LIB 1
+#include "enet/memory.h"
+#include "enet/enet.h"
 
 /** @defgroup Packet ENet packet functions 
     @{ 

Index: peer.c
===================================================================
RCS file: /home/enet/cvsroot/enet/peer.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- peer.c	2003/03/12 00:50:59	1.11
+++ peer.c	2003/10/30 15:55:31	1.12
@@ -3,8 +3,8 @@
  @brief ENet peer management functions
 */
 #define ENET_BUILDING_LIB 1
-#include "memory.h"
-#include "enet.h"
+#include "enet/memory.h"
+#include "enet/enet.h"
 
 /** @defgroup peer ENet peer functions 
     @{

Index: protocol.c
===================================================================
RCS file: /home/enet/cvsroot/enet/protocol.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- protocol.c	2003/10/30 02:59:05	1.19
+++ protocol.c	2003/10/30 15:55:31	1.20
@@ -3,10 +3,11 @@
  @brief ENet protocol functions
 */
 #include <stdio.h>
+#include <string.h>
 #define ENET_BUILDING_LIB 1
-#include "memory.h"
-#include "time.h"
-#include "enet.h"
+#include "enet/memory.h"
+#include "enet/time.h"
+#include "enet/enet.h"
 
 static enet_uint32 timeCurrent;
 
@@ -287,9 +288,9 @@
     fragmentNumber = ENET_NET_TO_HOST_32 (command -> sendFragment.fragmentNumber);
     fragmentCount = ENET_NET_TO_HOST_32 (command -> sendFragment.fragmentCount);
     fragmentOffset = ENET_NET_TO_HOST_32 (command -> sendFragment.fragmentOffset);
-    fragmentLength = command -> header.commandLength - sizeof (ENetProtocolSendFragment);
     totalLength = ENET_NET_TO_HOST_32 (command -> sendFragment.totalLength);
-
+    fragmentLength = command -> header.commandLength - sizeof (ENetProtocolSendFragment);
+    
     if (fragmentOffset >= totalLength ||
         fragmentOffset + fragmentLength > totalLength ||
         fragmentNumber >= fragmentCount)
@@ -310,8 +311,16 @@
  
     if (currentCommand == enet_list_end (& channel -> incomingReliableCommands))
     {
+       ENetProtocol hostCommand = * command;
+       
+       hostCommand.sendFragment.startSequenceNumber = startSequenceNumber;
+       hostCommand.sendFragment.fragmentNumber = fragmentNumber;
+       hostCommand.sendFragment.fragmentCount = fragmentCount;
+       hostCommand.sendFragment.fragmentOffset = fragmentOffset;
+       hostCommand.sendFragment.totalLength = totalLength;
+
        startCommand = enet_peer_queue_incoming_command (peer, 
-                                                        command, 
+                                                        & hostCommand, 
                                                         enet_packet_create (NULL, totalLength, ENET_PACKET_FLAG_RELIABLE),
                                                         fragmentCount);
     }

Index: unix.c
===================================================================
RCS file: /home/enet/cvsroot/enet/unix.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- unix.c	2003/03/20 18:06:30	1.10
+++ unix.c	2003/10/30 15:55:31	1.11
@@ -15,7 +15,7 @@
 #include <time.h>
 
 #define ENET_BUILDING_LIB 1
-#include "enet.h"
+#include "enet/enet.h"
 
 #ifdef HAS_FCNTL
 #include <fcntl.h>

Index: win32.c
===================================================================
RCS file: /home/enet/cvsroot/enet/win32.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- win32.c	2003/03/20 18:06:30	1.9
+++ win32.c	2003/10/30 15:55:31	1.10
@@ -6,7 +6,7 @@
 
 #include <time.h>
 #define ENET_BUILDING_LIB 1
-#include "enet.h"
+#include "enet/enet.h"
 
 static enet_uint32 timeBase = 0;
 



More information about the enet-cvs mailing list