- Add missing error->sc_error conversions and other
Assuan specific build fixes git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1499 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
106351eb5c
commit
c5bd03af1c
|
@ -61,12 +61,12 @@ static void card_inserted(struct openscd_context *dctx,
|
|||
|
||||
r = sc_connect_card(reader, slot_id, &card);
|
||||
if (r) {
|
||||
error(dctx->ctx, "Unable to connect to card: %s\n", sc_strerror(r));
|
||||
sc_error(dctx->ctx, "Unable to connect to card: %s\n", sc_strerror(r));
|
||||
} else {
|
||||
dctx->cards[n].card = card;
|
||||
r = sc_pkcs15_bind(card, &p15card);
|
||||
if (r) {
|
||||
error(dctx->ctx, "Error with PKCS #15 card: %s\n", sc_strerror(r));
|
||||
sc_error(dctx->ctx, "Error with PKCS #15 card: %s\n", sc_strerror(r));
|
||||
} else
|
||||
dctx->cards[n].p15card = p15card;
|
||||
}
|
||||
|
@ -348,12 +348,12 @@ void command_handler(struct openscd_context *dctx)
|
|||
if (r == -1)
|
||||
break;
|
||||
if (r) {
|
||||
error(dctx->ctx, "Assuan accept problem: %s\n", assuan_strerror(r));
|
||||
sc_error(dctx->ctx, "Assuan accept problem: %s\n", assuan_strerror(r));
|
||||
break;
|
||||
}
|
||||
r = assuan_process(assuan_ctx);
|
||||
if (r) {
|
||||
error(dctx->ctx, "Assuan processing failed: %s\n", assuan_strerror(r));
|
||||
sc_error(dctx->ctx, "Assuan processing failed: %s\n", assuan_strerror(r));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ struct openscd_context *dctx = NULL;
|
|||
|
||||
int opt_pipe = 0;
|
||||
|
||||
void cleanup()
|
||||
void cleanup(void)
|
||||
{
|
||||
if (dctx == NULL)
|
||||
return;
|
||||
|
@ -100,7 +100,7 @@ void setup_socket(void)
|
|||
dctx->socket_fd = fd;
|
||||
}
|
||||
|
||||
void do_fork()
|
||||
void do_fork(void)
|
||||
{
|
||||
int pid;
|
||||
|
||||
|
@ -126,7 +126,7 @@ void do_fork()
|
|||
}
|
||||
}
|
||||
|
||||
void init_dctx()
|
||||
void init_dctx(void)
|
||||
{
|
||||
int r;
|
||||
|
||||
|
@ -138,8 +138,6 @@ void init_dctx()
|
|||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int r;
|
||||
|
||||
dctx = malloc(sizeof(struct openscd_context));
|
||||
assert(dctx != NULL);
|
||||
memset(dctx, 0, sizeof(struct openscd_context));
|
||||
|
|
|
@ -9,7 +9,7 @@ SUBDIRS = . npinclude
|
|||
|
||||
EXTRA_DIST = testprog.c
|
||||
|
||||
INCLUDES = @CPPFLAGS@ @CFLAGS_ASSUAN@
|
||||
INCLUDES = @CPPFLAGS@ @CFLAGS_ASSUAN@ -I$(top_srcdir)/src/signer/npinclude
|
||||
|
||||
if HAVE_SSL
|
||||
if HAVE_ASSUAN
|
||||
|
@ -19,7 +19,7 @@ endif
|
|||
|
||||
opensc_signer_la_LDFLAGS = -module -avoid-version
|
||||
opensc_signer_la_LIBADD = @LIBOPENSC@ @LIBCRYPTO@ @LIBASSUAN@
|
||||
opensc_signer_la_CFLAGS = $(AM_CFLAGS) -Inpinclude -DXP_UNIX
|
||||
opensc_signer_la_CFLAGS = $(AM_CFLAGS) -DXP_UNIX
|
||||
opensc_signer_la_SOURCES = \
|
||||
opensc-crypto.c opensc-support.c signer.c stubs.c dialog.c
|
||||
noinst_HEADERS = \
|
||||
|
|
Loading…
Reference in New Issue