Branch: Tag:

2008-08-08

2008-08-08 15:04:22 by Martin Stjernholm <mast@lysator.liu.se>

Use the pike standard codec for dumping log formatters etc.

Rev: server/base_server/roxen.pike:1.980

6:   // 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.979 2008/08/05 22:15:44 mast Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.980 2008/08/08 15:04:22 mast Exp $";      //! @appears roxen   //!
5733:    {    LogFormat lf;    if (mixed err = catch { -  lf = decode_value( tmp[0]->enc, master()->MyCodec() )(); +  lf = decode_value( tmp[0]->enc, master()->Decoder() )();    }) {   // #ifdef DEBUG    report_error("Decoding of dumped log format failed:\n%s",
5891:    throw (err);    }    mixed err = catch { -  string enc = encode_value(res, master()->MyCodec(res)); +  string enc = encode_value(res, master()->Encoder (res));       con->query("REPLACE INTO compiled_formats (md5,full,enc) VALUES (%s,%s,%s)",    kmd5, fmt, enc);
6128:    if( sizeof(tmp) && (tmp[0]->full == pattern) )    {    mixed err = catch { -  return decode_value( tmp[0]->enc, master()->MyCodec() )()->f; +  return decode_value( tmp[0]->enc, master()->Decoder() )()->f;    };   // #ifdef DEBUG    report_error("Decoding of dumped log format failed:\n%s",
6441:       dbm_cached_get( "local" )    ->query("REPLACE INTO compiled_formats (md5,full,enc) VALUES (%s,%s,%s)", -  kmd5,pattern,encode_value( res, master()->MyCodec( res ) ) ); +  kmd5,pattern,encode_value( res, master()->Encoder (res) ) );    return compile_string(code)()->f;   }