Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
polyorb-hi-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TASTE
polyorb-hi-c
Commits
c8b6a809
PL1
Commit
c8b6a809
authored
5 years ago
by
Jerome Hugues
Browse files
Options
Downloads
Patches
Plain Diff
* Reuse existing port in case of name conflict
For openaadl/ocarina#251
parent
8eaf6250
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/po_hi_main.c
+16
-1
16 additions, 1 deletion
src/po_hi_main.c
with
16 additions
and
1 deletion
src/po_hi_main.c
+
16
−
1
View file @
c8b6a809
...
...
@@ -8,6 +8,7 @@
* Copyright (C) 2010-2020 ESA & ISAE.
*/
#include
<string.h>
#include
<deployment.h>
/* included files from the generated code */
...
...
@@ -310,7 +311,7 @@ int __po_hi_initialize ()
#include
<imaspex.h>
__po_hi_port_kind_t
pkind
;
__po_hi_port_t
tmp
;
__po_hi_port_t
tmp
,
tmp2
;
__po_hi_node_t
tmpnode
;
__po_hi_node_t
mynode
;
long
int
portno
;
...
...
@@ -422,6 +423,20 @@ int __po_hi_initialize ()
__PO_HI_DEBUG_CRITICAL
(
"[MAIN] Cannot open port %d, name=%s, return=%ld
\n
"
,
tmp
,
__po_hi_transport_get_model_name
(
tmp
),
portno
);
// In the case of duplicate AIR port, we iterate on the
// list of ports already initialized
for
(
tmp2
=
0
;
tmp2
<
tmp
;
tmp2
++
)
{
__PO_HI_DEBUG_CRITICAL
(
"Testing %d
\n
"
,
tmp2
);
if
(
!
strcmp
(
__po_hi_transport_get_model_name
(
tmp2
),
__po_hi_transport_get_model_name
(
tmp
)))
{
__PO_HI_DEBUG_CRITICAL
(
"[MAIN] Reuse port %d, from name=%s
\n
"
,
tmp2
,
__po_hi_transport_get_model_name
(
tmp2
),
portno
);
__po_hi_transport_air_port_init
(
tmp
,
__po_hi_transport_air_get_port
(
tmp2
));
break
;
}
}
}
else
{
__po_hi_transport_air_port_init
(
tmp
,
portno
);
__DEBUGMSG
(
"[MAIN] Port %d (name=%s) created, identifier = %ld
\n
"
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment