Kaydet (Commit) c8a5db5f authored tarafından Enrico Tröger's avatar Enrico Tröger

Update comment about using different configuration directories with multiple…

Update comment about using different configuration directories with multiple instance support on Windows.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3371 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 7aa181f2
......@@ -11,6 +11,9 @@
Rename symbol list label for embedded script functions from
'Javascript functions' to 'Functions' to avoid confusion when it
finds symbols from other embedded languages (part of #2317001).
* src/socket.c:
Update comment about using different configuration directories with
multiple instance support on Windows.
2008-12-11 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
......
......@@ -195,13 +195,8 @@ gint socket_init(gint argc, gchar **argv)
#ifdef G_OS_WIN32
HANDLE hmutex;
/* we need a mutex name which is unique for the used configuration dir,
* but we can't use the whole path, so build a hash on the configdir and use it */
gchar *mutex_name = g_strdup_printf("Geany%d", g_str_hash(app->configdir));
socket_init_win32();
hmutex = CreateMutexA(NULL, FALSE, mutex_name);
g_free(mutex_name);
hmutex = CreateMutexA(NULL, FALSE, "Geany");
if (! hmutex)
{
geany_debug("cannot create Mutex\n");
......@@ -209,6 +204,12 @@ gint socket_init(gint argc, gchar **argv)
}
if (GetLastError() != ERROR_ALREADY_EXISTS)
{
/* To support multiple instances with different configuration directories (as we do on
* non-Windows systems) we would need to use different port number s but it might be
* difficult to get a port number which is unique for a configuration directory (path)
* and which is unused. This port number has to be guessed by the first and new instance
* and the only data is the configuration directory path.
* For now we use one port number, that is we support only one instance at all. */
sock = socket_fd_open_inet(REMOTE_CMD_PORT);
if (sock < 0)
return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment