Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Iker Martín Álvarez
Proteo
Commits
3168c50b
Commit
3168c50b
authored
Oct 08, 2024
by
iker_martin
Browse files
Add '\0' to empty port names
parent
c040e9e3
Changes
2
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
3168c50b
...
...
@@ -5,3 +5,6 @@
/Codes/build/
/Codes/MaM/build
/Codes/SAM/build
#Ignore Results files
/Results/*
Codes/MaM/spawn_methods/PortService.c
View file @
3168c50b
...
...
@@ -63,6 +63,7 @@ void open_port(Spawn_ports *spawn_port, int open_port, int open_service)
}
}
else
{
spawn_port
->
port_name
=
malloc
(
1
);
spawn_port
->
port_name
[
0
]
=
'\0'
;
}
}
...
...
@@ -122,6 +123,7 @@ void discover_remote_port(int id_group, Spawn_ports *spawn_port) {
if
(
spawn_port
->
remote_port
==
NULL
)
{
spawn_port
->
remote_port
=
(
char
*
)
malloc
(
MPI_MAX_PORT_NAME
*
sizeof
(
char
));
if
(
id_group
==
MAM_SERVICE_UNNEEDED
)
{
spawn_port
->
remote_port
[
0
]
=
'\0'
;
}
}
if
(
id_group
==
MAM_SERVICE_UNNEEDED
)
{
return
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment