From 414fcc72f138938c6cd9d03678327a9ec69b4095 Mon Sep 17 00:00:00 2001
From: Steffen Vogel <stvogel@eonerc.rwth-aachen.de>
Date: Mon, 24 Apr 2017 18:11:05 +0200
Subject: [PATCH] websocket: add destinations to websocket_print()

---
 lib/nodes/websocket.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/lib/nodes/websocket.c b/lib/nodes/websocket.c
index 8e84535db..da4f34bf8 100644
--- a/lib/nodes/websocket.c
+++ b/lib/nodes/websocket.c
@@ -409,19 +409,21 @@ char * websocket_print(struct node *n)
 
 	char *buf = NULL;
 	
-	buf = strcatf(&buf, "dests=");
+	buf = strcatf(&buf, "destinations=[ ");
 	
 	for (size_t i = 0; i < list_length(&w->destinations); i++) {
-		struct lws_client_connect_info *in = list_at(&w->destinations, i);
+		struct websocket_destination *d = list_at(&w->destinations, i);
 
-		buf = strcatf(&buf, "%s://%s:%d/%s",
-			in->ssl_connection ? "https" : "http",
-			in->address,
-			in->port,
-			in->path
+		buf = strcatf(&buf, "%s://%s:%d/%s ",
+			d->info.ssl_connection ? "wss" : "ws",
+			d->info.address,
+			d->info.port,
+			d->info.path
 		);
 	}
 	
+	buf = strcatf(&buf, "]");
+	
 	return buf;
 }