Enlightenment CVS committal

Author  : sebastid
Project : e17
Module  : libs/ecore

Dir     : e17/libs/ecore/src/lib/ecore_con


Modified Files:
        ecore_con.c 


Log Message:
Check if the server was found.
Formatting.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_con/ecore_con.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -3 -r1.44 -r1.45
--- ecore_con.c 16 Aug 2005 09:25:02 -0000      1.44
+++ ecore_con.c 16 Aug 2005 11:26:05 -0000      1.45
@@ -907,6 +907,7 @@
 
    svr = data;
 
+   if (!he) goto error;
    svr->fd = socket(AF_INET, SOCK_STREAM, 0);
    if (svr->fd < 0) goto error;
    if (fcntl(svr->fd, F_SETFL, O_NONBLOCK) < 0) goto error;
@@ -915,24 +916,25 @@
    socket_addr.sin_family = AF_INET;
    socket_addr.sin_port = htons(svr->port);
    memcpy((struct in_addr *)&socket_addr.sin_addr, 
-        he->h_addr, sizeof(struct in_addr));
+         he->h_addr, sizeof(struct in_addr));
    if (connect(svr->fd, (struct sockaddr *)&socket_addr, sizeof(struct 
sockaddr_in)) < 0) 
      {
        if (errno != EINPROGRESS)
          goto error;
        svr->connecting = 1;
        svr->fd_handler = ecore_main_fd_handler_add(svr->fd,
-             ECORE_FD_READ | ECORE_FD_WRITE,
-             _ecore_con_cl_handler, svr,
-             NULL, NULL);
+                                                   ECORE_FD_READ | 
ECORE_FD_WRITE,
+                                                   _ecore_con_cl_handler, svr,
+                                                   NULL, NULL);
      }
    else
      svr->fd_handler = ecore_main_fd_handler_add(svr->fd,
-          ECORE_FD_READ,
-          _ecore_con_cl_handler, svr,
-          NULL, NULL);
+                                                ECORE_FD_READ,
+                                                _ecore_con_cl_handler, svr,
+                                                NULL, NULL);
 
    if (!svr->fd_handler) goto error;
+
    return;
 
    error:




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to