PR_LOG( lm, PR_LOG_DEBUG, ("PRTrace: FindNextRname: Rhandle: %p, QHandle: %p, Returns: %p", rhandle, qhandle, rnp ));
PR_LOG( lm, PR_LOG_DEBUG, ("PRTRACE: CreateTrace: Qname: %s, RName: %s", qName, rName));   PR_Lock( traceLock );   if (!PR_CLIST_IS_EMPTY( &qNameList )) { qnp = (QName *) PR_LIST_HEAD( &qNameList ); do { if ( strcmp(qnp->name, qName) == 0) { matchQname = PR_TRUE; break; } qnp = (QName *)PR_NEXT_LINK( &qnp->link ); } while( qnp != (QName *)PR_LIST_HEAD( &qNameList )); }  if ( matchQname != PR_TRUE ) { qnp = PR_NEWZAP( QName ); PR_ASSERT( qnp != NULL ); PR_INIT_CLIST( &qnp->link ); PR_INIT_CLIST( &qnp->rNameList ); strcpy( qnp->name, qName ); PR_APPEND_LINK( &qnp->link, &qNameList ); }   if (!PR_CLIST_IS_EMPTY( &qnp->rNameList )) { rnp = (RName *) PR_LIST_HEAD( &qnp->rNameList ); do {  PR_ASSERT( strcmp(rnp->name, rName)); rnp = (RName *)PR_NEXT_LINK( &rnp->link ); } while( rnp != (RName *)PR_LIST_HEAD( &qnp->rNameList )); }   rnp = PR_NEWZAP( RName ); PR_ASSERT( rnp != NULL ); PR_INIT_CLIST( &rnp->link ); strcpy( rnp->name, rName ); strcpy( rnp->desc, description ); rnp->lock = PR_NewLock(); rnp->state = Running; if ( rnp->lock == NULL ) { PR_ASSERT(0); }  PR_APPEND_LINK( &rnp->link, &qnp->rNameList );  rnp->qName = qnp;                          PR_Unlock( traceLock ); PR_LOG( lm, PR_LOG_DEBUG, ("PRTrace: Create: QName: %s %p, RName: %s %p\n\t", qName, qnp, rName, rnp ));
PR_IMPLEMENT(PRTraceHandle) 	PR_FindNextTraceRname(         PRTraceHandle rhandle,        PRTraceHandle qhandle){    RName *rnp = (RName *)rhandle;    QName *qnp = (QName *)qhandle;    if ( PR_CLIST_IS_EMPTY( &qnp->rNameList ))        rnp = NULL;    else if ( rnp == NULL )        rnp = (RName *)PR_LIST_HEAD( &qnp->rNameList );    else if ( PR_NEXT_LINK( &rnp->link ) ==  &qnp->rNameList )        rnp = NULL;    else        rnp = (RName *)PR_NEXT_LINK( &rnp->link );    PR_LOG( lm, PR_LOG_DEBUG, ("PRTrace: FindNextRname: Rhandle: %p, QHandle: %p, Returns: %p",         rhandle, qhandle, rnp ));    return((PRTraceHandle)rnp);} /* end PR_FindNextTraceRname() */