Skip to content

Commit

Permalink
[dsme] Make dsme message type identifiers unique. JB#38500
Browse files Browse the repository at this point in the history
There were non-unique dsme message type identifiers:
  0x00000320 = SET_THERMAL_STATUS = BATTERY_EMPTY_IND
  0x00000506 = PROCESSWD_PING = PROCESSWD_PONG

Add how-to instructions in every header that defines message types to
make it less likely that similar problems arise again in the future.

Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
  • Loading branch information
spiiroin committed Mar 29, 2018
1 parent 5db3ab7 commit 6649493
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion rpm/libiphb.spec
Expand Up @@ -11,7 +11,7 @@ Requires(postun): /sbin/ldconfig
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(dbus-glib-1)
BuildRequires: pkgconfig(dsme)
BuildRequires: pkgconfig(dsme) >= 0.65.0
BuildRequires: pkgconfig(mce) >= 1.12.3

%description
Expand Down
12 changes: 12 additions & 0 deletions src/iphb_internal.h
Expand Up @@ -99,6 +99,18 @@ struct _iphb_req_t {


enum {
/* NOTE: dsme message types are defined in:
* - libdsme
* - libiphb
* - dsme
*
* When adding new message types
* 1) uniqueness of the identifiers must be
* ensured accross all these source trees
* 2) the dsmemsg_id_name() function in libdsme
* must be made aware of the new message type
*/

DSME_MSG_ENUM(DSM_MSGTYPE_WAIT, 0x00000600),
DSME_MSG_ENUM(DSM_MSGTYPE_WAKEUP, 0x00000601),
};
Expand Down

0 comments on commit 6649493

Please sign in to comment.