summaryrefslogtreecommitdiff
path: root/net/zephyr/patches/patch-aa
blob: 744b29069a6034495148e9a7a9f74df1f4168eff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
*** h/zephyr/zephyr.h.in.orig	1996/06/12 04:42:56
--- h/zephyr/zephyr.h.in	1996/11/22 22:04:51
***************
*** 73,78 ****
  /* Unique ID format */
  typedef struct _ZUnique_Id_t {
!     struct	in_addr zuid_addr;
!     struct	timeval	tv;
  } ZUnique_Id_t;
  
--- 73,78 ----
  /* Unique ID format */
  typedef struct _ZUnique_Id_t {
!     struct		in_addr zuid_addr;
!     ZEPHYR_INT32	zuid_sec, zuid_usec;
  } ZUnique_Id_t;
  
*** lib/zephyr/ZParseNot.c.orig	1995/07/18 20:28:07
--- lib/zephyr/ZParseNot.c	1996/11/22 22:04:52
***************
*** 154,161 ****
      if (numfields) {
  	if (ZReadAscii(ptr, end-ptr, (unsigned char *)&notice->z_uid,
! 		       sizeof(ZUnique_Id_t)) == ZERR_BADFIELD)
  	    BAD_PACKET;
! 	notice->z_time.tv_sec = ntohl((u_long) notice->z_uid.tv.tv_sec);
! 	notice->z_time.tv_usec = ntohl((u_long) notice->z_uid.tv.tv_usec);
  	numfields--;
  	next_field (ptr);
--- 154,161 ----
      if (numfields) {
  	if (ZReadAscii(ptr, end-ptr, (unsigned char *)&notice->z_uid,
! 		       sizeof(notice->z_uid)) == ZERR_BADFIELD)
  	    BAD_PACKET;
! 	notice->z_time.tv_sec = ntohl((u_long) notice->z_uid.zuid_sec);
! 	notice->z_time.tv_usec = ntohl((u_long) notice->z_uid.zuid_usec);
  	numfields--;
  	next_field (ptr);
***************
*** 268,275 ****
      if (numfields) {
  	if (ZReadAscii(ptr, end-ptr, (unsigned char *)&notice->z_multiuid,
! 		       sizeof(ZUnique_Id_t)) == ZERR_BADFIELD)
  	    BAD_PACKET;
! 	notice->z_time.tv_sec = ntohl((u_long) notice->z_multiuid.tv.tv_sec);
! 	notice->z_time.tv_usec = ntohl((u_long) notice->z_multiuid.tv.tv_usec);
  	numfields--;
  	next_field (ptr);
--- 268,275 ----
      if (numfields) {
  	if (ZReadAscii(ptr, end-ptr, (unsigned char *)&notice->z_multiuid,
! 		       sizeof(notice->z_multiuid)) == ZERR_BADFIELD)
  	    BAD_PACKET;
! 	notice->z_time.tv_sec = ntohl((u_long) notice->z_multiuid.zuid_sec);
! 	notice->z_time.tv_usec = ntohl((u_long) notice->z_multiuid.zuid_usec);
  	numfields--;
  	next_field (ptr);
*** lib/zephyr/Zinternal.c.orig	1995/07/18 20:28:17
--- lib/zephyr/Zinternal.c	1996/11/22 22:04:52
***************
*** 609,612 ****
--- 609,613 ----
      static char version[BUFSIZ]; /* default init should be all \0 */
      struct sockaddr_in name;
+     struct timeval tv;
      int namelen = sizeof(name);
  
***************
*** 628,634 ****
      notice->z_multinotice = "";
      
!     (void) gettimeofday(&notice->z_uid.tv, (struct timezone *)0);
!     notice->z_uid.tv.tv_sec = htonl((u_long) notice->z_uid.tv.tv_sec);
!     notice->z_uid.tv.tv_usec = htonl((u_long) notice->z_uid.tv.tv_usec);
      
      if ((retval = Z_GetMyAddr()) != ZERR_NONE)
--- 629,635 ----
      notice->z_multinotice = "";
      
!     (void) gettimeofday(&tv, (struct timezone *)0);
!     notice->z_uid.zuid_sec = htonl((u_long) tv.tv_sec);
!     notice->z_uid.zuid_usec = htonl((u_long) tv.tv_usec);
      
      if ((retval = Z_GetMyAddr()) != ZERR_NONE)
***************
*** 710,715 ****
      ptr += strlen(ptr)+1;
  
!     if (ZMakeAscii(ptr, end-ptr, (unsigned char *)&notice->z_uid, 
! 		   sizeof(ZUnique_Id_t)) == ZERR_FIELDLEN)
  	return (ZERR_HEADERLEN);
      ptr += strlen(ptr)+1;
--- 711,716 ----
      ptr += strlen(ptr)+1;
  
!     if (ZMakeAscii(ptr, end-ptr, (unsigned char *)&notice->z_uid,
! 		   sizeof(notice->z_uid)) == ZERR_FIELDLEN)
  	return (ZERR_HEADERLEN);
      ptr += strlen(ptr)+1;
***************
*** 761,766 ****
  	return (ZERR_HEADERLEN);
  
!     if (ZMakeAscii(ptr, end-ptr, (unsigned char *)&notice->z_multiuid, 
! 		   sizeof(ZUnique_Id_t)) == ZERR_FIELDLEN)
  	return (ZERR_HEADERLEN);
      ptr += strlen(ptr)+1;
--- 762,767 ----
  	return (ZERR_HEADERLEN);
  
!     if (ZMakeAscii(ptr, end-ptr, (unsigned char *)&notice->z_multiuid,
! 		   sizeof(notice->z_multiuid)) == ZERR_FIELDLEN)
  	return (ZERR_HEADERLEN);
      ptr += strlen(ptr)+1;
***************
*** 882,885 ****
--- 883,887 ----
      int offset, hdrsize, fragsize, ret_len, message_len, waitforack;
      Code_t retval;
+     struct timeval tv;
      
      hdrsize = len-notice->z_message_len;
***************
*** 897,906 ****
  	partnotice.z_multinotice = multi;
  	if (offset > 0) {
! 	    (void) gettimeofday(&partnotice.z_uid.tv,
! 				(struct timezone *)0);
! 	    partnotice.z_uid.tv.tv_sec =
! 		htonl((u_long) partnotice.z_uid.tv.tv_sec);
! 	    partnotice.z_uid.tv.tv_usec =
! 		htonl((u_long) partnotice.z_uid.tv.tv_usec);
  	    if ((retval = Z_GetMyAddr()) != ZERR_NONE)
  		return (retval);
--- 899,905 ----
  	partnotice.z_multinotice = multi;
  	if (offset > 0) {
! 	    (void) gettimeofday(&tv, (struct timezone *)0);
! 	    partnotice.z_uid.zuid_sec = htonl((u_long) tv.tv_sec);
! 	    partnotice.z_uid.zuid_usec = htonl((u_long) tv.tv_usec);
  	    if ((retval = Z_GetMyAddr()) != ZERR_NONE)
  		return (retval);
*** server/dispatch.c.orig	1996/06/06 05:56:58
--- server/dispatch.c	1996/11/22 22:04:52
***************
*** 828,834 ****
      /* search the not-yet-acked table for this packet, and flush it. */
  #if 0
!     zdbug((LOG_DEBUG, "nack_cancel: %s:%08X,%08X",
  	   inet_ntoa(notice->z_uid.zuid_addr),
! 	   notice->z_uid.tv.tv_sec, notice->z_uid.tv.tv_usec));
  #endif
      hashval = NACKTAB_HASHVAL(*who, notice->z_uid);
--- 828,835 ----
      /* search the not-yet-acked table for this packet, and flush it. */
  #if 0
!     zdbug((LOG_DEBUG, "nack_cancel: %s:%08lX,%08lX",
  	   inet_ntoa(notice->z_uid.zuid_addr),
! 	   (u_long) notice->z_uid.zuid_sec,
! 	   (u_long) notice->z_uid.zuid_usec));
  #endif
      hashval = NACKTAB_HASHVAL(*who, notice->z_uid);
***************
*** 846,852 ****
  
  #if 1
!     zdbug((LOG_DEBUG,"nack_cancel: nack not found %s:%08X,%08X",
  	   inet_ntoa (notice->z_uid.zuid_addr),
! 	   notice->z_uid.tv.tv_sec, notice->z_uid.tv.tv_usec));
  #endif
  }
--- 847,854 ----
  
  #if 1
!     zdbug((LOG_DEBUG,"nack_cancel: nack not found %s:%08lX,%08lX",
  	   inet_ntoa (notice->z_uid.zuid_addr),
! 	   (u_long) notice->z_uid.zuid_sec,
! 	   (u_long) notice->z_uid.zuid_usec));
  #endif
  }