mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
scd: Add explict functions for 'app' reference counting.
* scd/app.c (app_ref): New. (app_unref): New. (release_application): Renamed to ... (app_unref_locked): this and remove arg locked_already. Change callers to use this or app_ref. * scd/command.c (open_card_with_request): (cmd_pksign, cmd_pkauth, cmd_pkdecrypt): Use app_ref and app_unref instead of accessing the counter directly. -- This is better in case we need to debug stuff. There is a real change however: We now lock and unlock the app before changing the reference count. The whole app locking business should be reviewed because we pass pointers along without immediately bumping the refcount. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
70f7b26287
commit
c594dcfc93
4 changed files with 55 additions and 23 deletions
|
@ -129,7 +129,10 @@ void send_keyinfo (ctrl_t ctrl, int data, const char *keygrip_str,
|
|||
const char *serialno, const char *idstr);
|
||||
|
||||
void popup_prompt (void *opaque, int on);
|
||||
|
||||
/* Take care: this function assumes that APP is locked. */
|
||||
void send_client_notifications (app_t app, int removal);
|
||||
|
||||
void scd_kick_the_loop (void);
|
||||
int get_active_connection_count (void);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue