Quellcode durchsuchen

core: udp server - remove deactivated functionality from 2008, not valid anymore

Remove decaticated functionality related zero terminated SIP messages in UPD server.
15 years ago this was a bug, but now with binary payloads its not valid anymore.
No change in functionality.
Henning Westerholt vor 7 Jahren
Ursprung
Commit
dd4dc5361a
1 geänderte Dateien mit 0 neuen und 13 gelöschten Zeilen
  1. 0 13
      src/core/udp_server.c

+ 0 - 13
src/core/udp_server.c

@@ -515,19 +515,6 @@ int udp_rcv_loop()
 				continue;
 			}
 		}
-/* historically, zero-terminated packets indicated a bug in clients
- * that calculated wrongly packet length and included string-terminating
- * zero; today clients exist with legitimate binary payloads and we
- * shall not check for zero-terminated payloads
- */
-#ifdef TRASH_ZEROTERMINATED_PACKETS
-		if (buf[len-1]==0) {
-			tmp=ip_addr2a(&ri.src_ip);
-			LM_WARN("upstream bug - 0-terminated packet from %s %d\n",
-					tmp, htons(ri.src_port));
-			len--;
-		}
-#endif
 #endif
 #ifdef DBG_MSG_QA
 		if (!dbg_msg_qa(buf, len)) {