From e273fa4ab8dde522c5bb29e3674e7c2c4a0a2330 Mon Sep 17 00:00:00 2001
From: Yann Leboulanger <asterix@lagaule.org>
Date: Wed, 29 Jul 2009 12:09:02 +0200
Subject: [PATCH] remove old FIXME, don't crash when we receive badly encoded
 char via zeroconf. Fixes #5178

---
 src/common/zeroconf/zeroconf_avahi.py | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/common/zeroconf/zeroconf_avahi.py b/src/common/zeroconf/zeroconf_avahi.py
index 145e674f1c..baa3738806 100644
--- a/src/common/zeroconf/zeroconf_avahi.py
+++ b/src/common/zeroconf/zeroconf_avahi.py
@@ -124,11 +124,7 @@ class Zeroconf:
 		for els in txt_array:
 			key, val = '', None
 			for c in els:
-					#FIXME: remove when outdated, this is for avahi < 0.6.14
-					if c < 0 or c > 255:
-						c = '.'
-					else:
-						c = chr(c)
+					c = chr(c)
 					if val is None:
 						if c == '=':
 							val = ''
@@ -138,7 +134,7 @@ class Zeroconf:
 						val += c
 			if val is None: # missing '='
 				val = ''
-			txt_dict[key] = val.decode('utf-8')
+			txt_dict[key] = val.decode('utf-8', 'ignore')
 		return txt_dict
 
 	def service_resolved_callback(self, interface, protocol, name, stype, domain,
-- 
GitLab