Changeset 11 for trunk/src/sh_forward.c


Ignore:
Timestamp:
Jan 2, 2006, 12:03:25 AM (19 years ago)
Author:
rainer
Message:

Minor optimisations for server

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_forward.c

    r3 r11  
    249249      else
    250250        {
    251           memset (name_2, 0, SH_MINIBUF+1);
    252251          first = name;
    253252          while (i < SH_MINIBUF && *first != '.' && *first != '\0')
     
    256255              ++first; ++i;
    257256            }
    258           name_2[SH_MINIBUF] = '\0';
     257          name_2[i] = '\0';
    259258        }
    260259    }
     
    20712070
    20722071
    2073 
     2072static char zap_challenge[SH_CHALLENGE_SIZE] = { 0 };
     2073 
    20742074void sh_forward_do_free (sh_conn_t * conn)
    20752075{
     
    21012101      conn->fd            = -1;
    21022102    }
    2103   memset(conn->challenge, '\0', SH_CHALLENGE_SIZE);
     2103  memcpy(conn->challenge, zap_challenge, SH_CHALLENGE_SIZE);
    21042104  conn->state         = CONN_FREE;
    21052105  conn->headcount     = 0;
     
    21182118  conn->FileLength     = 0;
    21192119  conn->FileSent       = 0;
    2120   memset(conn->FileType, '\0', 5);
     2120  conn->FileType[0] = '\0';
     2121  conn->FileType[1] = '\0';
     2122  conn->FileType[2] = '\0';
     2123  conn->FileType[3] = '\0';
     2124  conn->FileType[4] = '\0';
    21212125
    21222126  --server_status.conn_open;
Note: See TracChangeset for help on using the changeset viewer.