Ignore:
Timestamp:
03/07/06 10:19:20 (14 years ago)
Author:
spascoe
Message:

Client-side python API now works on all test cases.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI05-delivery/trunk/src/bbftp-server-3.2.0/bbftpd/ndg.c

    r1187 r1264  
    5050 
    5151  /* Send response */ 
    52   if (ndg_message_send(NDG_HANDSHAKE, strlen(NDG_HANDSHAKE) + 1, logmessage) == -1) { 
     52  if (ndg_message_send(NDG_HANDSHAKE, strlen(NDG_HANDSHAKE), logmessage) == -1) { 
    5353    return -1; 
    5454  } 
     
    204204 * 
    205205 * The message length is sent in a separate header. 
     206 * The message is guaranteed to be NULL terminated.  This is done by 
     207 * allocating length+1 bytes and filling them with \0. 
    206208 * 
    207209 * @param buffer is set to newly allocated message buffer. 
     
    221223  } 
    222224 
    223   if ((*buffer = (char *)malloc(*length * sizeof(char))) == NULL) { 
     225  if ((*buffer = (char *)calloc(*length+1, sizeof(char))) == NULL) { 
    224226    sprintf(logmessage, "ngd_message_recv malloc error"); 
    225227    return -1; 
Note: See TracChangeset for help on using the changeset viewer.