thorsson_cups 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/ext/cups.c +2 -40
- metadata +2 -2
data/ext/cups.c
CHANGED
@@ -434,7 +434,7 @@ static VALUE cups_get_jobs(VALUE self, VALUE printer)
|
|
434
434
|
}
|
435
435
|
|
436
436
|
// Free job array
|
437
|
-
|
437
|
+
cupsFreeJobs(num_jobs, jobs);
|
438
438
|
return job_list;
|
439
439
|
}
|
440
440
|
|
@@ -494,47 +494,10 @@ static VALUE cups_get_device_uri(VALUE self, VALUE printer)
|
|
494
494
|
{
|
495
495
|
if((attr = ippFindAttribute(response, "device-uri", IPP_TAG_URI)) != NULL)
|
496
496
|
{
|
497
|
-
if(http != NULL)
|
498
|
-
free(http);
|
499
|
-
|
500
|
-
if(request != NULL)
|
501
|
-
free(request);
|
502
|
-
|
503
|
-
if(response != NULL)
|
504
|
-
free(response);
|
505
|
-
|
506
|
-
if(attr != NULL)
|
507
|
-
free(attr);
|
508
|
-
|
509
|
-
if(location != NULL)
|
510
|
-
free(location);
|
511
|
-
|
512
|
-
if(name != NULL)
|
513
|
-
free(name);
|
514
497
|
return rb_str_new2(attr->values[0].string.text);
|
515
498
|
}
|
516
499
|
ippDelete(response);
|
517
500
|
}
|
518
|
-
|
519
|
-
|
520
|
-
if(http != NULL)
|
521
|
-
free(http);
|
522
|
-
|
523
|
-
if(request != NULL)
|
524
|
-
free(request);
|
525
|
-
|
526
|
-
if(response != NULL)
|
527
|
-
free(response);
|
528
|
-
|
529
|
-
if(attr != NULL)
|
530
|
-
free(attr);
|
531
|
-
|
532
|
-
if(location != NULL)
|
533
|
-
free(location);
|
534
|
-
|
535
|
-
if(name != NULL)
|
536
|
-
free(name);
|
537
|
-
|
538
501
|
return Qtrue;
|
539
502
|
}
|
540
503
|
|
@@ -569,7 +532,6 @@ static VALUE cups_get_options(VALUE self, VALUE printer)
|
|
569
532
|
for(i =0; i< dest->num_options; i++) {
|
570
533
|
rb_hash_aset(options_list, rb_str_new2(dest->options[i].name), rb_str_new2(dest->options[i].value));
|
571
534
|
}
|
572
|
-
|
573
535
|
cupsFreeDests(num_dests, dests);
|
574
536
|
return options_list;
|
575
537
|
}
|
@@ -608,4 +570,4 @@ void Init_cups() {
|
|
608
570
|
rb_define_singleton_method(rubyCups, "options_for", cups_get_options, 1);
|
609
571
|
rb_define_singleton_method(rubyCups, "device_uri_for", cups_get_device_uri, 1);
|
610
572
|
rb_define_singleton_method(rubyCups, "get_connection_for", cups_get_device_uri, 1);
|
611
|
-
}
|
573
|
+
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thorsson_cups
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2011-03-
|
13
|
+
date: 2011-03-29 00:00:00.000000000 +02:00
|
14
14
|
default_executable:
|
15
15
|
dependencies: []
|
16
16
|
description: ! ' Ruby CUPS provides a wrapper for the Common UNIX Printing System,
|