Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced DESFIRE_TRANSCEIVE by a function (TODO n°3) #105

Merged
merged 9 commits into from
Nov 5, 2019

Conversation

broth-itk
Copy link
Contributor

Next try without mixing up my branches.

Replaced DESFIRE_TRANSCEIVE by a function, updating all commands it used.

Copy link
Contributor

@smortex smortex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for taking care of this! I added some inline comments. Can you have a look?

libfreefare/mifare_desfire.c Outdated Show resolved Hide resolved
libfreefare/mifare_desfire.c Show resolved Hide resolved
- Added missing "free(read_buffer);"
- Uppercase macro names
@smortex
Copy link
Contributor

smortex commented Feb 5, 2019

You have not authorized maintainers to push changes to your branch.

Can you configure with ./configure CFLAGS="-Wall -Wextra -Werror -Wno-unused-variable -Wno-unused-function" and fix the problems detected (a cast missing, and a couple of char * that should by uint8_t *?

Thanks!

I also feel that when compiling WITH_DEBUG, MIFARE_DESFIRE_TRANSCEIVE() is broken.

@broth-itk
Copy link
Contributor Author

You have not authorized maintainers to push changes to your branch.

I added you as collaborator - hope this solves the problem :)

Can you configure with ./configure CFLAGS="-Wall -Wextra -Werror -Wno-unused-variable -Wno->unused-function" and fix the problems detected (a cast missing, and a couple of char * that should by >uint8_t *?

Done, fixed similar issues with other parts of the lib as well.
BTW: Enabling "-Werror" on configure will fail and tell that openssl headers were missing.

I also feel that when compiling WITH_DEBUG, MIFARE_DESFIRE_TRANSCEIVE() is broken.

"./configure --enable-debug" works just fine for me, no problems whatsoever

@broth-itk
Copy link
Contributor Author

broth-itk commented Feb 5, 2019

Travis CI fails for missing nfc-utils header file. I did not touch that. Any idea what possibly can cause that problem?

@broth-itk
Copy link
Contributor Author

Is there anything left for me to do in order to get this pull request passing all checks and get eventually merged? Sorry for asking possibly dumb questions, the git process is still new to me. Thanks!

smortex
smortex previously approved these changes Jul 1, 2019
Copy link
Contributor

@smortex smortex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I re-triggerd the build for Travis-CI and it have passed.

The code looks right, but I do not own anymore NFC readers, so can't run the regression test suite with real hardware to be 100% confident we do not introduce regressions.

@nfc-tools/core, @nfc-tools/contributors can somebody give it a try?

@AdamLaurie
Copy link
Member

test$ ./run-test.sh
make: *** No rule to make target 'echo-cutter'. Stop.
./run-test.sh: 17: ./run-test.sh: : Permission denied

don't have time to dig into this but if someone has a quick fix let me know and i'll try again...

@smortex
Copy link
Contributor

smortex commented Jul 1, 2019

@AdamLaurie if I recall correctly, this is the typical failure when cutter is not installed when the autotools where run.

Double-check that cutter is installed, and re-run autoreconf -is, then ./configure and make check with a formatted cards on NFC devices connected to the system.

Thanks!

@darconeous
Copy link
Member

I'll give testing this a shot tonight.

@darconeous
Copy link
Member

darconeous commented Oct 30, 2019

I've confirmed this change passes all tests with a MIFARE DESFire EV1.

I've also noticed that some tests fail with a MIFARE DESFire EV2 (filed #120), but I don't think that is a regression or related to this issue.

I know @smortex previously approved this change, but it looks like my conflict fix removed his approval.

@smortex
Copy link
Contributor

smortex commented Oct 30, 2019

Ah, indentation looks weird (maybe we should add a test for this in Travis-CI?).

I think you should be able to approve other people Pull Requests and merge them, but maybe if you contributed some code you cannot anymore?

Would you mind checking make style? Thanks!

Copy link
Contributor

@smortex smortex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, we still rely on a macro but it's a HUGE step forward IMHO! Thanks!

@darconeous darconeous merged commit 682fbe6 into nfc-tools:master Nov 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants