[Github-comments] [geany/geany] Windows: Make TCP socket port number configurable (#2585)

Enrico Tröger notifications at xxxxx
Mon Sep 14 21:29:59 UTC 2020


@eht16 commented on this pull request.



> +	gint port_number;
+
+	if (! g_file_test(configfile, G_FILE_TEST_IS_REGULAR))
+	{
+		geany_debug(
+			"No user config file found, use default TCP port (%s).",
+			SOCKET_WINDOWS_REMOTE_CMD_PORT);
+		g_free(configfile);
+		return SOCKET_WINDOWS_REMOTE_CMD_PORT;
+	}
+	g_key_file_load_from_file(config, configfile, G_KEY_FILE_NONE, NULL);
+	port_number = utils_get_setting_integer(config, PACKAGE, "socket_remote_cmd_port",
+		SOCKET_WINDOWS_REMOTE_CMD_PORT);
+	geany_debug("Using TCP port number %d for IPC", port_number);
+	g_free(configfile);
+	g_key_file_free(config);

Ok, we now accept port numbers from 1024 to 65535. I agree it doesn't make much sense to allow well known ports which could just cause new problems.
I added the port range also to the docs (in case anyone might read it by accident :D).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/2585#discussion_r488231058
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20200914/d8c91e15/attachment.htm>


More information about the Github-comments mailing list