anchor.diff:  	    {ok, Num};
   	{ok, Req, H, Trail} ->
   	    put(ssltrail, Trail),  %% hack hack hack
  -	    Sconf = hd(GS#gs.group),
  +	    SC = hd(GS#gs.group),
  +	    IP = case SC#sconf.access_log of
  +		     true ->
  +			 {ok, {Ip, _Port}} = ssl:peername(CliSock, SC),
  +			 Ip;
  +		     _ ->
  +			 undefined
  +		 end,
   	    Res = apply(yaws_server, Req#http_request.method, 
  -			[CliSock, GS#gs.gconf, Sconf, Req, H]),
  -	    maybe_access_log(CliSock, Sconf, Req),
  +			[CliSock, GS#gs.gconf, SC, Req, H]),
  +	    maybe_access_log(IP, SC, Req),
   	    case Res of
   		continue ->
   		    aloop(CliSock, GS, Num+1);
  
positive.code: 	done ->
  	    {ok, Num};
  	{Req, H} ->
  	    Sconf = pick_sconf(GS#gs.gconf, H, GS#gs.group),
  	    ?Debug("Sconf: ~p", [?format_record(Sconf, sconf)]),
  	    ?TC([{record, Sconf, sconf}]),
  	    ?Debug("Headers = ~p~n", [?format_record(H, headers)]),
  	    ?Debug("Request = ~p~n", [?format_record(Req, http_request)]),
  	    Res = apply(yaws_server, Req#http_request.method, 
  			[CliSock, GS#gs.gconf, Sconf, Req, H]),
  	    maybe_access_log(CliSock, Sconf, Req),
  	    case Res of
  		continue ->
  		    aloop(CliSock, GS, Num+1);
  
negative.code:     case Res of
  	ok ->
  	    ok;
  	Err when GC#gconf.debug == true ->
  	    {B2, Size} = strip(Data),
  	    yaws_debug:derror(GC, "Failed to send ~w bytes:~n~p "
  			      "on socket ~p: ~p~n",
  			      [Size, B2, S, Err]),
  	    exit(normal);
  	Err ->
  	    exit(normal)
      end.
  
  