예제 #1
0
// Route an n-pdu from the MS out to the internet.
// Called by SNDCP when it has received/re-assembled a N-PDU
int miniggsn_snd_npdu(PdpContext *pctx,unsigned char *npdu, unsigned len)
{
	// Find the fd from the pctx;  We should put this in the pdp_ctx.
	mg_con_t *mgp = mg_con_find_by_ctx(pctx);
	if (mgp == NULL) { return -1; }		// Whoops
	return miniggsn_snd_npdu_by_mgc(mgp, npdu, len);
}
예제 #2
0
void *miniGgsnWriteServiceLoop(void *arg)
{
	sethighpri();
	Ggsn *ggsn = (Ggsn*)arg;
	while (ggsn->active()) {
		// 8-6-2012 This interthreadqueue is clumping things up.  Try taking out the timeout.
		//PdpPdu *npdu = ggsn->mTxQ.read(ggsn->mStopTimeout);
		PdpPdu *npdu = ggsn->mTxQ.read();
        	SGSNLOG("Got pdu to send: " << npdu->mpdu);
		if (npdu) {
			miniggsn_snd_npdu_by_mgc(npdu->mgp, npdu->mpdu.begin(), npdu->mpdu.size());
			delete npdu;
		}
	}
	return 0;
}