mirror of https://github.com/deavmi/alpha.git
WIP: Clean up
This commit is contained in:
parent
3275240b63
commit
324969ee5e
29
session.c
29
session.c
|
@ -43,6 +43,9 @@ int32_t startOutbound(Session*);
|
|||
void lockSession(Session*);
|
||||
void unlockSession(Session*);
|
||||
|
||||
|
||||
void managementLoop();
|
||||
|
||||
void lockSession(Session* session)
|
||||
{
|
||||
assert(session);
|
||||
|
@ -55,6 +58,7 @@ void unlockSession(Session* session)
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Setup all sessions
|
||||
*/
|
||||
|
@ -205,6 +209,31 @@ void sessionMainFunc(void* data)
|
|||
pids[0] = startListener(session);
|
||||
pids[1] = startOutbound(session);
|
||||
|
||||
|
||||
if(pids[0] > 0)
|
||||
{
|
||||
//Bind
|
||||
}
|
||||
else
|
||||
{
|
||||
/* TODO: Debug print message about bind failing */
|
||||
}
|
||||
|
||||
if(pids[1] > 0)
|
||||
{
|
||||
//Outbound good
|
||||
}
|
||||
else
|
||||
{
|
||||
/* TODO: Debug print message about failing to outbound */
|
||||
}
|
||||
|
||||
/* Enter management loop */
|
||||
managementLoop();
|
||||
}
|
||||
|
||||
void managementLoop()
|
||||
{
|
||||
/* Management loop */
|
||||
while(1)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue