Toggle navigation
Toggle navigation
This project
Loading...
Sign in
홍길동
/
onos
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
alshabib
2014-10-20 14:52:04 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d796391bda887cc1b54c9c4d05d5249ad576ee7b
d796391b
1 parent
82c4fc48
fix for switch connecting
Change-Id: If4e16a692f79f94289bd0df4a0ffbb3dd828e246
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
7 deletions
openflow/ctl/src/main/java/org/onlab/onos/openflow/controller/impl/OFChannelHandler.java
openflow/ctl/src/main/java/org/onlab/onos/openflow/controller/impl/OFChannelHandler.java
View file @
d796391
...
...
@@ -457,9 +457,17 @@ class OFChannelHandler extends IdleStateAwareChannelHandler {
// will never be called. We override processOFMessage
}
@Override
void
processOFMessage
(
OFChannelHandler
h
,
OFMessage
m
)
throws
IOException
,
SwitchStateException
{
if
(
h
.
sw
.
isDriverHandshakeComplete
())
{
moveToActive
(
h
);
}
if
(
m
.
getType
()
==
OFType
.
ECHO_REQUEST
)
{
processOFEchoRequest
(
h
,
(
OFEchoRequest
)
m
);
}
else
if
(
m
.
getType
()
==
OFType
.
ECHO_REPLY
)
{
...
...
@@ -470,6 +478,7 @@ class OFChannelHandler extends IdleStateAwareChannelHandler {
if
(!
h
.
sw
.
handleRoleError
((
OFErrorMsg
)
m
))
{
h
.
sw
.
processDriverHandshakeMessage
(
m
);
if
(
h
.
sw
.
isDriverHandshakeComplete
())
{
moveToActive
(
h
);
h
.
setState
(
ACTIVE
);
}
}
...
...
@@ -481,13 +490,7 @@ class OFChannelHandler extends IdleStateAwareChannelHandler {
}
else
{
h
.
sw
.
processDriverHandshakeMessage
(
m
);
if
(
h
.
sw
.
isDriverHandshakeComplete
())
{
boolean
success
=
h
.
sw
.
connectSwitch
();
if
(!
success
)
{
disconnectDuplicate
(
h
);
return
;
}
h
.
setState
(
ACTIVE
);
moveToActive
(
h
);
}
}
}
...
...
@@ -498,6 +501,16 @@ class OFChannelHandler extends IdleStateAwareChannelHandler {
throws
IOException
,
SwitchStateException
{
h
.
pendingPortStatusMsg
.
add
(
m
);
}
private
void
moveToActive
(
OFChannelHandler
h
)
{
boolean
success
=
h
.
sw
.
connectSwitch
();
h
.
setState
(
ACTIVE
);
if
(!
success
)
{
disconnectDuplicate
(
h
);
return
;
}
}
},
...
...
Please
register
or
login
to post a comment