Changeset 12

Show
Ignore:
Timestamp:
12/19/00 20:40:53 (17 years ago)
Author:
jesus
Message:

Fixed error handling of connectandjoin()'s return.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/spreadlogd.c

    r10 r12  
    1919#include "config.h" 
    2020 
    21 #define SPREADLOGD_VERSION "1.4
     21#define SPREADLOGD_VERSION "1.4.1
    2222 
    2323extern char *optarg; 
     
    253253                /* So, let's try */ 
    254254                SpreadConfiguration *thissc = fds[fd]; 
     255                int retval; 
    255256 
    256257                if(extralog) { 
     
    262263                tojoin = 1; 
    263264                thissc->connected = 0; 
    264                 FD_SET(connectandjoin(thissc, &tojoin), &masterset); 
     265                retval = connectandjoin(thissc, &tojoin); 
     266                if(retval >= 0) 
     267                  FD_SET(retval, &masterset); 
     268                else if(extralog) 
     269                  fprintf(stderr, "Error connecting to spread daemon\n"); 
    265270              } 
    266271            } else if(Is_regular_mess(service_type)) {