Branch: Tag:

2003-01-07

2003-01-07 18:34:07 by Johan Sundström <oyasumi@gmail.com>

Added some more ftp data size stats in places where it might (and might not) be useful.

Rev: server/plugins/protocols/ftp.pike:2.86

4:   /*    * FTP protocol mk 2    * -  * $Id: ftp.pike,v 2.85 2002/11/10 01:48:25 mani Exp $ +  * $Id: ftp.pike,v 2.86 2003/01/07 18:34:07 jhs Exp $    *    * Henrik Grubbström <grubba@roxen.com>    */
949:    session = RequestID2(master_session);    session->method = "LIST";    session->not_query = long; +  session->conf->sent = sizeof(listing);    session->conf->log(([ "error":200, "len":sizeof(listing) ]), session);    }    if (!dir_stack->ptr) {
1057:    RequestID session = RequestID2(master_session);    session->not_query = Array.map(files, fix_path) * " ";    session->method = "LIST"; +  session->conf->sent = sizeof(s);    session->conf->log(([ "error":200, "len":sizeof(s) ]), session);    }    if (dir_stack->ptr) {
1828:    cmd, f) }));    break;    } +  session->conf->sent = file->len;    session->conf->log(file, session);    }   
2032:    send(550, ({ sprintf("%s: Error opening file.", args) }));    break;    } +  session->conf->sent = session->file->len;    session->conf->log(session->file, session);    return;    }
2771:    if (!st) {    send(550, ({ sprintf("%s: No such file or directory, or access denied.",    ncwd) })); +  session->conf->sent = session->file && session->file->len;    session->conf->log(session->file || ([ "error":404 ]), session);    return;    }
2817:       session->method = "CWD"; // Restore it again.    send(250, reply); -  session->conf->log(([ "error":200, "len":sizeof(reply*"\n") ]), session); +  session->conf->sent = sizeof(reply * "\n"); +  session->conf->log(([ "error":200, "len":session->conf->sent ]), session);    }       void ftp_XCWD(string args)