]> jfr.im git - irc/blitzed-org/libopm.git/commitdiff
Fixed mystery memory use, was an fd_use problem.
authorstrtok <redacted>
Mon, 16 Jun 2003 21:03:01 +0000 (21:03 +0000)
committerstrtok <redacted>
Mon, 16 Jun 2003 21:03:01 +0000 (21:03 +0000)
src/libopm.c

index afdcfadb7fdb122f4070beb0d9f3bd049a2d6cad..d7621eb9aea89d7c2560c0c8597c948362fe5c9c 100644 (file)
@@ -1021,6 +1021,7 @@ static void libopm_do_connect(OPM_T * scanner, OPM_SCAN_T *scan, OPM_CONNECTION_
    bind_ip = (opm_sockaddr *) libopm_config(scanner->config, OPM_CONFIG_BIND_IP);   
 
    conn->fd = socket(PF_INET, SOCK_STREAM, 0);
+   scanner->fd_use++;         /* Increase file descriptor use */
 
    if(conn->fd == -1)
    {
@@ -1051,7 +1052,6 @@ static void libopm_do_connect(OPM_T * scanner, OPM_SCAN_T *scan, OPM_CONNECTION_
 
    conn->state = OPM_STATE_ESTABLISHED;
    time(&(conn->creation));   /* Stamp creation time, for timeout */
-   scanner->fd_use++;         /* Increase file descriptor use */
 }