~videolan/dvblast/trunk

« back to all changes in this revision

Viewing changes to comm.c

  • Committer: massiot
  • Date: 2011-03-13 20:58:18 UTC
  • Revision ID: svn-v4:55d3f8b6-4a41-4d2d-a900-313d1436a5b8:trunk:184
 * dvbiscovery: Support adapters with multiple frontends.
 * dvblast, dvblastctl: Trust the process's umask.
 * en50221.c: In XML mode, output the name of the CAM.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
 *****************************************************************************/
42
42
void comm_Open( void )
43
43
{
44
 
    int i_mask;
45
44
    int i_size = 65535;
46
45
    struct sockaddr_un sun_server;
47
46
 
57
56
    sun_server.sun_family = AF_UNIX;
58
57
    strncpy( sun_server.sun_path, psz_srv_socket, sizeof(sun_server.sun_path) );
59
58
    sun_server.sun_path[sizeof(sun_server.sun_path) - 1] = '\0';
60
 
    i_mask = umask(077);
61
59
 
62
60
    if ( bind( i_comm_fd, (struct sockaddr *)&sun_server,
63
61
               SUN_LEN(&sun_server) ) < 0 )
64
62
    {
65
63
        msg_Err( NULL, "cannot bind comm socket (%s)", strerror(errno) );
66
 
        umask( i_mask );
67
64
        close( i_comm_fd );
68
65
        i_comm_fd = -1;
69
66
        return;
70
67
    }
71
 
    umask( i_mask );
72
68
}
73
69
 
74
70
/*****************************************************************************