HWI/test/data/coldcard-linux-sock.patch
Andrew Chow 5862228b18 Update Coldcard simulator patches
These got out of date and seem to be causing travis failures.
2020-06-22 19:41:42 -04:00

31 lines
1.1 KiB
Diff

From b0513638e494afa6414a73e2b56f282aba8325cb Mon Sep 17 00:00:00 2001
From: Andrew Chow <achow101-github@achow101.com>
Date: Tue, 27 Nov 2018 17:32:44 -0500
Subject: [PATCH 1/2] Use linux unix socket address format
---
unix/frozen-modules/pyb.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/unix/frozen-modules/pyb.py b/unix/frozen-modules/pyb.py
index 0fd96de..3ac83f6 100644
--- a/unix/frozen-modules/pyb.py
+++ b/unix/frozen-modules/pyb.py
@@ -25,10 +25,10 @@ class USB_HID:
fn = b'/tmp/ckcc-simulator.sock'
self.pipe = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)
# If on linux, try commenting the following line
- addr = bytes([len(fn)+2, socket.AF_UNIX] + list(fn))
+ # addr = bytes([len(fn)+2, socket.AF_UNIX] + list(fn))
# If on linux, try uncommenting the following two lines
- #import struct
- #addr = struct.pack('H108s', socket.AF_UNIX, fn)
+ import struct
+ addr = struct.pack('H108s', socket.AF_UNIX, fn)
while 1:
try:
self.pipe.bind(addr)
--
2.27.0