~ubuntu-branches/debian/squeeze/smcroute/squeeze

« back to all changes in this revision

Viewing changes to src/ipc.c

  • Committer: Bazaar Package Importer
  • Author(s): Julien BLACHE
  • Date: 2006-07-09 18:51:45 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20060709185145-d58f1nirv4rxpno8
Tags: 0.93d-1
* New upstream release.
  + Patches dropped, merged upstream.
* debian/control:
  + Drop dpatch build-dependency.
* debian/copyright:
  + Update the copyright holders.

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
  struct sockaddr_un UnixAddr; 
48
48
 
49
49
  if( (ListenSock = socket( AF_UNIX, SOCK_STREAM, 0 )) < 0 )
50
 
    smclog( LOG_ERR, errno, "initIpcServer, socket() failed" );
 
50
    {
 
51
      smclog( LOG_INIT, errno, "initIpcServer, socket() failed" );
 
52
      return -1;
 
53
    }
51
54
 
52
55
  UnixAddr.sun_family = AF_UNIX;
53
56
  strcpy( UnixAddr.sun_path, SOCKET_PATH );
57
60
  if( bind( ListenSock, (struct sockaddr *)&UnixAddr, 
58
61
            sizeof( UnixAddr.sun_family ) + strlen( UnixAddr.sun_path )) < 0 
59
62
      || listen( ListenSock, 1 ) )
60
 
    smclog( LOG_ERR, errno, "initIpcServer, bind()/listen() failed" );
 
63
    {
 
64
      smclog( LOG_INIT, errno, "initIpcServer, bind()/listen() failed" );
 
65
      close(ListenSock);
 
66
      return -1;
 
67
    }
61
68
 
62
69
  return ListenSock;
63
70
}