various debugging
This commit is contained in:
parent
7e0e6522e5
commit
a09e80f9c4
7 changed files with 54 additions and 15 deletions
|
|
@ -113,7 +113,7 @@ packetalloc(void)
|
|||
p->last = nil;
|
||||
p->next = nil;
|
||||
|
||||
if(0)fprint(2, "packetalloc %p from %08lux %08lux %08lux\n", p, *((uint*)&p+2), *((uint*)&p+3), *((uint*)&p+4));
|
||||
//if(0)fprint(2, "packetalloc %p from %08lux %08lux %08lux\n", p, *((uint*)&p+2), *((uint*)&p+3), *((uint*)&p+4));
|
||||
|
||||
return p;
|
||||
}
|
||||
|
|
@ -196,6 +196,7 @@ packetsplit(Packet *p, int n)
|
|||
Packet *pp;
|
||||
Frag *f, *ff;
|
||||
|
||||
if(0) fprint(2, "packetsplit %p %d\n", p, n);
|
||||
NOTFREE(p);
|
||||
if(n < 0 || n > p->size) {
|
||||
werrstr(EPacketSize);
|
||||
|
|
@ -235,6 +236,7 @@ packetsplit(Packet *p, int n)
|
|||
int
|
||||
packetconsume(Packet *p, uchar *buf, int n)
|
||||
{
|
||||
if(0) fprint(2, "packetconsume %p %d\n", p, n);
|
||||
NOTFREE(p);
|
||||
if(buf && packetcopy(p, buf, 0, n) < 0)
|
||||
return -1;
|
||||
|
|
@ -246,6 +248,7 @@ packettrim(Packet *p, int offset, int n)
|
|||
{
|
||||
Frag *f, *ff;
|
||||
|
||||
if(0) fprint(2, "packettrim %p %d %d\n", p, offset, n);
|
||||
NOTFREE(p);
|
||||
if(offset < 0 || offset > p->size) {
|
||||
werrstr(EPacketOffset);
|
||||
|
|
@ -341,6 +344,7 @@ packettrailer(Packet *p, int n)
|
|||
Mem *m;
|
||||
Frag *f;
|
||||
|
||||
if(0) fprint(2, "packettrailer %p %d\n", p, n);
|
||||
NOTFREE(p);
|
||||
if(n <= 0 || n > MaxFragSize) {
|
||||
werrstr(EPacketSize);
|
||||
|
|
@ -603,7 +607,7 @@ uint
|
|||
packetsize(Packet *p)
|
||||
{
|
||||
NOTFREE(p);
|
||||
if(0) {
|
||||
if(1) {
|
||||
Frag *f;
|
||||
int size = 0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue