comparison src/core.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 3da42b64304e
children 9682c0e022c6
comparison
equal deleted inserted replaced
3532:369d419c8a29 3533:6c32036050cf
441 debug_printf("session: %d\n", gaim_session); 441 debug_printf("session: %d\n", gaim_session);
442 442
443 if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) != -1) { 443 if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) != -1) {
444 mode_t m = umask(0177); 444 mode_t m = umask(0177);
445 saddr.sun_family = AF_UNIX; 445 saddr.sun_family = AF_UNIX;
446 g_snprintf(saddr.sun_path, 108, "%s/gaim_%s.%d", 446 g_snprintf(saddr.sun_path, sizeof(saddr.sun_path), "%s/gaim_%s.%d",
447 g_get_tmp_dir(), g_get_user_name(), gaim_session); 447 g_get_tmp_dir(), g_get_user_name(), gaim_session);
448 if (bind(fd, (struct sockaddr *)&saddr, sizeof(saddr)) != -1) 448 if (bind(fd, (struct sockaddr *)&saddr, sizeof(saddr)) != -1)
449 listen(fd, 100); 449 listen(fd, 100);
450 else { 450 else {
451 g_log(NULL, G_LOG_LEVEL_CRITICAL, 451 g_log(NULL, G_LOG_LEVEL_CRITICAL,