Commit 6f1aabf5 authored by Mati's avatar Mati

Merge tag 'upstream/0.10.7'

Upstream version 0.10.7
parents d6821b00 769ac150
......@@ -103,8 +103,8 @@ am__relativize = \
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
done; \
reldir="$$dir2"
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
DIST_ARCHIVES = $(distdir).tar.bz2
distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
......@@ -462,7 +462,6 @@ distdir: $(DISTFILES)
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
$(am__remove_distdir)
......@@ -493,7 +492,7 @@ dist-zip: distdir
$(am__remove_distdir)
dist dist-all: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
$(am__remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
......
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.68 for mfoc 0.10.6.
# Generated by GNU Autoconf 2.68 for mfoc 0.10.7.
#
# Report bugs to <mifare@nethemba.com>.
#
......@@ -560,8 +560,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='mfoc'
PACKAGE_TARNAME='mfoc'
PACKAGE_VERSION='0.10.6'
PACKAGE_STRING='mfoc 0.10.6'
PACKAGE_VERSION='0.10.7'
PACKAGE_STRING='mfoc 0.10.7'
PACKAGE_BUGREPORT='mifare@nethemba.com'
PACKAGE_URL=''
......@@ -1259,7 +1259,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures mfoc 0.10.6 to adapt to many kinds of systems.
\`configure' configures mfoc 0.10.7 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
......@@ -1325,7 +1325,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of mfoc 0.10.6:";;
short | recursive ) echo "Configuration of mfoc 0.10.7:";;
esac
cat <<\_ACEOF
......@@ -1422,7 +1422,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
mfoc configure 0.10.6
mfoc configure 0.10.7
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
......@@ -1898,7 +1898,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by mfoc $as_me 0.10.6, which was
It was created by mfoc $as_me 0.10.7, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
......@@ -3575,7 +3575,7 @@ fi
# Define the identity of the package.
PACKAGE='mfoc'
VERSION='0.10.6'
VERSION='0.10.7'
cat >>confdefs.h <<_ACEOF
......@@ -5267,7 +5267,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by mfoc $as_me 0.10.6, which was
This file was extended by mfoc $as_me 0.10.7, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
......@@ -5333,7 +5333,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
mfoc config.status 0.10.6
mfoc config.status 0.10.7
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
......
AC_INIT([mfoc],[0.10.6],[mifare@nethemba.com])
AC_INIT([mfoc],[0.10.7],[mifare@nethemba.com])
AC_CONFIG_MACRO_DIR([m4])
......@@ -8,7 +8,7 @@ AC_CONFIG_HEADERS([config.h])
AC_CONFIG_SRCDIR([src/mfoc.c])
AM_INIT_AUTOMAKE
AM_INIT_AUTOMAKE(dist-bzip2 no-dist-gzip)
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
......
......@@ -204,10 +204,13 @@ int main(int argc, char *const argv[])
for (i=0;!nfc_initiator_select_passive_target(r.pdi, nm, NULL, 0, &t.nt) && i < 10; i++) zsleep (100);
*/
// mf_select_tag(r.pdi, &(t.nt));
if (nfc_initiator_select_passive_target(r.pdi, nm, NULL, 0, &t.nt) < 0) {
int tag_count;
if ((tag_count = nfc_initiator_select_passive_target(r.pdi, nm, NULL, 0, &t.nt)) < 0) {
nfc_perror(r.pdi, "nfc_initiator_select_passive_target");
goto error;
} else if (tag_count == 0) {
ERR("No tag found.");
goto error;
}
// Test if a compatible MIFARE tag is used
......@@ -579,6 +582,10 @@ void mf_init(mfreader *r)
{
// Connect to the first NFC device
nfc_init(&context);
if (context == NULL) {
ERR("Unable to init libnfc (malloc)");
exit(EXIT_FAILURE);
}
r->pdi = nfc_open(context, NULL);
if (!r->pdi) {
printf("No NFC device found.\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment