Mercurial > pidgin.yaz
comparison plugins/gaim-remote/remote.c @ 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 | 0f7452b1f777 |
children | 55af3fa46329 |
comparison
equal
deleted
inserted
replaced
10615:2e720df50861 | 10616:e874feeb91e3 |
---|---|
740 mode_t m = umask(0177); | 740 mode_t m = umask(0177); |
741 saddr.sun_family = AF_UNIX; | 741 saddr.sun_family = AF_UNIX; |
742 | 742 |
743 g_snprintf(saddr.sun_path, sizeof(saddr.sun_path), "%s" G_DIR_SEPARATOR_S "gaim_%s.%d", | 743 g_snprintf(saddr.sun_path, sizeof(saddr.sun_path), "%s" G_DIR_SEPARATOR_S "gaim_%s.%d", |
744 g_get_tmp_dir(), g_get_user_name(), gaim_session); | 744 g_get_tmp_dir(), g_get_user_name(), gaim_session); |
745 /* Remove any stale socket on this session */ | |
746 unlink(saddr.sun_path); | |
745 if (bind(fd, (struct sockaddr *)&saddr, sizeof(saddr)) != -1) | 747 if (bind(fd, (struct sockaddr *)&saddr, sizeof(saddr)) != -1) |
746 listen(fd, 100); | 748 listen(fd, 100); |
747 else { | 749 else { |
748 char *tmp = g_locale_to_utf8(strerror(errno), -1, NULL, NULL, NULL); | 750 char *tmp = g_locale_to_utf8(strerror(errno), -1, NULL, NULL, NULL); |
749 *error = g_strdup_printf(_("Failed to assign %s to a socket:\n%s"), | 751 *error = g_strdup_printf(_("Failed to assign %s to a socket:\n%s"), |