fix issue #174 - add 'from' field to mqtt_message record

This commit is contained in:
Feng Lee 2015-06-14 08:24:17 +08:00
parent b152d6ba2d
commit 985fbde26f
1 changed files with 3 additions and 8 deletions

View File

@ -56,17 +56,12 @@
-type mqtt_msgid() :: undefined | 1..16#ffff. -type mqtt_msgid() :: undefined | 1..16#ffff.
-record(mqtt_message, { -record(mqtt_message, {
%% topic is first for message may be retained topic :: binary(), %% topic published to
topic :: binary(), from :: mqtt_clientid() | atom(), %% from clientid
%% clientid from
from :: binary() | atom(),
%% sender pid ??
sender :: pid(),
qos = ?QOS_0 :: mqtt_qos(), qos = ?QOS_0 :: mqtt_qos(),
retain = false :: boolean(), retain = false :: boolean(),
dup = false :: boolean(), dup = false :: boolean(),
%% $SYS message flag sys = false :: boolean(), %% $SYS flag
sys = false :: boolean(),
msgid :: mqtt_msgid(), msgid :: mqtt_msgid(),
payload :: binary() payload :: binary()
}). }).