Branch: Tag:

2004-04-04

2004-04-04 14:26:44 by Martin Nilsson <mani@lysator.liu.se>

this_object() -> this

Rev: server/plugins/protocols/ftp.pike:2.89
Rev: server/plugins/protocols/http.pike:1.396
Rev: server/plugins/protocols/prot_ftp.pike:2.6
Rev: server/plugins/protocols/prot_ftps.pike:2.7
Rev: server/plugins/protocols/prot_hilfe.pike:2.18
Rev: server/plugins/protocols/prot_http.pike:2.8
Rev: server/plugins/protocols/prot_https.pike:2.10
Rev: server/plugins/protocols/tetris.pike:1.13
Rev: server/server_core/admin_userdb.pike:1.65
Rev: server/server_core/basic_defvar.pike:1.36
Rev: server/server_core/configuration.pike:1.552
Rev: server/server_core/core.pike:1.857
Rev: server/server_core/fonts.pike:1.91
Rev: server/server_core/global_variables.pike:1.106
Rev: server/server_core/javamodule.pike:1.8
Rev: server/server_core/loader.pike:1.376
Rev: server/server_core/master.pike:1.136
Rev: server/server_core/module.pike:1.138
Rev: server/server_core/module_support.pike:1.130
Rev: server/server_core/prototypes.pike:1.67
Rev: server/server_core/roxenlib.pike:1.220
Rev: server/server_core/rxml.pike:1.332
Rev: server/server_core/snmpagent.pike:1.28
Rev: server/server_core/wizard.pike:1.148

4:   /*    * FTP protocol mk 2    * -  * $Id: ftp.pike,v 2.88 2004/04/04 00:01:59 mani Exp $ +  * $Id: ftp.pike,v 2.89 2004/04/04 14:24:52 mani Exp $    *    * Henrik Grubbström <grubba@roxen.com>    */
148:    error("Async sending with send_result() not supported yet.\n");    }    -  object(RequestID2) clone_me() +  RequestID2 clone_me()    { -  object(RequestID2) o = this_object(); -  return(object_program(o)(o)); +  return this_program(this);    }       void end()
178:   #endif       if (m_rid) { -  object o = this_object(); +  this_program o = this;    foreach(indices(m_rid), string var) {    if (!(< "create", "connection", "configuration",    "__INIT", "clone_me", "end", "ready_to_receive",
1931:    // The list_stream object doesn't support nonblocking I/O,    // but converts to ASCII anyway, so we don't have to do    // anything about it. -  file->file = ToAsciiWrapper(file->file, 0, this_object()); +  file->file = ToAsciiWrapper(file->file, 0, this);    }    break;    case "E":
1946:    // but converts to ASCII anyway, so we don't have to do    // anything about it.    // But EBCDIC doen't work... -  file->file = ToEBCDICWrapper(file->file, 0, this_object()); +  file->file = ToEBCDICWrapper(file->file, 0, this);    }    break;    default:    // "I" and "L"    // Binary -- no conversion needed.    if (objectp(file->file) && file->file->set_nonblocking) { -  file->file = BinaryWrapper(file->file, 0, this_object()); +  file->file = BinaryWrapper(file->file, 0, this);    }    break;    }
1962:    object pipe;    pipe = core.get_shuffler( fd );    if( conf ) -  conf->connection_add( this_object(), pipe ); +  conf->connection_add( this, pipe );       if( throttler || conf->throttler )    pipe->set_throttler( throttler || conf->throttler );
2003:       switch(mode) {    case "A": -  fd = FromAsciiWrapper(fd, data, this_object()); +  fd = FromAsciiWrapper(fd, data, this);    break;    case "E": -  fd = FromEBCDICWrapper(fd, data, this_object()); +  fd = FromEBCDICWrapper(fd, data, this);    return;    default: // "I" and "L"    // Binary, no need to do anything. -  fd = BinaryWrapper(fd, data, this_object()); +  fd = BinaryWrapper(fd, data, this);    break;    }       object session = RequestID2(master_session);    session->method = "PUT"; -  session->my_fd = PutFileWrapper(fd, session, this_object()); +  session->my_fd = PutFileWrapper(fd, session, this);    session->misc->len = 0x7fffffff;       if (open_file(args, session, "STOR")) {
2435:    }       file->file = LSFile(cwd, argv[1..], flags, session, -  file->mode, this_object()); +  file->mode, this);    }       if (!file->full_path) {
3352:    {    array a = sort(Array.filter(indices(cmd_help),    lambda(string s) { -  return(this_object()["ftp_"+s]); +  return(this["ftp_"+s]);    }));    a = Array.map(a,    lambda(string s) {
3476:    @(sprintf(" %#70s", sort(Array.map(indices(cmd_help),    lambda(string s) {    return(upper_case(s)+ -  (this_object()["ftp_"+s]? +  (this["ftp_"+s]?    " ":"* "));    }))*"\n")/"\n"),    @(FTP2_XTRA_HELP),
3497:    if (cmd_help[args]) {    send(214, ({ sprintf("Syntax: %s %s%s", args,    cmd_help[args], -  (this_object()["ftp_"+args]? +  (this["ftp_"+args]?    "":"; unimplemented")) }));    } else {    send(504, ({ sprintf("Unknown command %s.", args) }));
3525:    a[0] = upper_case(a[0]);    if (!site_help[a[0]]) {    send(502, ({ sprintf("Bad SITE command: '%s'", a[0]) })); -  } else if (this_object()["ftp_SITE_"+a[0]]) { -  this_object()["ftp_SITE_"+a[0]](a[1..]); +  } else if (this["ftp_SITE_"+a[0]]) { +  this["ftp_SITE_"+a[0]](a[1..]);    } else {    send(502, ({ sprintf("SITE command '%s' is not currently supported.",    a[0]) }));
3699:    return;    }    } -  if (this_object()["ftp_"+cmd]) { +  if (this["ftp_"+cmd]) {    conf->requests++;   #if 1    mixed err;    if (err = catch { -  this_object()["ftp_"+cmd](args); +  this["ftp_"+cmd](args);    }) {    report_error("Internal server error in FTP2\n"    "Handling command %O\n%s\n",
3720:    "Handling command %O\n%s\n",    line, describe_backtrace(err));    } -  }, this_object()["ftp_"+cmd], args, line); +  }, this["ftp_"+cmd], args, line);   #endif    } else {    send(502, ({ sprintf("'%s' is not currently supported.", cmd) }));