Changeset 252 for trunk/src/sh_forward.c


Ignore:
Timestamp:
Oct 12, 2009, 10:40:45 AM (15 years ago)
Author:
katerina
Message:

Add code to check for stale file records on close() and fclose(), fix sl_close() to handle open stream (ticket #163).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_forward.c

    r248 r252  
    17531753                }
    17541754
    1755               (void) close (sockfd);
     1755              (void) sl_close_fd (FIL__, __LINE__, sockfd);
    17561756              memset(answer, 0, TRANS_BYTES + 256);
    17571757              MUNLOCK(answer, TRANS_BYTES + 256);
     
    17631763        }
    17641764
    1765       (void) close (sockfd);
     1765      (void) sl_close_fd (FIL__, __LINE__, sockfd);
    17661766      memset(answer, 0, TRANS_BYTES + 256);
    17671767      MUNLOCK(answer, TRANS_BYTES + 256);
     
    17751775     
    17761776 
    1777   (void) close (sockfd);
     1777  (void) sl_close_fd (FIL__, __LINE__, sockfd);
    17781778  memset(answer, 0, 512);
    17791779  MUNLOCK(answer, 512);
     
    22032203  if (conn->fd != (-1))
    22042204    {
    2205       close (conn->fd);
     2205      sl_close_fd (FIL__, __LINE__, conn->fd);
    22062206      conn->fd            = -1;
    22072207    }
     
    46814681          newconn->fd    = -1;
    46824682          newconn->state = CONN_FREE;
    4683           close(rc);
     4683          sl_close_fd(FIL__, __LINE__, rc);
    46844684          SL_RETURN( (-1), _("sh_forward_accept"));
    46854685        }
     
    46984698          newconn->fd    = -1;
    46994699          newconn->state = CONN_FREE;
    4700           close(rc);
     4700          sl_close_fd(FIL__, __LINE__, rc);
    47014701          SL_RETURN( (-1), _("sh_forward_accept"));
    47024702        }
     
    57805780           */
    57815781          TPT(( 0, FIL__, __LINE__, _("msg=<close syslog socket>\n")));
    5782           close(syslog_sock);
     5782          sl_close_fd(FIL__, __LINE__, syslog_sock);
    57835783          syslog_sock = -1;
    57845784        }
     
    58305830      errnum = errno;
    58315831      sh_forward_printerr (_("syslog bind"), errnum, 514, __LINE__);
    5832       close(sock);
     5832      sl_close_fd(FIL__, __LINE__, sock);
    58335833      SL_RETURN((-1), _("create_syslog_socket"));
    58345834    }
Note: See TracChangeset for help on using the changeset viewer.