Browse Source

Make xmpp server testing much more permissive

Yann Weber 1 month ago
parent
commit
3367475bed
1 changed files with 2 additions and 7 deletions
  1. 2
    7
      check.sh

+ 2
- 7
check.sh View File

@@ -524,14 +524,9 @@ _check_xmpp_server() {
524 524
 		infos="$(echo $stream | sed -E 's/^<([^ ]+).* xmlns="([^"]+)" .*$/\1 \2/') $serv"
525 525
 	fi
526 526
 
527
-	if [ "$(echo $infos | cut -d ' ' -f1,2)" = "stream:stream jabber:$type" ]
527
+	if echo "$infos" | grep "jabber:$type" >/dev/null
528 528
 	then
529
-		if [ "$(echo $infos | cut -d ' ' -f3)" = "$serv" ]
530
-		then
531
-			success "Successfully connected to XMPP $type $serv:$port"
532
-		else
533
-			fail "Server $serv:$port announce itself as $(echo $infos | cut -f3)"
534
-		fi
529
+		success "Successfully connected to XMPP $type $serv:$port"
535 530
 	else
536 531
 		fail "Unexpected reply from $serv:$port : $infos"
537 532
 	fi

Loading…
Cancel
Save