Commit edcd553a authored by Nigel Kukard's avatar Nigel Kukard
Browse files

* Fixed some comments & small code cleanup

parent 2cb4135f
......@@ -286,7 +286,9 @@ static int processPktQueue(struct runnerData_t *runnerData, struct pktQueue_t *p
}
}
// If packet is still ok to pass through, do our stuff
/* If packet is still ok to pass through
* Update our parent threshold stuff so we can calculate parent_th above
*/
if (ok)
{
struct timeval curTime;
......@@ -381,7 +383,7 @@ static int processPktQueue(struct runnerData_t *runnerData, struct pktQueue_t *p
// Lock everything
g_mutex_lock(nextPktQueue->lock);
g_mutex_lock(flow->lock);
// Add packet to parent queue & remove from child
// Append to parent
nextPktQueue->packets = g_list_append(nextPktQueue->packets,packet);
// Update next queue stats
nextPktQueue->curLen++;
......@@ -417,7 +419,9 @@ static int processPktQueue(struct runnerData_t *runnerData, struct pktQueue_t *p
g_mutex_lock(pktQueue->lock);
if (packets)
{
// Merge the rest in
pktQueue->packets = g_list_concat(packets,pktQueue->packets);
// Signal that we just added to the queue
g_mutex_lock(runnerData->bandSignalLock);
// Check if we havn't already gotten the queue listed
......@@ -427,12 +431,13 @@ static int processPktQueue(struct runnerData_t *runnerData, struct pktQueue_t *p
g_cond_signal(runnerData->bandSignalCond);
g_mutex_unlock(runnerData->bandSignalLock);
}
pktQueue->curLen -= (acceptLen + queuedLen);
pktQueue->curSize -= (acceptSize + queuedLen);
g_mutex_unlock(pktQueue->lock);
return(acceptLen);
return acceptLen;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment