This repository has been archived by the owner on Jun 17, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 185
Driver #481
Open
TeoCrack
wants to merge
91
commits into
google:driver
Choose a base branch
from
TeoCrack:driver
base: driver
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Driver #481
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Replaced utility update-config-file with backfill-config-file and sparse-config-file. Utility init now creates a config file that is sparse, except for user-specified values that are != default values. Fixes google#125
Read/write sparse config files.
This fixes build errors when building on non-Windows with go get github.com/google/cups-connector/...
Installs binaries and dependencies Displays license agreement English x64 only Installs service Service does not start currently when installed Note: RTF version of license agreement is necessary for Windows Installer Tested: all the actions in various install states, but not with actual GCP binaries
Create WIX files for building Windows Installer
fix build on FreeBSD
Travis and Jenkins
Parse page sizes specified in points, like "w81h252"
Instead of ephemeral ports, use ports from a selected range (default: 26000 to 26999). This makes packaging easier when the target system has to configure a firewall. Fixes google#161
Added benchmark and test. BenchmarkListen_range1000_available100 took over one minute before this change; now it takes less than 500 ms.
privet: HTTP API server port range
…oogle#217) * Implemented cups_job_full_username option in Windows port - Implemented cups_job_full_username option in Windows port - Changed the job status logic to treat paused jobs as "done" (because other software may pause jobs, and we aren't checking for the native printed/deleted statuses) - Renamed SetJob to SetJobCommand since it only uses commands - Added SetJobInfo1 & SetJobUserName which are used to change the username - Corrected error handling for: EnumPrinters, OpenPrinter, ClosePrinter, GetJob, SetJobCommand, StartDoc, EndDoc, StartPage, EndPage, SetGraphicsMode Note I have not added boilerplate "err == NO_ERROR" checks everywhere like SetWorldTransform has. Those "The operation completed successfully" Windows bugs are pretty rare. * Fixed Unix build error for CUPSJobFullUsername CUPSJobFullUsername had been moved above the CUPS only section.
…#234) Colors were being set in the CDD and ticket structures as VendorKey:"", VendorId:"key:value". Now we properly do VendorKey:"key", VendorId:"value" so things decode properly later.
…google#236) All the other json specifications seemed correct, only infoResponse was missing omitempty annotations. See https://developers.google.com/cloud-print/docs/privet#42-privetinfo-api
…scription" in /privet/info (google#237)
Trivial fixes for: cups-connector\privet\privet.go:79: too many arguments in call to p.zc.addPrinter cups-connector\privet\privet.go:105: too many arguments in call to p.zc.updatePrinterTXT
…nector For issue google#241. We still need to do a big rename of imports, but it should work ok for now.
Initial renaming from google/cups-connector to google/cloud-print-connector
* Rename to cloud-print-connector in import paths and other places * Remove CUPS from identifier in windows installer file * Rename temp files to be consistent with new name * Update app test in main_unix.go to match new name * Rename default socket and log to new name
* Add lib.Backoff for doing exponential backoff Inspired from: https://en.wikipedia.org/wiki/Exponential_backoff https://github.com/google/google-api-go-client/blob/master/gensupport/backoff.go https://developers.google.com/api-client-library/java/google-http-java-client/reference/1.20.0/com/google/api/client/util/ExponentialBackOff * Change postWithRetry and getWithRetry to use exponential backoff * Use exponential backoff in gcp-connector-util init
…RICOH printer when password is empty (google#341) * Fix of issue 340 : Failed to submit to native print system with some RICOH printers when password is empty * Fix of issue 340 : Failed to submit to native print system with some RICOH printers when password is empty
We already retry connecting to XMPP when it has a problem after startup, but we do not do so on initial startup. Use the same logic for startup retries as we do for restart retries. Fixes google#140 and google#160.
cli requires special handling for errors in order to return an error code back to the OS. Otherwise, errors look like success. This patch generates the special error type that cli expects. Fixes google#357.
* Remove unused AvahiThreadedPoll parameters from several C functions * Factor out populateGroup from addAvahiGroup We will need to reuse the code in populateGroup to do resetAvahiGroup soon. * Fix inconsistency in "serviceName" vs "service_name" in avahi.h * Introduce resetAvahiGroup, which will be used for recovering from collision * Add printer_name parameter to addAvahiGroup When resolving collisions, the printer name will diverge from the mDNS service name. * Handle mDNS collisions in privet with Avahi Avahi makes it a bit tricky to handle service name collisions, so it was not implemented before. Now multiple printers with the same name can be registered on the same local network. This comes up in the case where a privet-enabled printer is also connected with the Cloud Print Connector. Fixes google#342.
* Added support for Brother duplexing (BRDuplex) * Added test for Brother duplexing (BRDuplex)
…ens (google#361) * Listen for printer changes and refresh the printers list when such happen. This reduces the delay after new printer is added until it shows up as a printer avaiable for printing in Goolge Cloud Print on Windows. Timer based refreshes still need to happen due to other sources of printers eg Privet etc. * Adjust the code to the commited version of golang.org/x/sys/windows/svc.
Cloud Print URLs in case developer needs to access testing oauth server or testing local GCP servers. The old command still works with production URLs by default: gcp-connector-util init Then in order to connect to testing server, you need following command: gcp-connector-util init --gcp-oauth-client-id="<TEST CLIENT ID>" --gcp-oauth-client-secret="<TEST CLIENT SECRET>" --gcp-oauth-auth-url="<OAUTH AUTH URL>" --gcp-oauth-token-url="<OAUTH TOKEN URL>" --gcp-oauth-device-code-url="<DEVICE CODE URL>" --gcp-base-url="<GCP API BASE URL>" --gcp-oauth-token-poll-url="<OAUTH TOKEN POLL URL>"
Parameterize OAuth credentials and URLs
The current CL enables connector to receive both xmpp and FCM notifications from GCP server. The switch happens only when fcm flag is passed during connector start up else the behaviour is exactly same as before. Test Added.
The current CL enables connector to be able to switch printer notification channel b/w XMPP and FCM Fcm channel is enabled if fcm flag is passed during connector start up , else connector falls back to XMPP channel. Gcp will migrate printers b/w FCM and XMPP accordingly.
This change will simplify enabling fcm notifications on windows connector. Includes minor reformatting changes.
* Further windows build fixes * Delete dependencies.wxs This should be regenerated on every run of build-msi.sh and should not be in git * remove generated dependencies.wxs after each run.
* Update cups.go * Update gcp-cups-connector.go * Update gcp-windows-connector.go * Update winspool.go
* Update list of travis go versions The list is quite old and there seems to be problems building on Mac with some of these. https://docs.travis-ci.com/user/languages/go/#Specifying-a-Go-version-to-use
* generalize build-msi.sh for 32/64 builds * Rename windows-connector.wxs to windows-connector-x64.wxs * Create windows-connector-x86.wxs
Helps in reducing load on FCM (during outage).
- Fixes google#301 - Move retain code to be later in the printing process - Check for paused jobs and don't retain them, because retain/release deletes them - Don't release if the job wasn't retained (avoids logging an error)
3 printer sync messages get logged constantly at INFO level spamming log files and Windows event viewer. Reduce regular sync messages to DEBUG to keep them off by default. Other log entries like printer add/update/delete are still INFO.
* reduce level info > debug for sync messages 3 printer sync messages get logged constantly at INFO level spamming log files and Windows event viewer. Reduce regular sync messages to DEBUG to keep them off by default. Other log entries like printer add/update/delete are still INFO. * Windows: move whitelsit/blacklist check earlier Currently we scan all native printers before filtering unwanted printers with config whitelsit/blacklist. This is inefficient and means we can't avoid deep scanning settings of a printer we don't want to touch. This PR moves the whitelist/blacklist check into the native printer scan loop right after we have printer name. Scans are faster and unwanted printers don't have any details pulled other than name. * No chnages to manager/printermanager.go in this PR * cups: move wl/bl filter into loop * Fixes to make sure we compile and run on *nix * make go fmt happy * remove tests for old lib functions
* Migrate urfave/cli from v1 to v2 * Migrate urfave/cli for Windows as well
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.