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

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

Location:
TI05-delivery/trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • TI05-delivery/trunk/src/bbftp-client-3.2.0/bbftpc/bbftp_private_user.c

    r1259 r1264  
    143143 
    144144  /* Send version verification message.  */ 
    145   if (ndg_message_send(NDG_HANDSHAKE, strlen(NDG_HANDSHAKE) + 1, logmessage) == -1) { 
     145  if (ndg_message_send(NDG_HANDSHAKE, strlen(NDG_HANDSHAKE), logmessage) == -1) { 
    146146    return -1; 
    147147  } 
     
    163163  } 
    164164 
    165   if (ndg_message_send(privatestr, strlen(privatestr) + 1, logmessage) == -1) { 
     165  if (ndg_message_send(privatestr, strlen(privatestr), logmessage) == -1) { 
    166166    return -1; 
    167167  } 
  • 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; 
  • TI05-delivery/trunk/src/python_ext/bbftpc.c

    r1259 r1264  
    229229  } 
    230230 
    231   if (ndg_client_message_send(buffer, len+1, logmessage) == -1) { 
     231  if (ndg_client_message_send(buffer, len, logmessage) == -1) { 
    232232    PyErr_SetString(PyExc_IOError, logmessage); 
    233233    return NULL; 
Note: See TracChangeset for help on using the changeset viewer.