changeset 10616:e874feeb91e3

[gaim-migrate @ 12080] Patch #949998: Remove stale gaim-remote sockets. committer: Tailor Script <tailor@pidgin.im>
author Ethan Blanton <elb@pidgin.im>
date Mon, 21 Feb 2005 14:48:52 +0000
parents 2e720df50861
children 927de469483e
files plugins/gaim-remote/remote.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/gaim-remote/remote.c	Sun Feb 20 22:40:11 2005 +0000
+++ b/plugins/gaim-remote/remote.c	Mon Feb 21 14:48:52 2005 +0000
@@ -742,6 +742,8 @@
 
 		g_snprintf(saddr.sun_path, sizeof(saddr.sun_path), "%s" G_DIR_SEPARATOR_S "gaim_%s.%d",
 				g_get_tmp_dir(), g_get_user_name(), gaim_session);
+		/* Remove any stale socket on this session */
+		unlink(saddr.sun_path);
 		if (bind(fd, (struct sockaddr *)&saddr, sizeof(saddr)) != -1)
 			listen(fd, 100);
 		else {