/[svn]/hopm/trunk/src/irc.c
ViewVC logotype

Diff of /hopm/trunk/src/irc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 5363 by michael, Mon Jan 12 19:19:11 2015 UTC revision 5364 by michael, Mon Jan 12 19:56:33 2015 UTC
# Line 315  irc_connect(void) Line 315  irc_connect(void)
315    /* Connect to IRC server as client. */    /* Connect to IRC server as client. */
316    if (connect(IRC_FD, (struct sockaddr *)&IRC_SVR, sizeof(IRC_SVR)) == -1)    if (connect(IRC_FD, (struct sockaddr *)&IRC_SVR, sizeof(IRC_SVR)) == -1)
317    {    {
318      switch (errno)      log_printf("IRC -> connect(): error connecting to %s: %s",
319      {                 IRCItem->server, strerror(errno));
       case EISCONN:  
         /* Already connected */  
         return;  
       case ECONNREFUSED:  
         log_printf("IRC -> connect(): Connection refused by (%s)",  
                    IRCItem->server);  
         break;  
       case ETIMEDOUT:  
         log_printf("IRC -> connect(): Timed out connecting to (%s)",  
                    IRCItem->server);  
         break;  
       case ENETUNREACH:  
         log_printf("IRC -> connect(): Network unreachable");  
         break;  
       case EALREADY:  
         /* Previous attempt not complete */  
         return;  
       default:  
         log_printf("IRC -> connect(): Unknown error connecting to (%s)",  
                    IRCItem->server);  
320    
321          if (OPT_DEBUG >= 1)      if (errno == EISCONN /* Already connected */ || errno == EALREADY /* Previous attempt not complete */)
322            log_printf("%s", strerror(errno));        return;
     }  
323    
324      /* Try to connect again */      /* Try to connect again */
325      irc_reconnect();      irc_reconnect();

Legend:
Removed from v.5363  
changed lines
  Added in v.5364

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28