提交 2efb8bc3 编写于 作者: C calin cerchez

diameterbase owner

上级 0e0ca2cb
//
// Copyright (C) 2012 Calin Cerchez
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
......
//
// Copyright (C) 2012 Calin Cerchez
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
......@@ -54,7 +56,7 @@ public:
void initialize(int stage);
void handleMessage(cMessage *msg);
virtual DiameterMessage *processMessage(DiameterMessage *msg) {}
virtual DiameterMessage *processMessage(DiameterMessage *msg) { return NULL; }
int getOutboundStreams() { return outboundStreams; }
SCTPSocket getServerSocket() { return serverSocket; }
......
//
// Copyright (C) 2012 Calin Cerchez
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
......
//
// Copyright (C) 2012 Calin Cerchez
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
......
//
// Copyright (C) 2012 Calin Cerchez
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
......
//
// Copyright (C) 2012 Calin Cerchez
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
......
//
// Copyright (C) 2012 Calin Cerchez
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
......
//
// Copyright (C) 2012 Calin Cerchez
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
......
//
// Copyright (C) 2012 Calin Cerchez
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
......
//
// Copyright (C) 2012 Calin Cerchez
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
......
//
// Copyright (C) 2012 Calin Cerchez
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
......@@ -98,6 +100,7 @@ void DiameterConnection::socketDataArrived(int32 connId, void *yourPtr, cPacket
default:
PeerEvent event = R_RCV_MESSAGE;
peer->performStateTransition(event, dmsg);
break;
}
} else {
switch (hdr.getCommandCode()) {
......@@ -119,6 +122,7 @@ void DiameterConnection::socketDataArrived(int32 connId, void *yourPtr, cPacket
default:
PeerEvent event = I_RCV_MESSAGE;
peer->performStateTransition(event, dmsg);
break;
}
}
}
......
//
// Copyright (C) 2012 Calin Cerchez
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
......
//
// Copyright (C) 2012 Calin Cerchez
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
......
//
// Copyright (C) 2012 Calin Cerchez
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
......
//
// Copyright (C) 2012 Calin Cerchez
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
......
//
// Copyright (C) 2012 Calin Cerchez
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
......
//
// Copyright (C) 2012 Calin Cerchez
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
......@@ -126,6 +128,7 @@ void DiameterPeer::performStateTransition(PeerEvent &event, DiameterMessage *msg
EV << "DiameterPeer: Received unexpected event\n";
if (msg != NULL)
delete msg;
break;
}
break;
case WAIT_CONN_ACK:
......@@ -156,6 +159,7 @@ void DiameterPeer::performStateTransition(PeerEvent &event, DiameterMessage *msg
EV << "DiameterBase: Received unexpected event\n";
if (msg != NULL)
delete msg;
break;
}
break;
case WAIT_I_CEA:
......@@ -187,6 +191,7 @@ void DiameterPeer::performStateTransition(PeerEvent &event, DiameterMessage *msg
EV << "DiameterPeer: Received unexpected event\n";
if (msg != NULL)
delete msg;
break;
}
break;
case WAIT_CONN_ACK_ELECT:
......@@ -215,6 +220,7 @@ void DiameterPeer::performStateTransition(PeerEvent &event, DiameterMessage *msg
EV << "DiameterPeer: Received unexpected event\n";
if (msg != NULL)
delete msg;
break;
}
break;
case WAIT_RETURNS:
......@@ -248,6 +254,7 @@ void DiameterPeer::performStateTransition(PeerEvent &event, DiameterMessage *msg
EV << "DiameterPeer: Received unexpected event\n";
if (msg != NULL)
delete msg;
break;
}
break;
case R_OPEN:
......@@ -297,6 +304,7 @@ void DiameterPeer::performStateTransition(PeerEvent &event, DiameterMessage *msg
EV << "DiameterPeer: Received unexpected event\n";
if (msg != NULL)
delete msg;
break;
}
break;
case I_OPEN:
......@@ -345,6 +353,7 @@ void DiameterPeer::performStateTransition(PeerEvent &event, DiameterMessage *msg
EV << "DiameterPeer: Received unexpected event\n";
if (msg != NULL)
delete msg;
break;
}
break;
case CLOSING:
......@@ -373,12 +382,14 @@ void DiameterPeer::performStateTransition(PeerEvent &event, DiameterMessage *msg
EV << "DiameterPeer: Received unexpected event\n";
if (msg != NULL)
delete msg;
break;
}
break;
default:
EV << "DiameterPeer: Unknown state\n";
if (msg != NULL)
delete msg;
break;
}
if (oldState != fsm.getState())
......@@ -443,6 +454,7 @@ void DiameterPeer::stateEntered() {
startTimer(twTimer, "TW-TIMER", TW_TIMER_TIMEOUT + uniform(-2, 2));
break;
default:;
break;
}
}
......
//
// Copyright (C) 2012 Calin Cerchez
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
......
//
// Copyright (C) 2012 Calin Cerchez
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
......
//
// Copyright (C) 2012 Calin Cerchez
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
......
//
// Copyright (C) 2012 Calin Cerchez
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
......@@ -61,12 +63,14 @@ void DiameterSession::performStateTransition(SessionEvent &event, unsigned applI
EV << "DiameterSession: Received unexpected event\n";
if (msg != NULL)
delete msg;
break;
}
break;
default:
EV << "DiameterSession: Unknown state\n";
if (msg != NULL)
delete msg;
break;
}
if (oldState != fsm->getState())
......
//
// Copyright (C) 2012 Calin Cerchez
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
......
//
// Copyright (C) 2012 Calin Cerchez
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
......
//
// Copyright (C) 2012 Calin Cerchez
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
......
//
// Copyright (C) 2012 Calin Cerchez
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
......
//
// Copyright (C) 2012 Calin Cerchez
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
......
//
// Copyright (C) 2012 Calin Cerchez
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
......
//
// Copyright (C) 2012 Calin Cerchez
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
......
//
// Copyright (C) 2012 Calin Cerchez
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
......
//
// Copyright (C) 2012 Calin Cerchez
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
......
//
// Copyright (C) 2012 Calin Cerchez
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册