Ignore:
Timestamp:
01/06/06 15:18:02 (13 years ago)
Author:
spascoe
Message:

Implemented full client-server handshake. A version message is now
exchanged client->server then server->client. These messages are logged
in debug mode. Message passing is implemented in Python on the server (at the
moment this is only implemented within test/test_embedded.py).

File:
1 edited

Legend:

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

    r802 r1077  
    3030 
    3131#include <bbftp_private_user.h> 
     32#include <client.h> 
    3233 
    3334/* 
     
    3940*/ 
    4041extern char *privatestr ; 
     42 
     43extern int debug; 
     44 
     45/* From bbftp_util.c */ 
     46void printmessage(FILE *strm , int flag, int errcode, int tok, char *fmt, ...); 
     47 
    4148 
    4249/******************************************************************************* 
     
    118125int bbftp_private_auth(char *logmessage)  
    119126{ 
     127  char msg[NDG_MESSAGE_LEN]; 
     128 
    120129  /* Send version verification message.  */ 
    121   if (bbftp_private_send(NDG_FTP_PROTOCOL, NDG_MESSAGE_LEN, logmessage) == -1) { 
     130  sprintf(msg, "%.*s", NDG_MESSAGE_LEN - 1, NDG_HANDSHAKE); 
     131  if (bbftp_private_send(msg, NDG_MESSAGE_LEN, logmessage) == -1) { 
    122132    return -1; 
     133  } 
     134 
     135  /* Receive response */ 
     136  if (bbftp_private_recv(msg, NDG_MESSAGE_LEN, logmessage) == -1) { 
     137    return -1; 
     138  } 
     139 
     140  if (debug) { 
     141    printmessage(stdout,CASE_NORMAL,0,0,"Received Auth handshake: %s\n", msg) ; 
    123142  } 
    124143 
Note: See TracChangeset for help on using the changeset viewer.