Browse code

introduced -D_DBG_WS_LEN

Jiri Kuthan authored on 26/08/2002 19:49:55
Showing 1 changed files
... ...
@@ -236,6 +236,9 @@ int udp_send(struct socket_info *source, char *buf, unsigned len,
236 236
 	int n;
237 237
 
238 238
 #ifdef DBG_MSG_QA
239
+#define _DBG_WS_LEN 3
240
+#define _DBG_WS "   "
241
+
239 242
 	char *space;
240 243
 	int my_len;
241 244
 
... ...
@@ -249,13 +252,13 @@ int udp_send(struct socket_info *source, char *buf, unsigned len,
249 252
 		/* how much we have after the space */
250 253
 		my_len=len-(space-buf)+1;
251 254
 		/* EoM -- stop checks */
252
-		if (my_len<3) break;
253
-		if (memcmp(space+1, "   ", 3)==0) {
255
+		if (my_len<_DBG_WS_LEN) break;
256
+		if (memcmp(space+1, _DBG_WS, _DBG_WS_LEN)==0) {
254 257
 			LOG(L_CRIT, "BUG(probably): "
255 258
 				"message with four spaces in it\n");
256 259
 			abort();
257 260
 		}
258
-		space+=3;my_len-=3;
261
+		space+=_DBG_WS_LEN;my_len-=_DBG_WS_LEN;
259 262
 	}
260 263
 #endif
261 264