0

我想从特定房间获取当前状态数据记录。我想有类似的东西...

get_state_data(RoomName)->
   StateData = get_record(Room),
   SateData. 

>get_state_data("someroom").

{state,"8799879","conference.chat.dev.com",
                                            "conference.chat.dev.com",mod_muc_odbc,
                                            {muc,muc_create,muc_admin,
                                             muc_create},
                                            {jid,"8799879",
                                             "conference.chat.dev.com",[],
                                             "8799879",
                                             "conference.chat.dev.com",[]},
                                            {config,"567567","asdfa","asdf",
                                             "sdfa","sdfa","sdf",true,true,
                                             true,anyone,true,true,true,true,
                                             true,true,false,true,false,false,
                                             false,[],true,true,1800,200,
                                             false,
                                             {0,nil}},
                                            {dict,3,16,16,8,80,48,
                                             {[],[],[],[],[],[],[],[],[],[],
                                              [],[],[],[],[],[]},
                                             {{[],[],[],[],[],[],[],[],......
4

1 回答 1

0

我能够通过使用这种方法找到记录

[{ ,{ ,_},Pid}] = mnesia:dirty_read(muc_online_room, {"8799879", "conference.chat.dev.com"})。

get_room_state(Room_pid) -> {ok, R} = gen_fsm:sync_send_all_state_event(Room_pid, get_state), R。

于 2014-09-08T11:28:03.577 回答