Mercurial > pidgin
diff src/aim.c @ 3533:6c32036050cf
[gaim-migrate @ 3607]
An automake fix, and a fix for an incredibly blatant Linuxism.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Wed, 18 Sep 2002 00:11:45 +0000 |
parents | 84d2cd1d0ec9 |
children | cd938f18f3f8 |
line wrap: on
line diff
--- a/src/aim.c Tue Sep 17 16:44:00 2002 +0000 +++ b/src/aim.c Wed Sep 18 00:11:45 2002 +0000 @@ -481,25 +481,6 @@ return TRUE; } -static int open_socket(char *name) -{ - struct sockaddr_un saddr; - gint fd; - - if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) != -1) { - saddr.sun_family = AF_UNIX; - g_snprintf(saddr.sun_path, 108, "%s", name); - if (connect(fd, (struct sockaddr *)&saddr, sizeof(saddr)) != -1) - return fd; - else - debug_printf("Failed to assign %s to a socket (Error: %s)\n", - saddr.sun_path, strerror(errno)); - } else - debug_printf("Unable to open socket: %s\n", strerror(errno)); - close(fd); - return -1; -} - static int ui_main() { GIOChannel *channel; @@ -520,7 +501,7 @@ g_snprintf(name, sizeof(name), "%s/gaim_%s.%d", g_get_tmp_dir(), g_get_user_name(), gaim_session); - UI_fd = open_socket(name); + UI_fd = gaim_connect_to_session(0); if (UI_fd < 0) return 1;