diff options
author | Luca Dariz <luca@orpolo.org> | 2023-02-12 18:03:12 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-02-12 18:29:59 +0100 |
commit | 7966b7aa0705d043a905a7617f696015a25c7446 (patch) | |
tree | 74826d2a5114795ba88d508ca51722a6137d319a /ipc | |
parent | 5fdc928d3d29fdc93ad00cea5f5c877a19013d44 (diff) | |
download | gnumach-7966b7aa0705d043a905a7617f696015a25c7446.tar.gz gnumach-7966b7aa0705d043a905a7617f696015a25c7446.tar.bz2 gnumach-7966b7aa0705d043a905a7617f696015a25c7446.zip |
fix port name size in notifications
* ipc/ipc_machdep.h: define PORT_NAME_T_SIZE_IN_BITS
* ipc/ipc_notify.c: fix port name size in notification message
templates
Message-Id: <20230212170313.1501404-6-luca@orpolo.org>
Diffstat (limited to 'ipc')
-rwxr-xr-x | ipc/ipc_machdep.h | 1 | ||||
-rw-r--r-- | ipc/ipc_notify.c | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/ipc/ipc_machdep.h b/ipc/ipc_machdep.h index 29878dc9..2871fc31 100755 --- a/ipc/ipc_machdep.h +++ b/ipc/ipc_machdep.h @@ -34,5 +34,6 @@ */ #define PORT_T_SIZE_IN_BITS (sizeof(mach_port_t)*8) +#define PORT_NAME_T_SIZE_IN_BITS (sizeof(mach_port_name_t)*8) #endif /* _IPC_IPC_MACHDEP_H_ */ diff --git a/ipc/ipc_notify.c b/ipc/ipc_notify.c index eea60116..d0b71cf2 100644 --- a/ipc/ipc_notify.c +++ b/ipc/ipc_notify.c @@ -72,7 +72,7 @@ ipc_notify_init_port_deleted(mach_port_deleted_notification_t *n) m->msgh_id = MACH_NOTIFY_PORT_DELETED; t->msgt_name = MACH_MSG_TYPE_PORT_NAME; - t->msgt_size = PORT_T_SIZE_IN_BITS; + t->msgt_size = PORT_NAME_T_SIZE_IN_BITS; t->msgt_number = 1; t->msgt_inline = TRUE; t->msgt_longform = FALSE; @@ -102,7 +102,7 @@ ipc_notify_init_msg_accepted(mach_msg_accepted_notification_t *n) m->msgh_id = MACH_NOTIFY_MSG_ACCEPTED; t->msgt_name = MACH_MSG_TYPE_PORT_NAME; - t->msgt_size = PORT_T_SIZE_IN_BITS; + t->msgt_size = PORT_NAME_T_SIZE_IN_BITS; t->msgt_number = 1; t->msgt_inline = TRUE; t->msgt_longform = FALSE; @@ -164,7 +164,7 @@ ipc_notify_init_no_senders( m->msgh_id = MACH_NOTIFY_NO_SENDERS; t->msgt_name = MACH_MSG_TYPE_INTEGER_32; - t->msgt_size = PORT_T_SIZE_IN_BITS; + t->msgt_size = 32; t->msgt_number = 1; t->msgt_inline = TRUE; t->msgt_longform = FALSE; @@ -215,7 +215,7 @@ ipc_notify_init_dead_name( m->msgh_id = MACH_NOTIFY_DEAD_NAME; t->msgt_name = MACH_MSG_TYPE_PORT_NAME; - t->msgt_size = PORT_T_SIZE_IN_BITS; + t->msgt_size = PORT_NAME_T_SIZE_IN_BITS; t->msgt_number = 1; t->msgt_inline = TRUE; t->msgt_longform = FALSE; |