FOSSology  4.4.0
Open Source License Compliance by Open Source Software
container.c File Reference
#include "buckets.h"
Include dependency graph for container.c:

Go to the source code of this file.

Functions

FUNCTION int * getContainerBuckets (PGconn *pgConn, pbucketdef_t bucketDefArray, int uploadtree_pk)
 Given a container uploadtree_pk and bucketdef, determine what buckets the container is in. More...
 

Variables

int debug
 

Detailed Description

Process bucket containers

Definition in file container.c.

Function Documentation

◆ getContainerBuckets()

FUNCTION int* getContainerBuckets ( PGconn *  pgConn,
pbucketdef_t  bucketDefArray,
int  uploadtree_pk 
)

Given a container uploadtree_pk and bucketdef, determine what buckets the container is in.

A container is in all the buckets of its children (recursive).

This function is also called for no-pfile artifacts to simplify the recursion in walkTree().

Parameters
pgConnpostgresql connection
bucketDefArraybucket
uploadtree_pkUpload tree id to be check
Returns
zero terminated array of bucket_pk's for this uploadtree_pk (may contain no elements). This must be free'd by the caller.
Note
It's tempting to just have walkTree() remember all the child buckets. but, due to pfile reuse, some of the tree might have been processed before walkTree() was called.

Definition at line 36 of file container.c.

Variable Documentation

◆ debug

int debug
extern

Print debug messages

Definition at line 57 of file buckets.c.