* simplify the the choking intervals

* fix peer-mgr destructor bug
* send debugging messagese to TR_DEBUG_FD instead of the console
This commit is contained in:
Charles Kerr
2007-10-02 14:35:02 +00:00
parent 77d7cf76a1
commit f237bf7047
5 changed files with 73 additions and 64 deletions

View File

@@ -39,6 +39,20 @@ tr_ptrArrayNew( void )
return p;
}
tr_ptrArray*
tr_ptrArrayDup( tr_ptrArray* in )
{
tr_ptrArray * out;
out = tr_new( tr_ptrArray, 1 );
out->n_items = in->n_items;
out->n_alloc = in->n_items;
out->items = tr_new( void*, out->n_alloc );
memcpy( out->items, in->items, out->n_items * sizeof(void*) );
return out;
}
void
tr_ptrArrayForeach( tr_ptrArray * t, PtrArrayForeachFunc func )
{