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.
- data/ext/cups.c +4 -1
- 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
|
-
|
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
|
|