Handle sctp socket shutdown event
git-svn-id: http://yate.null.ro/svn/yate/trunk@4381 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
f214a2b733
commit
468d6a6cec
|
@ -223,6 +223,10 @@ bool LKSocket::getStreams(int& in, int& out)
|
||||||
bool LKSocket::sctpDown(void* buf)
|
bool LKSocket::sctpDown(void* buf)
|
||||||
{
|
{
|
||||||
union sctp_notification *sn = (union sctp_notification *)buf;
|
union sctp_notification *sn = (union sctp_notification *)buf;
|
||||||
|
switch (sn->sn_header.sn_type) {
|
||||||
|
case SCTP_SHUTDOWN_EVENT:
|
||||||
|
return true;
|
||||||
|
case SCTP_ASSOC_CHANGE:
|
||||||
switch (sn->sn_assoc_change.sac_state) {
|
switch (sn->sn_assoc_change.sac_state) {
|
||||||
case SCTP_COMM_LOST:
|
case SCTP_COMM_LOST:
|
||||||
case SCTP_SHUTDOWN_COMP:
|
case SCTP_SHUTDOWN_COMP:
|
||||||
|
@ -230,12 +234,15 @@ bool LKSocket::sctpDown(void* buf)
|
||||||
case SCTP_RESTART:
|
case SCTP_RESTART:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LKSocket::sctpUp(void* buf)
|
bool LKSocket::sctpUp(void* buf)
|
||||||
{
|
{
|
||||||
union sctp_notification *sn = (union sctp_notification *)buf;
|
union sctp_notification *sn = (union sctp_notification *)buf;
|
||||||
|
if (sn->sn_header.sn_type != SCTP_ASSOC_CHANGE)
|
||||||
|
return false;
|
||||||
switch (sn->sn_assoc_change.sac_state) {
|
switch (sn->sn_assoc_change.sac_state) {
|
||||||
case SCTP_COMM_UP:
|
case SCTP_COMM_UP:
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue