From klacke@REDACTED Mon Mar 3 11:17:44 2003 From: klacke@REDACTED (Klacke) Date: Mon, 3 Mar 2003 11:17:44 +0100 Subject: ssl Message-ID: <20030303101744.GB25207@bluetail.com> I tried the r9_not_a_release ssl still doesn't build properly. It's the Makefile.in in lib/ssl/c_src that never links the ssl_esock program. This is probably known .... and possibly even intentional ??? but I see no reason. /klacke *** Makefile.in.orig 2003-03-03 10:53:17.000000000 +0100 --- Makefile.in 2003-03-03 10:53:39.000000000 +0100 *************** *** 105,111 **** debug opt: echo "Nothing to build for Win32" else ! debug opt: $(OBJDIR) $(BINDIR) $(SSL_BASE) $(EXTRA_SSL_OBJS) $(SSL_MAKEFILE) $(OBJDIR): -@REDACTED -p $(OBJDIR) --- 105,111 ---- debug opt: echo "Nothing to build for Win32" else ! debug opt: $(OBJDIR) $(BINDIR) $(SSL_BASE) $(EXTRA_SSL_OBJS) $(SSL_MAKEFILE) $(SSL_BINS) $(OBJDIR): -@REDACTED -p $(OBJDIR) *************** *** 125,130 **** --- 125,131 ---- $(BINDIR)/ssl_esock: $(SSL_BASE) $(OBJDIR)/esock_ssleay.o $(CC) $(LDFLAGS) -L$(SSLEAY_LIBDIR) -o $@ $^ $(LDLIBS) -lssl -lcrypto + mv $@ $(PRIVDIR)/bin/ $(SSL_MAKEFILE): sed -e "s;%BINDIR%;../../bin/$(TARGET);" \ -- Claes Wikstrom -- Caps lock is nowhere and Alteon WebSystems -- everything is under control http://www.bluetail.com/~klacke cellphone: +46 70 2097763 From klacke@REDACTED Tue Mar 4 11:24:06 2003 From: klacke@REDACTED (Klacke) Date: Tue, 4 Mar 2003 11:24:06 +0100 Subject: inet_drv.c Message-ID: <20030304102406.GA18827@bluetail.com> We have found another bug in the inet_drv.c file. This one is actually pretty bad. The problem is that if 1. the driver is in packet http 2. the driver http state wants to read the request line (GET ...) 3. It get eiter "\n" or "\r\n" from a broken client that starts of with a crnl before sending the request line The http_message() function returns 0 ... and the file descriptor leaks away. The caller sits in inet_prim:recv0 for ever. The timer get canceled in the driver. Im not sure that my fix is the correct one, it does seem to remedy the problem though. I am not entirely certain of what happens in the other (return 0) cases that apparently can happen. (driver_output_term retuns 0 in various cases, but I think we want to continue to a) poll the fd and (b) have the timer going even in those cases ??? Anyway here's the patch: (boring $Id diff that you need to live with .. sorry) An alternative would be to return -1 in http_message() but that would break a lot of other stuff. There are many many broken clients out there and the code is written so that it is supposed to handle this case (but doesn't) I also attach a program by Luke which manifestas the bug. Cheers /klacke tita:common> cvs diff -r1.32 inet_drv.c Index: inet_drv.c =================================================================== RCS file: /home/share/erlang/cvsroot/otp/erts/emulator/drivers/common/inet_drv.c ,v retrieving revision 1.32 retrieving revision 1.33 diff -c -b -r1.32 -r1.33 *** inet_drv.c 25 Feb 2003 13:36:21 -0000 1.32 --- inet_drv.c 4 Mar 2003 10:11:27 -0000 1.33 *************** *** 13,19 **** * Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings * AB. All Rights Reserved.'' * ! * $Id: inet_drv.c,v 1.32 2003/02/25 13:36:21 magnus Exp $ */ #ifdef HAVE_CONFIG_H --- 13,19 ---- * Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings * AB. All Rights Reserved.'' * ! * $Id: inet_drv.c,v 1.33 2003/03/04 10:11:27 klacke Exp $ */ #ifdef HAVE_CONFIG_H *************** *** 2573,2579 **** else code = tcp_message(INETP(desc), buf, len); ! if (code < 0) return code; if (desc->inet.active == INET_ONCE) desc->inet.active = INET_PASSIVE; --- 2573,2579 ---- else code = tcp_message(INETP(desc), buf, len); ! if (code <= 0) return code; if (desc->inet.active == INET_ONCE) desc->inet.active = INET_PASSIVE; *************** *** 2611,2617 **** return inet_async_binary_data(INETP(desc), 0, bin, offs, len); else code = tcp_binary_message(desc, bin, offs, len); ! if (code < 0) return code; if (desc->inet.active == INET_ONCE) desc->inet.active = INET_PASSIVE; --- 2611,2617 ---- return inet_async_binary_data(INETP(desc), 0, bin, offs, len); else code = tcp_binary_message(desc, bin, offs, len); ! if (code <= 0) return code; if (desc->inet.active == INET_ONCE) desc->inet.active = INET_PASSIVE; *************** *** 5558,5564 **** desc->i_remain = 0; } ! if (code < 0) return code; count++; --- 5558,5564 ---- desc->i_remain = 0; } ! if (code <= 0) return code; count++; -- Claes Wikstrom -- Caps lock is nowhere and Alteon WebSystems -- everything is under control http://www.bluetail.com/~klacke cellphone: +46 70 2097763 -------------- next part -------------- %%%---------------------------------------------------------------------- %%% File : inetleak.erl %%% Author : Luke Gorrie %%% Purpose : Test case for inet_driver leaking file descriptors %%% Created : 3 Mar 2003 by Luke Gorrie %%%---------------------------------------------------------------------- %% go/1 starts a server, and test_client/1 connects to that server and %% hangs it with a malformed HTTP request. -module(inetleak). -author('luke@REDACTED'). -compile(export_all). %%-export([Function/Arity, ...]). go(Port) -> spawn_link(fun() -> {ok, L} = gen_tcp:listen(Port, [{active, false}, binary, {reuseaddr, true}, {packet, http}]), accept_loop(L) end). accept_loop(L) -> case gen_tcp:accept(L) of {ok, S} -> worker(S); Err -> exit({accept, Err}) end. worker(S) -> io:format("~p trying a read with timeout..~n", [self()]), case gen_tcp:recv(S, 0, 30000) of {ok, Data} -> io:format("~p got ~p~n", [self(), Data]), worker(S); {error, Rsn} -> io:format("~p error: ~p~n", [self(), Rsn]) end. test_client(Port) -> {ok,S} = gen_tcp:connect("localhost", Port, [{active,false}, binary]), ok = gen_tcp:send(S, "\r\n"), ok = gen_tcp:close(S). From klacke@REDACTED Thu Mar 6 11:25:13 2003 From: klacke@REDACTED (Klacke) Date: Thu, 6 Mar 2003 11:25:13 +0100 Subject: inet_drv.c In-Reply-To: <20030304102406.GA18827@bluetail.com> References: <20030304102406.GA18827@bluetail.com> Message-ID: <20030306102513.GA17029@bluetail.com> The patch I send with lukes code that showed an error in inet_drv.c wasn't correct. Martin B and I have spent a couple of days !!! trying to get the patch right. Hard. The problem is that it isn't that easy to restart the input when a single crnl is found in http_message(). We settled on: *************** *** 1914,1920 **** int c; /* start-line = Request-Line | Status-Line */ if (n == 0) ! return 0; h = 0; meth_ptr = ptr; while (n && !is_tspecial((unsigned char)*ptr)) { --- 1914,1920 ---- int c; /* start-line = Request-Line | Status-Line */ if (n == 0) ! return -1; h = 0; meth_ptr = ptr; while (n && !is_tspecial((unsigned char)*ptr)) { So when http_message get crnl (only) it return -1 and {http_error, Socket "\r\n"} will be returned all the way up to the HTPP app. > %%%---------------------------------------------------------------------- > %%% File : inetleak.erl > %%% Author : Luke Gorrie > %%% Purpose : Test case for inet_driver leaking file descriptors > %%% Created : 3 Mar 2003 by Luke Gorrie > %%%---------------------------------------------------------------------- > > %% go/1 starts a server, and test_client/1 connects to that server and > %% hangs it with a malformed HTTP request. > > -module(inetleak). > -author('luke@REDACTED'). > > -compile(export_all). > %%-export([Function/Arity, ...]). > > go(Port) -> > spawn_link(fun() -> > {ok, L} = gen_tcp:listen(Port, [{active, false}, > binary, > {reuseaddr, true}, > {packet, http}]), > accept_loop(L) > end). > > accept_loop(L) -> > case gen_tcp:accept(L) of > {ok, S} -> > worker(S); > Err -> > exit({accept, Err}) > end. > > worker(S) -> > io:format("~p trying a read with timeout..~n", [self()]), > case gen_tcp:recv(S, 0, 30000) of > {ok, Data} -> > io:format("~p got ~p~n", [self(), Data]), > worker(S); > {error, Rsn} -> > io:format("~p error: ~p~n", [self(), Rsn]) > end. > > > test_client(Port) -> > {ok,S} = gen_tcp:connect("localhost", Port, [{active,false}, binary]), > ok = gen_tcp:send(S, "\r\n"), > ok = gen_tcp:close(S). > -- Claes Wikstrom -- Caps lock is nowhere and Alteon WebSystems -- everything is under control http://www.bluetail.com/~klacke cellphone: +46 70 2097763 From mickael.remond@REDACTED Fri Mar 7 23:56:39 2003 From: mickael.remond@REDACTED (Mickael Remond) Date: Fri, 7 Mar 2003 23:56:39 +0100 Subject: make.erl - Support of asn1 file compilation from Emakefile Message-ID: <20030307225639.GA24822@erlang.dyndns.org> Hello, I have made some changes in make.erl to make it possible to compile asn1 file from an Emakefile. Here is how I use it in the Emakefile: %% The compilation of an ASN1 file is often done in two steps %{'src/ELDAPv3.asn', [nobj, {outdir, "include"}]}. %{'include/ELDAPv3.erl', [{outdir, "ebin"}]}. The make.erl file is attached to this mail. I am planning to add support to date comparison between targets and source file in a future version. -- Micka?l R?mond -------------- next part -------------- %% ``The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Public License along with this software. If not, it can be %% retrieved via the world wide web at http://www.erlang.org/. %% %% Software distributed under the License is distributed on an "AS IS" %% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See %% the License for the specific language governing rights and limitations %% under the License. %% %% The Initial Developer of the Original Code is Ericsson Utvecklings AB. %% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings %% AB. All Rights Reserved.'' %% %% $Id$ %% %% Purpose : Basic make facility %% Compares date stamps of .erl and Object files - recompiles when %% necessary. %% Files to be checked are contained in a file 'Emakefile' %% If Emakefile is missing the current directory is used. -module(make). -export([all/0,all/1,files/1,files/2]). -include_lib("kernel/include/file.hrl"). -define(MakeOpts,[noexec,load,netload,noload]). all() -> all([]). all(Options) -> {MakeOpts,CompileOpts} = sort_options(Options,[],[]), case read_emakefile('Emakefile',CompileOpts) of Files when list(Files) -> do_make_files(Files,MakeOpts); error -> error end. files(Fs) -> files(Fs, []). files(Fs0, Options) -> Fs = [filename:basename(F,".erl") || F <- Fs0], {MakeOpts,CompileOpts} = sort_options(Options,[],[]), case get_opts_from_emakefile(Fs,'Emakefile',CompileOpts) of Files when list(Files) -> do_make_files(Files,MakeOpts); error -> error end. do_make_files(Fs, Opts) -> process(Fs, lists:member(noexec, Opts), load_opt(Opts)). sort_options([H|T],Make,Comp) -> case lists:member(H,?MakeOpts) of true -> sort_options(T,[H|Make],Comp); false -> sort_options(T,Make,[H|Comp]) end; sort_options([],Make,Comp) -> {Make,lists:reverse(Comp)}. %%% Reads the given Emakefile and returns a list of tuples: {Mods,Opts} %%% Mods is a list of module names (strings) %%% Opts is a list of options to be used when compiling Mods %%% %%% Emakefile can contain elements like this: %%% Mod. %%% {Mod,Opts}. %%% Mod is a module name which might include '*' as wildcard %%% or a list of such module names %%% %%% These elements are converted to [{ModList,OptList},...] %%% ModList is a list of modulenames (strings) read_emakefile(Emakefile,Opts) -> case file:consult(Emakefile) of {ok,Emake} -> transform(Emake,Opts,[],[]); {error,enoent} -> %% No Emakefile found - return all modules in current %% directory and the options given at command line Mods = [filename:rootname(F) || F <- filelib:wildcard("*.erl")], [{Mods, Opts}]; {error,Other} -> io:format("make: Trouble reading 'Emakefile':~n~p~n",[Other]), error end. transform([{Mod,ModOpts}|Emake],Opts,Files,Already) -> case expand(Mod,Already) of [] -> transform(Emake,Opts,Files,Already); Mods -> transform(Emake,Opts,[{Mods,ModOpts++Opts}|Files],Mods++Already) end; transform([Mod|Emake],Opts,Files,Already) -> case expand(Mod,Already) of [] -> transform(Emake,Opts,Files,Already); Mods -> transform(Emake,Opts,[{Mods,Opts}|Files],Mods++Already) end; transform([],_Opts,Files,_Already) -> lists:reverse(Files). expand(Mod,Already) when atom(Mod) -> expand(atom_to_list(Mod),Already); expand(Mods,Already) when list(Mods), not is_integer(hd(Mods)) -> lists:concat([expand(Mod,Already) || Mod <- Mods]); expand(Mod,Already) -> case lists:member($*,Mod) of true -> Fun = fun(F,Acc) -> M = filename:rootname(F), case lists:member(M,Already) of true -> Acc; false -> [M|Acc] end end, lists:foldl(Fun, [], filelib:wildcard(Mod++".erl")); false -> case lists:member(Mod,Already) of true -> []; false -> [Mod] end end. %%% Reads the given Emakefile to see if there are any specific compile %%% options given for the modules. get_opts_from_emakefile(Mods,Emakefile,Opts) -> case file:consult(Emakefile) of {ok,Emake} -> Modsandopts = transform(Emake,Opts,[],[]), ModStrings = [coerce_2_list(M) || M <- Mods], get_opts_from_emakefile2(Modsandopts,ModStrings,Opts,[]); {error,enoent} -> [{Mods, Opts}]; {error,Other} -> io:format("make: Trouble reading 'Emakefile':~n~p~n",[Other]), error end. get_opts_from_emakefile2([{MakefileMods,O}|Rest],Mods,Opts,Result) -> case members(Mods,MakefileMods,[],Mods) of {[],_} -> get_opts_from_emakefile2(Rest,Mods,Opts,Result); {I,RestOfMods} -> get_opts_from_emakefile2(Rest,RestOfMods,Opts,[{I,O}|Result]) end; get_opts_from_emakefile2([],[],_Opts,Result) -> Result; get_opts_from_emakefile2([],RestOfMods,Opts,Result) -> [{RestOfMods,Opts}|Result]. members([H|T],MakefileMods,I,Rest) -> case lists:member(H,MakefileMods) of true -> members(T,MakefileMods,[H|I],lists:delete(H,Rest)); false -> members(T,MakefileMods,I,Rest) end; members([],_MakefileMods,I,Rest) -> {I,Rest}. %% Any flags that are not recognixed as make flags are passed directly %% to the compiler. %% So for example make:all([load,debug_info]) will make everything %% with the debug_info flag and load it. load_opt(Opts) -> case lists:member(netload,Opts) of true -> netload; false -> case lists:member(load,Opts) of true -> load; _ -> noload end end. process([{[],_Opts}|Rest], NoExec, Load) -> process(Rest, NoExec, Load); process([{[H|T],Opts}|Rest], NoExec, Load) -> case recompilep(coerce_2_list(H), NoExec, Load, Opts) of error -> error; _ -> process([{T,Opts}|Rest], NoExec, Load) end; process([], _NoExec, _Load) -> up_to_date. %% mremond: The function can now compile asn1 file and not only erlang source %% files recompilep(File, NoExec, Load, Opts) -> FileType = filename:extension(File), recompilep(FileType, File, NoExec, Load, Opts). %% For the time being, ASN1 file are always recompiled recompilep(".asn", File, NoExec, Load, Opts) -> asn1ct:compile(File, Opts); %% Erlang source file are only recompiled if necessary recompilep(".erl", File, NoExec, Load, Opts) -> ObjName = lists:append(filename:basename(File), code:objfile_extension()), ObjFile = case lists:keysearch(outdir,1,Opts) of {value,{outdir,OutDir}} -> filename:join(coerce_2_list(OutDir),ObjName); false -> ObjName end, case exists(ObjFile) of true -> recompilep1(File, NoExec, Load, Opts, ObjFile); false -> recompile(File, NoExec, Load, Opts) end; recompilep(OtherFileType, File, NoExec, Load, Opts) -> io:format("Filetype of ~s is not a filetype handled by the make module.~n~s",[File, OtherFileType]). recompilep1(File, NoExec, Load, Opts, ObjFile) -> {ok, Erl} = file:read_file_info(lists:append(File, ".erl")), {ok, Obj} = file:read_file_info(ObjFile), case {readable(Erl), writable(Obj)} of {true, true} -> recompilep1(Erl, Obj, File, NoExec, Load, Opts); _ -> error end. recompilep1(#file_info{mtime=Te}, #file_info{mtime=To}, File, NoExec, Load, Opts) when Te > To -> recompile(File, NoExec, Load, Opts); recompilep1(_Erl, #file_info{mtime=To}, File, NoExec, Load, Opts) -> recompile2(To, File, NoExec, Load, Opts). %% recompile2(ObjMTime, File, NoExec, Load, Opts) %% Check if file is of a later date than include files. recompile2(ObjMTime, File, NoExec, Load, Opts) -> IncludePath = include_opt(Opts), case check_includes(lists:append(File, ".erl"), IncludePath, ObjMTime) of true -> recompile(File, NoExec, Load, Opts); false -> false end. include_opt([{i,Path}|Rest]) -> [Path|include_opt(Rest)]; include_opt([_First|Rest]) -> include_opt(Rest); include_opt([]) -> []. %% recompile(File, NoExec, Load, Opts) %% Actually recompile and load the file, depending on the flags. %% Where load can be netload | load | noload recompile(File, true, _Load, _Opts) -> io:format("Out of date: ~s\n",[File]); recompile(File, false, noload, Opts) -> io:format("Recompile: ~s\n",[File]), compile:file(File, [report_errors, report_warnings, error_summary |Opts]); recompile(File, false, load, Opts) -> io:format("Recompile: ~s\n",[File]), c:c(File, Opts); recompile(File, false, netload, Opts) -> io:format("Recompile: ~s\n",[File]), c:nc(File, Opts). exists(File) -> case file:read_file_info(File) of {ok, _} -> true; _ -> false end. readable(#file_info{access=read_write}) -> true; readable(#file_info{access=read}) -> true; readable(_) -> false. writable(#file_info{access=read_write}) -> true; writable(#file_info{access=write}) -> true; writable(_) -> false. coerce_2_list(X) when atom(X) -> atom_to_list(X); coerce_2_list(X) -> X. %%% If you an include file is found with a modification %%% time larger than the modification time of the object %%% file, return true. Otherwise return false. check_includes(File, IncludePath, ObjMTime) -> Path = [filename:dirname(File)|IncludePath], case epp:open(File, Path, []) of {ok, Epp} -> check_includes2(Epp, File, ObjMTime); _Error -> false end. check_includes2(Epp, File, ObjMTime) -> case epp:parse_erl_form(Epp) of {ok, {attribute, 1, file, {File, 1}}} -> check_includes2(Epp, File, ObjMTime); {ok, {attribute, 1, file, {IncFile, 1}}} -> case file:read_file_info(IncFile) of {ok, #file_info{mtime=MTime}} when MTime > ObjMTime -> epp:close(Epp), true; _ -> check_includes2(Epp, File, ObjMTime) end; {ok, _} -> check_includes2(Epp, File, ObjMTime); {eof, _} -> epp:close(Epp), false; {error, _Error} -> check_includes2(Epp, File, ObjMTime) end. From thomas@REDACTED Mon Mar 10 13:35:14 2003 From: thomas@REDACTED (Thomas Lange) Date: Mon, 10 Mar 2003 13:35:14 +0100 Subject: max disk_log size ignored Message-ID: <3E6C8682.6050205@corelatus.com> When running a web server, the options ErrorDiskLogSize and SecurityDiskLogSize are ignored. The value for TransferDiskLogSize is used instead ( or default 500kB x 8, if it is not set ). Attached a patch that fixes this ( against R9B-1 ). I have only verified that it solves my problem with ErrorDiskLogSize ;-) /Thomas -------------- next part -------------- A non-text attachment was scrubbed... Name: mod_disk_log.patch.gz Type: application/gzip Size: 505 bytes Desc: not available URL: From etxuwig@REDACTED Mon Mar 10 16:19:05 2003 From: etxuwig@REDACTED (Ulf Wiger) Date: Mon, 10 Mar 2003 16:19:05 +0100 (MET) Subject: mnesia_schema patch Message-ID: The attached patch to mnesia_schema (mnesia-4.1.3) exports the do_delete_table/1 function. This is symmetrical to the already exported do_create_table/1. The use of both is to be able to do something like the following: add_context(Context) -> mnesia_schema:schema_transaction( fun() -> case mnesia:read(context, Context, read) of [] -> mnesia:write(#context{id=Context}), lists:foreach( fun({TabName, Opts}) -> Cs = mnesia_schema:list2cs( add_name(TabName, Opts)), mnesia_schema:do_create_table(Cs) end, sub_tables(Context)); _ -> mnesia:abort({exists, Context}) end). remove_context(Context) -> mnesia_schema:schema_transaction( fun() -> case mnesia:read(context,Context, write) of [_] -> mnesia:delete(context,Context,write), lists:foreach( fun({TabName,_}) -> mnesia_schema:do_delete_table(TabName) end, sub_tables(Context)); [] -> mnesia:abort({not_found, Context}) end). ...without totally messing up your database upon partial failure. /Uffe -- Ulf Wiger, Senior Specialist, / / / Architecture & Design of Carrier-Class Software / / / Strategic Product & System Management / / / Ericsson AB, Connectivity and Control Nodes -------------- next part -------------- 102a103 > do_delete_table/1, From dgud@REDACTED Mon Mar 10 16:29:25 2003 From: dgud@REDACTED (Dan Gudmundsson) Date: Mon, 10 Mar 2003 16:29:25 +0100 Subject: mnesia_schema patch In-Reply-To: References: Message-ID: <15980.44885.729544.180493@rian.du.uab.ericsson.se> Ok, will be added in the next patch/release. /Dan Ulf Wiger writes: > > The attached patch to mnesia_schema (mnesia-4.1.3) exports > the do_delete_table/1 function. This is symmetrical to the > already exported do_create_table/1. > > The use of both is to be able to do something like the > following: > > 102a103 > > do_delete_table/1, From mickael.remond@REDACTED Mon Mar 10 22:58:32 2003 From: mickael.remond@REDACTED (Mickael Remond) Date: Mon, 10 Mar 2003 22:58:32 +0100 Subject: Very minor patch Message-ID: <20030310215831.GA4919@erlang.dyndns.org> Hello, This is a very minor patch but it prevented from generating the Erlang 9.1 new RPM, with a wrong dependancy to /usr/bin/sh instead of /bin/sh. So here it is. -- Micka?l R?mond -------------- next part -------------- diff -urN otp_src_R9B-1/lib/observer/priv/bin/etop otp_src_R9B-1b/lib/observer/priv/bin/etop --- otp_src_R9B-1/lib/observer/priv/bin/etop 2002-10-03 00:36:08.000000000 +0200 +++ otp_src_R9B-1b/lib/observer/priv/bin/etop 2003-03-09 10:49:59.000000000 +0100 @@ -1,4 +1,4 @@ -#!/usr/bin/sh +#!/bin/sh NAME="etop" erl -sname $NAME -hidden -s etop -s erlang halt -output text $@ diff -urN otp_src_R9B-1/lib/observer/priv/bin/getop otp_src_R9B-1b/lib/observer/priv/bin/getop --- otp_src_R9B-1/lib/observer/priv/bin/getop 2002-10-03 00:36:09.000000000 +0200 +++ otp_src_R9B-1b/lib/observer/priv/bin/getop 2003-03-09 10:50:05.000000000 +0100 @@ -1,4 +1,4 @@ -#!/usr/bin/sh +#!/bin/sh NAME="etop" erl -sname $NAME -noinput -hidden -s etop -s erlang halt $@ From thierry@REDACTED Mon Mar 10 23:04:41 2003 From: thierry@REDACTED (Thierry Mallard) Date: Mon, 10 Mar 2003 23:04:41 +0100 Subject: side note In-Reply-To: <20030310215831.GA4919@erlang.dyndns.org> References: <20030310215831.GA4919@erlang.dyndns.org> Message-ID: <20030310220441.GB2751@hobbes.local.vawis.net> Also, if /usr/bin/sh is mandatory on some distributions, we can use "#!/usr/bin/env sh" instead ... but then again, let's hope env is in /usr/bin everywhere.. ;-) On Mon, Mar 10, 2003 at 10:58:32PM +0100, Mickael Remond wrote: > Hello, > > This is a very minor patch but it prevented from generating the Erlang > 9.1 new RPM, with a wrong dependancy to /usr/bin/sh instead of /bin/sh. > > So here it is. > > -- > Micka?l R?mond > diff -urN otp_src_R9B-1/lib/observer/priv/bin/etop otp_src_R9B-1b/lib/observer/priv/bin/etop > --- otp_src_R9B-1/lib/observer/priv/bin/etop 2002-10-03 00:36:08.000000000 +0200 > +++ otp_src_R9B-1b/lib/observer/priv/bin/etop 2003-03-09 10:49:59.000000000 +0100 > @@ -1,4 +1,4 @@ > -#!/usr/bin/sh > +#!/bin/sh > > NAME="etop" > erl -sname $NAME -hidden -s etop -s erlang halt -output text $@ > diff -urN otp_src_R9B-1/lib/observer/priv/bin/getop otp_src_R9B-1b/lib/observer/priv/bin/getop > --- otp_src_R9B-1/lib/observer/priv/bin/getop 2002-10-03 00:36:09.000000000 +0200 > +++ otp_src_R9B-1b/lib/observer/priv/bin/getop 2003-03-09 10:50:05.000000000 +0100 > @@ -1,4 +1,4 @@ > -#!/usr/bin/sh > +#!/bin/sh > > NAME="etop" > erl -sname $NAME -noinput -hidden -s etop -s erlang halt $@ -- Thierry Mallard http://vawis.net From thierry@REDACTED Mon Mar 10 23:07:13 2003 From: thierry@REDACTED (Thierry Mallard) Date: Mon, 10 Mar 2003 23:07:13 +0100 Subject: side note In-Reply-To: <20030310220441.GB2751@hobbes.local.vawis.net> References: <20030310215831.GA4919@erlang.dyndns.org> <20030310220441.GB2751@hobbes.local.vawis.net> Message-ID: <20030310220713.GC2751@hobbes.local.vawis.net> On Mon, Mar 10, 2003 at 11:04:41PM +0100, Thierry Mallard wrote: > Also, if /usr/bin/sh is mandatory on some distributions, we can > use "#!/usr/bin/env sh" instead and of course it's /bin/env which seems the official location.. *grumble* -- Thierry Mallard http://vawis.net From kent@REDACTED Tue Mar 11 00:52:13 2003 From: kent@REDACTED (Kent Boortz) Date: 11 Mar 2003 00:52:13 +0100 Subject: Very minor patch In-Reply-To: <20030310215831.GA4919@erlang.dyndns.org> References: <20030310215831.GA4919@erlang.dyndns.org> Message-ID: Mickael Remond writes: > This is a very minor patch but it prevented from generating the Erlang > 9.1 new RPM, with a wrong dependancy to /usr/bin/sh instead of /bin/sh. Thank you for the patch, it is merged into the R9B source, kent From kent@REDACTED Tue Mar 11 15:26:58 2003 From: kent@REDACTED (Kent Boortz) Date: 11 Mar 2003 15:26:58 +0100 Subject: [PATCH] SNMP: OTP MIBs and ucd-snmp In-Reply-To: <3E26DA8D014C7363@mel-rta9.wanadoo.fr> References: <3E26DA8D014C7363@mel-rta9.wanadoo.fr> Message-ID: Pascal Brisset writes: > Version 4.2.1 of the popular UCD SNMP tools (snmpwalk etc) > fail to parse some OTP MIBs. Fixes can be found below. > > Most of the patches are for obvious typos; someone please > check whether the changes to IMPORTS clauses are correct. The sasl changes are merged into the source, the Eva changes are recorded into our internal bug tracking system (OTP-4658). Thank you for the patch, kent From vlad_dumitrescu@REDACTED Tue Mar 11 21:37:44 2003 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Tue, 11 Mar 2003 21:37:44 +0100 Subject: gen_server patches Message-ID: Hello, I have looked inside gen_server, and discovered some very minor things that could be done better: calls to apply/3 that can be replaced with Mod:Fun(Args) and also replacing references to gen_server with ?MODULE (so that related new behaviours can be more easily generated). I also have implemented the "layered gen_server" I mentioned on erlang-questions, both backwards compatible (using process dictionary) and as a new behaviour, but I am not sure if it's right to send them to you here, before in some way finding out if this is a useful improvement. best regards, Vlad -------------- next part -------------- A non-text attachment was scrubbed... Name: simple.diff Type: application/octet-stream Size: 2619 bytes Desc: not available URL: From vlad_dumitrescu@REDACTED Wed Mar 12 06:53:55 2003 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Wed, 12 Mar 2003 06:53:55 +0100 Subject: gen_fsm patch Message-ID: Hi again, same thing as for gen_server, but for gen_fsm. Not big things, but maybe useful. regards, Vlad -------------- next part -------------- A non-text attachment was scrubbed... Name: gen_fsm.diff Type: application/octet-stream Size: 2782 bytes Desc: not available URL: From vances@REDACTED Thu Mar 13 21:40:45 2003 From: vances@REDACTED (Vance Shipley) Date: Thu, 13 Mar 2003 15:40:45 -0500 Subject: multicast support Message-ID: <20030313204045.GH30349@frogman.motivity.ca> The (undocumented) gen_udp options gen_udp add_membership and drop_membership do not work simply because they were left out of the list of allowable options. The following patch against R9B-1 is tested and working: $ diff inet.erl inet.erl.dist 373,374c373 < broadcast, dontroute, multicast_if, multicast_ttl, multicast_loop, < add_membership, drop_membership]. --- > broadcast, dontroute, multicast_if, multicast_ttl, multicast_loop]. This, along with another bug, were previously reported by Carlos : http://www.erlang.org/ml-archive/erlang-questions/200112/msg00068.html -Vance Vance Shipley Motivity Telecom Inc. +1 519 240 3684 vances@REDACTED From vances@REDACTED Fri Mar 14 06:11:22 2003 From: vances@REDACTED (Vance Shipley) Date: Fri, 14 Mar 2003 00:11:22 -0500 Subject: asn1: erroneous documented value Message-ID: <20030314051122.GA51831@frogman.motivity.ca> The User's Guide for the asn1 module erroneously refers to asn1_NOEXTVALUE when the value actually used is asn1_NOVALUE. Here is a diff from R9B-1: diff ./lib/asn1-1.4.1/doc/html/asn1_ug.html ./lib/asn1-1.4.1/doc/html/asn1_ug.html.dist 814c814 <
-record('SExt',{a,b=asn1_NOVALUE}).
---
> 
-record('SExt',{a,b=asn1_NOEXTVALUE}).
818c818
<         component if present and otherwise the value asn1_NOVALUE.
---
>         component if present and otherwise the value asn1_NOEXTVALUE.



	-Vance

Vance Shipley
Motivity Telecom Inc.
+1 519 240 3684
vances@REDACTED


From raimo.niskanen@REDACTED  Fri Mar 14 13:51:48 2003
From: raimo.niskanen@REDACTED (Raimo Niskanen)
Date: Fri, 14 Mar 2003 13:51:48 +0100
Subject: gen_server patches
References: 
Message-ID: 

Your patch has been accepted for the next R9 release.

/ Raimo Niskanen, Erlang/OTP



Vlad Dumitrescu wrote:
> Hello,
> 
> I have looked inside gen_server, and discovered some very minor things that
> could be done better: calls to apply/3 that can be replaced with
> Mod:Fun(Args) and also replacing references to gen_server with ?MODULE (so
> that related new behaviours can be more easily generated).
> 
> I also have implemented the "layered gen_server" I mentioned on
> erlang-questions, both backwards compatible (using process dictionary) and
> as a new behaviour, but I am not sure if it's right to send them to you
> here, before in some way finding out if this is a useful improvement.
> 
> best regards,
> Vlad



From raimo.niskanen@REDACTED  Fri Mar 14 13:52:12 2003
From: raimo.niskanen@REDACTED (Raimo Niskanen)
Date: Fri, 14 Mar 2003 13:52:12 +0100
Subject: gen_fsm patch
References: 
Message-ID: 

Your patch has been accepted for the next R9 release.

/ Raimo Niskanen, Erlang/OTP



Vlad Dumitrescu wrote:
> Hi again,
> 
> same thing as for gen_server, but for gen_fsm. Not big things, but maybe
> useful.
> 
> regards,
> Vlad
> 



From raimo.niskanen@REDACTED  Fri Mar 14 13:52:50 2003
From: raimo.niskanen@REDACTED (Raimo Niskanen)
Date: Fri, 14 Mar 2003 13:52:50 +0100
Subject: multicast support
References: <20030313204045.GH30349@frogman.motivity.ca>
Message-ID: 

Your patch has been accepted for the next R9 release.

/ Raimo Niskanen, Erlang/OTP



Vance Shipley wrote:
> 
> The (undocumented) gen_udp options gen_udp add_membership and drop_membership 
> do not work simply because they were left out of the list of allowable options.
> The following patch against R9B-1 is tested and working:
> 
> 
> $ diff inet.erl inet.erl.dist
> 373,374c373
> <      broadcast, dontroute, multicast_if, multicast_ttl, multicast_loop,
> <      add_membership, drop_membership].
> ---
> 
>>     broadcast, dontroute, multicast_if, multicast_ttl, multicast_loop].
> 
> 
> 
> This, along with another bug, were previously reported by Carlos :
> 
> 
>    http://www.erlang.org/ml-archive/erlang-questions/200112/msg00068.html
> 
> 
>       -Vance
> 
> 
> Vance Shipley
> Motivity Telecom Inc.
> +1 519 240 3684
> vances@REDACTED



From raimo.niskanen@REDACTED  Fri Mar 14 14:01:00 2003
From: raimo.niskanen@REDACTED (Raimo Niskanen)
Date: Fri, 14 Mar 2003 14:01:00 +0100
Subject: multicast support
References: <20030313204045.GH30349@frogman.motivity.ca>
Message-ID: 

Carlos's patch has also been accepted for the next R9 release.

/ Raimo Niskanen, Erlang/OTP



Vance Shipley wrote:
> 
> The (undocumented) gen_udp options gen_udp add_membership and drop_membership 
> do not work simply because they were left out of the list of allowable options.
> The following patch against R9B-1 is tested and working:
> 
> 
> $ diff inet.erl inet.erl.dist
> 373,374c373
> <      broadcast, dontroute, multicast_if, multicast_ttl, multicast_loop,
> <      add_membership, drop_membership].
> ---
> 
>>     broadcast, dontroute, multicast_if, multicast_ttl, multicast_loop].
> 
> 
> 
> This, along with another bug, were previously reported by Carlos :
> 
> 
>    http://www.erlang.org/ml-archive/erlang-questions/200112/msg00068.html
> 
> 
>       -Vance
> 
> 
> Vance Shipley
> Motivity Telecom Inc.
> +1 519 240 3684
> vances@REDACTED



From bertil.karlsson@REDACTED  Tue Mar 18 12:00:34 2003
From: bertil.karlsson@REDACTED (Bertil Karlsson)
Date: Tue, 18 Mar 2003 12:00:34 +0100
Subject: asn1:  erroneous documented value
References: <20030314051122.GA51831@frogman.motivity.ca>
Message-ID: <3E76FC52.2020303@uab.ericsson.se>

It's correct that the documentation is false. Thank you for commenting 
this error!
The atom asn1_NOEXTVALUE has been removed since R6B, unfortunately we 
have missed to update the documentation. However, we think that the 
behaviour of the compiler is correct. The new documentation will be:
...
1.4.14 Notes about Extendability for SEQUENCE and SET

When a SEQUENCE or SET contains an extension marker and extension 
components like this:

SExt ::= SEQUENCE {
            a INTEGER,
            ...,
            b BOOLEAN }


It means that the type may get more components in newer versions of the 
ASN.1 spec. In this case it has got a new component b. Thus, incoming 
messages that will be decoded may have more or fever components than 
this one.

The component b will be treated as an original component when encoding a 
message. In this case, as it is not an optional element, it must be encoded.

During decoding the b field of the record will get the decoded value of 
the b component if present and otherwise the value asn1_NOVALUE.
...

/Bertil Karlsson

Vance Shipley wrote:
> The User's Guide for the asn1 module erroneously refers to asn1_NOEXTVALUE
> when the value actually used is asn1_NOVALUE.
> 
> Here is a diff from R9B-1:
> 
>  diff  ./lib/asn1-1.4.1/doc/html/asn1_ug.html ./lib/asn1-1.4.1/doc/html/asn1_ug.html.dist
> 814c814
> < 
-record('SExt',{a,b=asn1_NOVALUE}).
> ---
> 
>>
-record('SExt',{a,b=asn1_NOEXTVALUE}).
> 
> 818c818
> <         component if present and otherwise the value asn1_NOVALUE.
> ---
> 
>>        component if present and otherwise the value asn1_NOEXTVALUE.
> 
> 
> 
> 
> 	-Vance
> 
> Vance Shipley
> Motivity Telecom Inc.
> +1 519 240 3684
> vances@REDACTED


-- 
/ Bertil Karlsson



From vances@REDACTED  Fri Mar 21 00:04:37 2003
From: vances@REDACTED (Vance Shipley)
Date: Thu, 20 Mar 2003 18:04:37 -0500
Subject: gen_server:format_status/2 only works with registered processes
In-Reply-To: <20030320213604.GZ25555@frogman.motivity.ca>
References: <20030320213604.GZ25555@frogman.motivity.ca>
Message-ID: <20030320230437.GA30323@frogman.motivity.ca>


OK, I found the problem.  The following patch to lists.erl does it:

*** lists.erl.dist      Thu Mar 20 17:56:16 2003
--- lists.erl   Thu Mar 20 17:58:26 2003
***************
*** 280,285 ****
--- 280,286 ----
  thing_to_list(X) when integer(X) -> integer_to_list(X);
  thing_to_list(X) when float(X)         -> float_to_list(X);
  thing_to_list(X) when atom(X)  -> atom_to_list(X);
+ thing_to_list(X) when pid(X)   -> pid_to_list(X);
  thing_to_list(X) when list(X)  -> X.          %Assumed to be a string
  
  %% flatten(List)



	-Vance

Vance Shipley
Motivity Telecom Inc.
+1 519 240 3684
vances@REDACTED

On Thu, Mar 20, 2003 at 04:36:04PM -0500, Vance Shipley wrote:
}  
}  Now the problem is that, at least in R9B-[0|1], this only works if the
}  process is registered!  In the following example I am peeking at a 
}  couple gen_server processes the system runs.  I am referring to each
}  by PID but the process which is not registerd fails.
...
}  Error in process <0.25.0> with exit value: {function_clause,[{lists,thing_to_list,[<0.23.0>]},{lists,flatmap,2},{gen_server,format_status,2},{erl_eval,expr,3},{erl_eval,exprs,4},{shell,eval_loop,2}]}
}  


From raimo.niskanen@REDACTED  Mon Mar 24 13:52:21 2003
From: raimo.niskanen@REDACTED (Raimo Niskanen)
Date: Mon, 24 Mar 2003 13:52:21 +0100
Subject: gen_server:format_status/2 only works with registered processes
References: <20030320213604.GZ25555@frogman.motivity.ca>, <20030320230437.GA30323@frogman.motivity.ca>
Message-ID: 

Vance Shipley wrote:
> OK, I found the problem.  The following patch to lists.erl does it:
> 
> *** lists.erl.dist      Thu Mar 20 17:56:16 2003
> --- lists.erl   Thu Mar 20 17:58:26 2003
> ***************
> *** 280,285 ****
> --- 280,286 ----
>   thing_to_list(X) when integer(X) -> integer_to_list(X);
>   thing_to_list(X) when float(X)         -> float_to_list(X);
>   thing_to_list(X) when atom(X)  -> atom_to_list(X);
> + thing_to_list(X) when pid(X)   -> pid_to_list(X);
>   thing_to_list(X) when list(X)  -> X.          %Assumed to be a string
>   
>   %% flatten(List)
> 

I am sorry, I do not think that is the correct(tm) solution. It seems 
that lists:thing_to_list/1 handles items that look the same in a 
parseable Erlang source file as when printed. Some types that are 
missing are: pid(), port(), reference(), all not parseable from their 
string representation.

So I think it is gen_server:format_status/2 that is faulty, trying to 
call lists:concat/1 with a pid(). See the diff following.

/ Raimo Niskanen, Erlang/OTP




Note that the following diff might not patch as it is since it is not 
from the R9B-1 version of the file.

***************
*** 670,676 ****
   %%-----------------------------------------------------------------
   format_status(Opt, StatusData) ->
       [PDict, SysState, Parent, Debug, [Name, State, Mod, _Time]] = 
StatusData,
!     Header = lists:concat(["Status for generic server ", Name]),
       Log = sys:get_debug(log, Debug, []),
       Specfic =
         case erlang:function_exported(Mod, format_status, 2) of
--- 670,681 ----
   %%-----------------------------------------------------------------
   format_status(Opt, StatusData) ->
       [PDict, SysState, Parent, Debug, [Name, State, Mod, _Time]] = 
StatusData,
!     NameTag = if pid(Name) ->
!                     pid_to_list(Name);
!                atom(Name) ->
!                     Name
!             end,
!     Header = lists:concat(["Status for generic server ", NameTag]),
       Log = sys:get_debug(log, Debug, []),
       Specfic =
         case erlang:function_exported(Mod, format_status, 2) of


> 
> 
> 	-Vance
> 
> Vance Shipley
> Motivity Telecom Inc.
> +1 519 240 3684
> vances@REDACTED
> 
> On Thu, Mar 20, 2003 at 04:36:04PM -0500, Vance Shipley wrote:
> }  
> }  Now the problem is that, at least in R9B-[0|1], this only works if the
> }  process is registered!  In the following example I am peeking at a 
> }  couple gen_server processes the system runs.  I am referring to each
> }  by PID but the process which is not registerd fails.
> ...
> }  Error in process <0.25.0> with exit value: {function_clause,[{lists,thing_to_list,[<0.23.0>]},{lists,flatmap,2},{gen_server,format_status,2},{erl_eval,expr,3},{erl_eval,exprs,4},{shell,eval_loop,2}]}
> }  



From thomasl_erlang@REDACTED  Tue Mar 25 22:47:32 2003
From: thomasl_erlang@REDACTED (Thomas Lindgren)
Date: Tue, 25 Mar 2003 13:47:32 -0800 (PST)
Subject: missing pre_loaded module?
Message-ID: <20030325214732.64076.qmail@web13310.mail.yahoo.com>


Looking at init.erl in R9B0 and R9B1, there is a call
to lists:filter (line 497), but lists is not in
erlang:pre_loaded(). Is this okay?

Best,
Thomas


__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com


From peter@REDACTED  Tue Mar 25 22:55:28 2003
From: peter@REDACTED (Peter H|gfeldt)
Date: Tue, 25 Mar 2003 22:55:28 +0100 (MET)
Subject: missing pre_loaded module?
In-Reply-To: <20030325214732.64076.qmail@web13310.mail.yahoo.com>
Message-ID: 


On Tue, 25 Mar 2003, Thomas Lindgren wrote:

It has been that ugly for a long time, and I got very confused when I saw
it the first time. It is however ok at the stage where lists:filter/2 is
called. It should be replaced. 

/Peter

> 
> Looking at init.erl in R9B0 and R9B1, there is a call
> to lists:filter (line 497), but lists is not in
> erlang:pre_loaded(). Is this okay?
> 
> Best,
> Thomas
> 
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
> http://platinum.yahoo.com
> 



From thomasl_erlang@REDACTED  Wed Mar 26 19:51:06 2003
From: thomasl_erlang@REDACTED (Thomas Lindgren)
Date: Wed, 26 Mar 2003 10:51:06 -0800 (PST)
Subject: erl_pp fixes
Message-ID: <20030326185106.16197.qmail@web13308.mail.yahoo.com>

erl_pp misbehaves for fun:s.

1. for a "fun f/1" with Extra info, it fails to print
(INVALID-FORM). This has been fixed.

2. the Extra info is printed with ~p, which means the
printed data can't be read back when line breaking
occurs. This has been fixed (the cost is that printing
the Extra may overflow the line).

(For future work, one might possibly not need to see
the Extra at all.)

3. I also made funs print like case/if/..., since
that's the way they normally are indented. The same
for 'query ... end' expressions.

The new code successfully prettyprints previously
problematic funs. I haven't tried 'query'.

Enclosed is a manual patch (to show what was done) and
a new erl_pp.erl for convenience.

Best,
Thomas

__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: erl_pp_patch.txt
URL: 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: erl_pp.erl
Type: application/octet-stream
Size: 14648 bytes
Desc: erl_pp.erl
URL: 

From cpressey@REDACTED  Fri Mar 28 07:16:07 2003
From: cpressey@REDACTED (Chris Pressey)
Date: Fri, 28 Mar 2003 00:16:07 -0600
Subject: regexp: how to match a null string?
In-Reply-To: <20030327185453.5170cfc8.cpressey@catseye.mb.ca>
References: <20030327185453.5170cfc8.cpressey@catseye.mb.ca>
Message-ID: <20030328001607.61f72a7e.cpressey@catseye.mb.ca>

On Thu, 27 Mar 2003 18:54:53 -0600
Chris Pressey  wrote:

> In my mind, "^(.*)$" should match a null string.
> It doesn't match any characters, but it's still a valid match.
> But because regexp deals only in terms of characters matched -
> there's no way to tell!

In lieu of a better solution... attached is a patch to regexp.erl which
adds the function

  is_match(String, RegExp) -> true | false | {error, Reason}

-Chris

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: regexp.patch
URL: 

From Chandrashekhar.Mullaparthi@REDACTED  Fri Mar 28 09:55:25 2003
From: Chandrashekhar.Mullaparthi@REDACTED (Chandrashekhar Mullaparthi)
Date: Fri, 28 Mar 2003 08:55:25 -0000
Subject: Patch to ssl_broker.erl
Message-ID: 

Here is a patch to ssl_broker.erl 

1224c1224,1226
<                       lists:keyreplace(Key, 1, Acc, {Key, Val}) 
---
>                       lists:keyreplace(Key, 1, Acc, {Key, Val}) ;
>                  (binary, Acc) ->
>                       lists:keyreplace(mode, 1, Acc, {mode, binary})

cheers
Chandru



 NOTICE AND DISCLAIMER:
This email (including attachments) is confidential.  If you have received
this email in error please notify the sender immediately and delete this
email from your system without copying or disseminating it or placing any
reliance upon its contents.  We cannot accept liability for any breaches of
confidence arising through use of email.  Any opinions expressed in this
email (including attachments) are those of the author and do not necessarily
reflect our opinions.  We will not accept responsibility for any commitments
made by our employees outside the scope of our business.  We do not warrant
the accuracy or completeness of such information.



From peter@REDACTED  Fri Mar 28 11:20:13 2003
From: peter@REDACTED (Peter H|gfeldt)
Date: Fri, 28 Mar 2003 11:20:13 +0100 (MET)
Subject: Patch to ssl_broker.erl
In-Reply-To: 
Message-ID: 


Thanks. I will include it in the coming ssl-3.0.

/Peter

On Fri, 28 Mar 2003, Chandrashekhar Mullaparthi wrote:

> Here is a patch to ssl_broker.erl 
> 
> 1224c1224,1226
> <                       lists:keyreplace(Key, 1, Acc, {Key, Val}) 
> ---
> >                       lists:keyreplace(Key, 1, Acc, {Key, Val}) ;
> >                  (binary, Acc) ->
> >                       lists:keyreplace(mode, 1, Acc, {mode, binary})
> 
> cheers
> Chandru
> 
> 
> 
>  NOTICE AND DISCLAIMER:
> This email (including attachments) is confidential.  If you have received
> this email in error please notify the sender immediately and delete this
> email from your system without copying or disseminating it or placing any
> reliance upon its contents.  We cannot accept liability for any breaches of
> confidence arising through use of email.  Any opinions expressed in this
> email (including attachments) are those of the author and do not necessarily
> reflect our opinions.  We will not accept responsibility for any commitments
> made by our employees outside the scope of our business.  We do not warrant
> the accuracy or completeness of such information.
>