thorsson_cups 0.0.14 → 0.0.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/ext/cups.c +4 -1
  2. metadata +2 -2
data/ext/cups.c CHANGED
@@ -115,6 +115,7 @@ static VALUE cups_print(VALUE self)
115
115
  char *fname = RSTRING_PTR(file); // Filename
116
116
  char *target = RSTRING_PTR(printer); // Target printer string
117
117
  char *url = RSTRING_PTR(url_path); // Server URL address
118
+ int port = 80;
118
119
 
119
120
  VALUE job_options = rb_iv_get(self, "@job_options");
120
121
 
@@ -148,7 +149,9 @@ static VALUE cups_print(VALUE self)
148
149
  job_id = cupsPrintFile(target, fname, "rCups", num_options, options); // Do it. "rCups" should be the filename/path
149
150
  }
150
151
  else {
151
- job_id = cupsPrintFile2(url, target, fname, "rCups", num_options, options); // Do it. "rCups" should be the filename/path
152
+ int encryption = (http_encryption_t)cupsEncryption();
153
+ http = httpConnectEncrypt (url, port, (http_encryption_t) encryption);
154
+ job_id = cupsPrintFile2(http, target, fname, "rCups", num_options, options); // Do it. "rCups" should be the filename/path
152
155
  }
153
156
  cupsFreeOptions(num_options, options);
154
157
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 14
9
- version: 0.0.14
8
+ - 15
9
+ version: 0.0.15
10
10
  platform: ruby
11
11
  authors:
12
12
  - Ivan Turkovic