On Sun, Aug 16, 2009 at 5:27 AM, Jan Jacobs <hpjcon@mweb.co.za> wrote:
Hi,

I picked up a problem with starting Yaws in embedded mode.
This is present in both the the source tar and the windows installer.

In short the problem is as follows:
I call yaws:start_embedded from my application.
It calls setup_sconf to convert the List of config to #sconf{}and then
it call yaws_api:setconf(GC, [SC]) to set the fonfig.
In yaws_api:setconf it calls yaws_config:verify_upgrade_args(GC0,
Groups0) which requires Groups0 to be a list of lists.

I changed the yaws_api:setconf(GC, [[SC]]) in order to start embedded yaws.

I just want to find out if it is a problem or am I giving it incorrect
configuration information?

If you're saying that you changed the yaws_api.erl source as shown in the 1.84 patch below I sent out a few weeks ago, then yes, that's the correct fix to make.

--steve

diff --git a/src/yaws.erl b/src/yaws.erl
index bc480b0..964f5e0 100644
--- a/src/yaws.erl
+++ b/src/yaws.erl
@@ -140,7 +140,7 @@ start_embedded(DocRoot, SL, GL, Id) when is_list(DocRoot),is_list(SL),is_list(GL
     GC = setup_gconf(GL, yaws_config:make_default_gconf(false, Id)),
     SC = setup_sconf(DocRoot, #sconf{}, SL),
     yaws_config:add_yaws_soap_srv(GC),
-    yaws_api:setconf(GC, [SC]).
+    yaws_api:setconf(GC, [[SC]]).
 
 add_server(DocRoot, SL) when is_list(DocRoot),is_list(SL) ->
     SC = setup_sconf(DocRoot, #sconf{}, SL),