]> git.proxmox.com Git - mirror_corosync.git/commitdiff
cov 10383: impove the error handling after socket()
authorAngus Salkeld <asalkeld@redhat.com>
Fri, 14 May 2010 02:06:00 +0000 (02:06 +0000)
committerAngus Salkeld <asalkeld@redhat.com>
Fri, 14 May 2010 02:06:00 +0000 (02:06 +0000)
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2826 fd59a12c-fef9-0310-b244-a6a79926bd2f

lcr/uis.c

index 004c46485c872c2f59fb0733f3c4f4201545af04..93745a54a1bf09e551fa36b718a8cf5e872c2bd9 100755 (executable)
--- a/lcr/uis.c
+++ b/lcr/uis.c
@@ -77,7 +77,9 @@ static void uis_lcr_bind (int *server_fd)
         */
        fd = socket (PF_UNIX, SOCK_STREAM, 0);
        if (fd == -1) {
-               printf ("lcr_bind failed\n");
+               perror ("uis_lcr_bind failed");
+               *server_fd = -1;
+               return;
        };
 
 #if !defined(COROSYNC_LINUX)