lib/libvarnishapi/vsl_dispatch.c
static void
vtx_scan(struct VSLQ *vslq, struct vtx *vtx)
{
	const uint32_t *ptr;
	enum VSL_tag_e tag;

	while (!(vtx->flags & VTX_F_COMPLETE) &&
	    vslc_vtx_next(&vtx->c.cursor) == 1) {
		ptr = vtx->c.cursor.rec.ptr;
		if (VSL_ID(ptr) != vtx->key.vxid) {
			(void)vtx_diag_tag(vtx, ptr, "vxid mismatch");
			continue;
		}

		tag = VSL_TAG(ptr);
		assert(tag != SLT__Batch);

		switch (tag) {
		case SLT_Begin:
			if (vtx->flags & VTX_F_BEGIN)
				(void)vtx_diag_tag(vtx, ptr, "duplicate begin");
			else {
				(void)vtx_scan_begin(vslq, vtx, ptr);
				vtx->flags |= VTX_F_BEGIN;
			}
			break;

		case SLT_Link:
			(void)vtx_scan_link(vslq, vtx, ptr);
			break;

		case SLT_End:
			AZ(vtx->flags & VTX_F_END);
			vtx->flags |= VTX_F_END;
			vtx_mark_complete(vslq, vtx);
			break;

		default:
			break;
		}
	}
}
/* Scan the records of a vtx, performing processing actions on specific
   records */
Scan the records of a vtx, performing processing actions on specific
records
Scan the records of a vtx performing processing actions on specific records
static void
vtx_scan(struct VSLQ *vslq, struct vtx *vtx)
{
	const uint32_t *ptr;
	enum VSL_tag_e tag;
	while (!(vtx->flags & VTX_F_COMPLETE) &&
	    vslc_vtx_next(&vtx->c.cursor) == 1) {
		ptr = vtx->c.cursor.rec.ptr;
		if (VSL_ID(ptr) != vtx->key.vxid) {
			(void)vtx_diag_tag(vtx, ptr, "vxid mismatch");
			continue;
		}
		tag = VSL_TAG(ptr);
		assert(tag != SLT__Batch);
		switch (tag) {
		case SLT_Begin:
			if (vtx->flags & VTX_F_BEGIN)
				(void)vtx_diag_tag(vtx, ptr, "duplicate begin");
			else {
				(void)vtx_scan_begin(vslq, vtx, ptr);
				vtx->flags |= VTX_F_BEGIN;
			}
			break;
		case SLT_Link:
			(void)vtx_scan_link(vslq, vtx, ptr);
			break;
		case SLT_End:
			AZ(vtx->flags & VTX_F_END);
			vtx->flags |= VTX_F_END;
			vtx_mark_complete(vslq, vtx);
			break;
		default:
			break;
		}
	}
}
static void vtx_scan ( struct VSLQ * vslq , struct vtx * vtx ) { const uint32_t * ptr ; enum VSL_tag_e tag ; while ( ! ( vtx -> flags & VTX_F_COMPLETE ) && vslc_vtx_next ( & vtx -> c . cursor ) == 1 ) { ptr = vtx -> c . cursor . rec . ptr ; if ( VSL_ID ( ptr ) != vtx -> key . vxid ) { ( void ) vtx_diag_tag ( vtx , ptr , " " ) ; continue ; } tag = VSL_TAG ( ptr ) ; assert ( tag != SLT__Batch ) ; switch ( tag ) { case SLT_Begin : if ( vtx -> flags & VTX_F_BEGIN ) ( void ) vtx_diag_tag ( vtx , ptr , " " ) ; else { ( void ) vtx_scan_begin ( vslq , vtx , ptr ) ; vtx -> flags |= VTX_F_BEGIN ; } break ; case SLT_Link : ( void ) vtx_scan_link ( vslq , vtx , ptr ) ; break ; case SLT_End : AZ ( vtx -> flags & VTX_F_END ) ; vtx -> flags |= VTX_F_END ; vtx_mark_complete ( vslq , vtx ) ; break ; default : break ; } } }
Scan the records of a vtx, performing processing actions on specific
records
Scan the records of a vtx performing processing actions on specific records