diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2012-12-16 16:00:18 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2012-12-16 17:29:01 +0900 |
| commit | b9da9d4ed3ef9fe7b1488506555e3605aeb500ed (patch) | |
| tree | f2b61ce65623ec222428360fe827b2a62ab9bbae /src/WebSocketSessionMan.cc | |
| parent | 04586f50b17317ef257f6d3f81190021c93ad5ea (diff) | |
Use 64 bits random bytes as GID
This change replaces the current 64 bit sequential GID with 64 bits
random bytes GID in an attempt to support persistent GID. Internally,
the GID is stored as uint64_t. For human representation and RPC
interface, GID is represented as 16 bytes hex string. For console
readout, 16 bytes are too long, so it is abbreviated to first 6 bytes.
When querying GID in RPC calls, user can speicfy the prefix of GID as
long as the prefix is shared by more than 1 GID entries.
Diffstat (limited to 'src/WebSocketSessionMan.cc')
| -rw-r--r-- | src/WebSocketSessionMan.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/WebSocketSessionMan.cc b/src/WebSocketSessionMan.cc index 15f6c935..26771bc4 100644 --- a/src/WebSocketSessionMan.cc +++ b/src/WebSocketSessionMan.cc @@ -66,7 +66,7 @@ void WebSocketSessionMan::addNotification dict->put("jsonrpc", "2.0"); dict->put("method", method); SharedHandle<Dict> eventSpec = Dict::g(); - eventSpec->put("gid", util::itos(group->getGID())); + eventSpec->put("gid", GroupId::toHex((group->getGID()))); SharedHandle<List> params = List::g(); params->append(eventSpec); dict->put("params", params); |
