File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -9,20 +9,20 @@ static void *bulk_ptr = NULL;
9
9
static const size_t bulk_len = CONFIG_BULK_BUFFER_LEN ;
10
10
11
11
static unsigned pre_send (struct message * m ) {
12
- if (m -> type & MSG_STR ) {
13
- m -> bulk_len = strlen (m -> bulk_ptr ) + 1 ;
14
- }
15
-
16
12
unsigned flags = 0 ;
17
- if (m -> type & MSG_BULK ) {
13
+ if (! IS_ERROR ( m -> type ) && m -> type & MSG_BULK ) {
18
14
flags |= IPC_BULK ;
15
+
16
+ if (m -> type & MSG_STR ) {
17
+ m -> bulk_len = strlen (m -> bulk_ptr ) + 1 ;
18
+ }
19
19
}
20
20
21
21
return flags ;
22
22
}
23
23
24
24
static error_t post_recv (error_t err , struct message * m ) {
25
- if (m -> type & MSG_BULK ) {
25
+ if (! IS_ERROR ( m -> type ) && m -> type & MSG_BULK ) {
26
26
// Received a bulk payload. We've consumed `bulk_ptr` so set NULL to it
27
27
// and reallocate the receiver buffer later.
28
28
bulk_ptr = NULL ;
You can’t perform that action at this time.
0 commit comments