Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#5480 closed patch (worksforme)

Patch for to use Storage Groups

Reported by: Shawn Flynn <shawn@…> Owned by: Rob Smith
Priority: minor Milestone: unknown
Component: contrib Version: head
Severity: medium Keywords:
Cc: Ticket locked: no


The storagegroup code in attempts to grab the storagegroup path without first initializing the value of $basename. The following patch will grab the correct $basename value from the 'recorded' table before attempting to find the file path from storagegroup.

< $usage = "\nHow to use : \n"
> $usage = "\nHow to use : \n"
>     $query = "SELECT basename FROM recorded WHERE chanid=$chanid AND starttime=$starttime";
>     $query_handle = $connect->prepare($query);
>     $query_handle->execute()  || die "Unable to query recorded table";
>     my ($basename) = $query_handle->fetchrow_array;

Change History (3)

comment:1 Changed 13 years ago by Rob Smith

Owner: changed from Isaac Richards to Rob Smith
Status: newaccepted

comment:2 Changed 12 years ago by Rob Smith

Resolution: worksforme
Status: acceptedclosed

File was updated previously.

Thanks anyway!

comment:3 Changed 12 years ago by Shawn Flynn

Looking at the current trunk copy of, I don't see where this error has been fixed.

$basename is only referenced once in the file (line 124) and as such is uninitialized when passed to $storagegroup->FindRecordingDir?. The FindRecordingDir? routine in StorageGroup?.pm will be unable to find the file (since the name passed to it is an unitialized value) and will return the last storage group directory that it checked. This will in fact work if you only have a single storage location defined, but will fail to find the file if there are multiple directories or storage groups defined.

Note: See TracTickets for help on using tickets.