Roxen.git / server / base_server / roxen.pike

version» Context lines:

Roxen.git/server/base_server/roxen.pike:1:   // This file is part of Roxen WebServer.   // Copyright © 1996 - 2004, Roxen IS.   //   // The Roxen WebServer main program.   //   // Per Hedbor, Henrik Grubbström, Pontus Hagland, David Hedbor and others.   // ABS and suicide systems contributed freely by Francesco Chemolli    - constant cvs_version="$Id: roxen.pike,v 1.1008 2009/01/07 14:00:26 mast Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.1009 2009/01/08 23:14:46 mast Exp $";      //! @appears roxen   //!   //! The Roxen WebServer main program.      // The argument cache. Used by the image cache.   ArgCache argcache;      // Some headerfiles   #define IN_ROXEN
Roxen.git/server/base_server/roxen.pike:77:      // Tell Pike.count_memory this is global.   constant pike_cycle_depth = 0;      #ifdef TEST_EUID_CHANGE   int test_euid_change;   #endif      string md5( string what )   { -  return Gmp.mpz(Crypto.MD5()->update( what )->digest(),256) -  ->digits(32); +  return Gmp.mpz(Crypto.MD5.hash( what ),256)->digits(32);   }      string query_configuration_dir()   {    return configuration_dir;   }      array(string|int) filename_2 (program|object o)   {    if( objectp( o ) )
Roxen.git/server/base_server/roxen.pike:3004: Inside #if ROXEN_COMPAT < 2.2
   current_user_id_file->seek(0);    current_user_id_file->write((string)current_user_id_number);    current_user_id_file_last_mod = current_user_id_file->stat()[2];    return current_user_id_number;   }   #endif // ROXEN_COMPAT < 2.2      private int unique_id_counter;   string create_unique_id()   { -  Crypto.MD5 md5 = Crypto.MD5(); -  md5->update(query("server_salt") + start_time + "|" + -  (unique_id_counter++) + "|" + time(1)); -  return String.string2hex(md5->digest()); +  return String.string2hex(Crypto.MD5.hash(query("server_salt") + start_time +  + "|" + (unique_id_counter++) + "|" + time(1)));   }      #ifndef __NT__   protected int abs_started;   protected int handlers_alive;      protected void low_engage_abs()   {    report_debug("**** %s: ABS exiting roxen!\n\n",    ctime(time()) - "\n");
Roxen.git/server/base_server/roxen.pike:4316:    return args;    return 0;    }       string store( mapping args )    //! Store a mapping (of purely encode_value:able data) in the    //! argument cache. The string returned is your key to retrieve the    //! data later.    {    string encoded_args = encode_value_canonic( args ); -  string id = Gmp.mpz(Crypto.SHA1()->update(encoded_args)->digest(), 256)->digits(36); +  string id = Gmp.mpz(Crypto.SHA1.hash(encoded_args), 256)->digits(36);    if( cache[ id ] )    return id;    create_key(id, encoded_args);    if( !cache[ id ] )    cache[ id ] = args+([]);    if( sizeof( cache ) >= CACHE_SIZE )    cache = ([]);    return id;    }