Commits

Yuriy Netesov committed 02fada2 Draft

fix

Comments (0)

Files changed (4)

apps/kissbang/src/kiss_room_ext_srv.erl

                 end, 0, Users).
 
 inner_user_join(State, UserGuid) ->
+    log_srv:debug("on user joined game~n"),
     NewComerSex = sex_srv:get_sex(UserGuid),
     NewUsers = [{NewComerSex, UserGuid} | State#state.users],
     NewMaleParity = calculate_male_parity(NewUsers),

apps/kissbang/src/room_srv.erl

                     {reply, ok, pending, State#state{users = NewUsers}}
                 end;
         Error ->
-              {reply, Error, active, State}
+              {reply, Error, pending, State}
         end;
     
 pending(_Event, _From, State) ->

apps/kissbang/src/sex_srv.erl

 get_sex(UserGuid) ->
     gen_server:call(?SERVER, {get_sex, UserGuid}).
 
-set_sex(UserGuid, IsMale) ->
+set_sex(UserGuid, IsMale) when is_list(IsMale) ->
+    set_sex(UserGuid, list_to_atom(IsMale));
+set_sex(UserGuid, IsMale) when is_atom(IsMale) ->
     gen_server:call(?SERVER, {set_sex, UserGuid, IsMale}).
 
 async_set_sex(UserGuid, IsMale) ->

rel/reltool.config

        {lib_dirs, ["../apps", "../extern/", "../extern/mochiweb"]},
        {erts, [{mod_cond, derived}, {app_file, keep}]},
        {app_file, keep},
-       {rel, "mynode", "6",
+       {rel, "dbgnode", "6",
         [
          mnesia,
          kissbang, 
          kernel,
          stdlib
         ]},
-       {boot_rel, "mynode"},
+       {boot_rel, "dbgnode"},
        {profile, embedded},
        {incl_cond, exclude},
        {excl_archive_filters, [".*"]}, %% Do not archive built libs
        {app, xmerl, [{incl_cond, include}]},
        {app, ssl, [{incl_cond, include}]},
        {app, inets, [{incl_cond, include}]},
-       {app, mynode, [{incl_cond, include}]},	
+       {app, dbgnode, [{incl_cond, include}]},	
        {app, public_key, [{incl_cond, include}]}
       ]}.
 
-{target_dir, "mynode"}.
+{target_dir, "dbgnode"}.
 
 {overlay, [
            {mkdir, "log/sasl"},
            {copy, "files/erl", "\{\{erts_vsn\}\}/bin/erl"},
            {copy, "files/nodetool", "\{\{erts_vsn\}\}/bin/nodetool"},
-           {copy, "files/mynode", "bin/mynode"},
-           {copy, "files/mynode.cmd", "bin/mynode.cmd"},
+           {copy, "files/dbgnode", "bin/dbgnode"},
+           {copy, "files/dbgnode.cmd", "bin/dbgnode.cmd"},
            {copy, "files/start_erl.cmd", "bin/start_erl.cmd"},
            {copy, "files/install_upgrade.escript", "bin/install_upgrade.escript"},
            {copy, "files/sys.config", "releases/\{\{rel_vsn\}\}/sys.config"},