Changeset 9fdf4a1


Ignore:
Timestamp:
Aug 10, 2010, 6:58:40 PM (14 years ago)
Author:
Kyle Brogle <broglek@…>
Branches:
master, debian, mac, no-cups
Children:
618236b, 22be2fa
Parents:
0d02eca
git-author:
Kyle Brogle <broglek@…> (08/10/10 18:58:40)
git-committer:
Kyle Brogle <broglek@…> (08/10/10 18:58:40)
Message:

Fixed gbq bug with uninitialized values resulting from having an Artist but
no Title tag

Added more helpful error messages to gb{q,r,rm} when they can't contact the queue

Location:
client/bin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • client/bin/gbq

    r0d02eca r9fdf4a1  
    3737my $printer = $cups->getDestination("$queue");
    3838
     39unless( $printer){
     40    print "Cannot access queue $q...do you have network connectivity and permission to view the queue?\n";
     41    exit 1;
     42}
    3943print "Queue listing for queue '$queue' on '$host'\n\n";
    4044print "Job ID\t\tOwner\t\tTitle\n";
  • client/bin/gbr

    r0d02eca r9fdf4a1  
    3838$cups->setServer("$host");
    3939my $printer = $cups->getDestination("$queue");
     40unless( $printer){
     41    print "Cannot access queue $q...do you have network connectivity and permission to view the queue?\n";
     42    exit 1;
     43}
    4044my ($jobid, $title);
    4145
     
    5256        my $magic = $fileinfo->{FileType};
    5357
    54         if ($magic) {
     58        if ($magic && exists($fileinfo->{Title}) && exists($fileinfo->{Artist}) && exists($fileinfo->{Album})) {
    5559            $title = $fileinfo->{'Title'}." - ".$fileinfo->{'Artist'}." - ".$fileinfo->{'Album'};
    5660        }
  • client/bin/gbrm

    r0d02eca r9fdf4a1  
    3737$cups->setServer("$host");
    3838my $printer = $cups->getDestination("$queue");
     39unless( $printer){
     40    print "Cannot access queue $q...do you have network connectivity and permission to view the queue?\n";
     41    exit 1;
     42}
    3943my @jobs = $printer->getJobs(0, 0);
    4044
Note: See TracChangeset for help on using the changeset viewer.