X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=src%2Frfid_scan.c;h=b19887e7c287d3057849c7ffbbad8316b7bc8bb3;hb=683a381a3ef8d2c1c1f0c47337808d6a72e1309f;hp=1abb4dffe5e78cf00407d075e1f7f53703b46b0c;hpb=d405140edf9bdb25465ba7ddb203280d50a96b4d;p=librfid diff --git a/src/rfid_scan.c b/src/rfid_scan.c index 1abb4df..b19887e 100644 --- a/src/rfid_scan.c +++ b/src/rfid_scan.c @@ -43,7 +43,7 @@ rfid_layer2_scan1(struct rfid_reader_handle *rh, int l2) return NULL; } -static struct rfid_layer2_handle * +struct rfid_layer2_handle * rfid_layer2_scan(struct rfid_reader_handle *rh) { struct rfid_layer2_handle *l2h; @@ -51,6 +51,7 @@ rfid_layer2_scan(struct rfid_reader_handle *rh) #define RFID_LAYER2_MAX 16 for (i = 0; i < RFID_LAYER2_MAX; i++) { + DEBUGP("testing l2 %u\n", i); l2h = rfid_layer2_scan1(rh, i); if (l2h) return l2h; @@ -79,7 +80,7 @@ rfid_protocol_scan1(struct rfid_layer2_handle *l2h, int proto) return NULL; } -static struct rfid_protocol_handle * +struct rfid_protocol_handle * rfid_protocol_scan(struct rfid_layer2_handle *l2h) { struct rfid_protocol_handle *ph; @@ -87,6 +88,7 @@ rfid_protocol_scan(struct rfid_layer2_handle *l2h) #define RFID_PROTOCOL_MAX 16 for (i = 0; i < RFID_PROTOCOL_MAX; i++) { + DEBUGP("testing proto %u\n", i); ph = rfid_protocol_scan1(l2h, i); if (ph) return ph; @@ -105,9 +107,9 @@ int rfid_scan(struct rfid_reader_handle *rh, if (!*l2h) return 0; - *ph = rfid_protocol_scan(l2h); + *ph = rfid_protocol_scan(*l2h); if (!*ph) return 2; - + return 3; }