fix for compiling openscd,

thanks for help to werner koch.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1378 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
aj 2003-08-18 08:18:38 +00:00
parent 844a25c9f1
commit 1a4c15749e
1 changed files with 6 additions and 11 deletions

View File

@ -189,14 +189,13 @@ ret:
static struct {
const char *name;
int cmd_id;
int (*handler)(ASSUAN_CONTEXT, char *line);
} ctable[] = {
{ "LISTR", 0, cmd_list_readers },
{ "LISTC", 0, cmd_list_cards },
{ "GET_OBJ", 0, cmd_get_objects },
{ "", ASSUAN_CMD_INPUT, NULL },
{ "", ASSUAN_CMD_OUTPUT, NULL },
{ "LISTR", cmd_list_readers },
{ "LISTC", cmd_list_cards },
{ "GET_OBJ", cmd_get_objects },
{ "INPUT", NULL },
{ "OUTPUT", NULL },
{ NULL }
};
@ -205,11 +204,7 @@ static int register_commands(ASSUAN_CONTEXT assuan_ctx)
int i, j, r;
for (i = j = 0; ctable[i].name != NULL; i++) {
int cmd_id = ctable[i].cmd_id;
if (cmd_id == 0)
cmd_id = ASSUAN_CMD_USER + j++;
r = assuan_register_command(assuan_ctx, cmd_id,
r = assuan_register_command(assuan_ctx,
ctable[i].name, ctable[i].handler);
if (r)
return r;