nfc-tools / ifdnfc

PC/SC IFD Handler based on libnfc
GNU General Public License v3.0
34 stars 9 forks source link

Support Multiple ifdnfc Devices With Autostart/Hotplug of pn532 (and maybe other) Serial. #5

Open benmehlman opened 8 years ago

benmehlman commented 8 years ago

This is the code which I posted about on the pcsclite-muscle mailing list. It allows ifdnfc to support multiple serial devices including startup without human intervention.

LudovicRousseau commented 8 years ago

The patch https://github.com/nfc-tools/ifdnfc/pull/5/commits/a2aad50c883ea56c5c7dd610a1192e8e117bf287 is very big and mix different changes.

Maybe you could split the patch in small & independent changes?

benmehlman commented 8 years ago

Yes I'm sorry about the size of the last commit. The problem was that I didn't know all the work I was going to do until I started doing it. I thought that the change to ifdnfc-activate was going to be much smaller.. I ended up touching almost every line.. also did not anticipate all the other problems (memory handling issues etc) that I found along the way. It was not done in any sort of order but fixed as I went along sometimes multiple iterations of fixes.. making change 1, not working because need change 2, then need 3.. finally able to test change 1 and find out that it needs some more work.. so change again.. and so on until everything works smoothly. That this was all on Raspberry pi didn't help. So I would have to basically start over to get it into separate commits. Right now I'm under a lot of work pressure and so if you would consider the patch without splitting that would be really helpful. Otherwise it will be some time before I can do it. I will take care of the comments and the few small cleanups in the next day or two. Thanks!

LudovicRousseau commented 8 years ago

One big benefit of git is that you can rewrite the history and clean up your patches. For example you could merge (called squash in git) edcfbe01def9eb4321324f18f34330743b76ed62 into a2aad50c883ea56c5c7dd610a1192e8e117bf287 so that the declaration of strdup() never appear in your patches.

Take your time.