pulse-server: add operation_free_by_tag()

This commit is contained in:
Barnabás Pőcze 2023-05-07 16:16:20 +02:00 committed by Wim Taymans
parent dd5f0e6bea
commit 0395424461
2 changed files with 8 additions and 3 deletions

View file

@ -27,4 +27,11 @@ struct operation *operation_find(struct client *client, uint32_t tag);
void operation_free(struct operation *o);
void operation_complete(struct operation *o);
static inline void operation_free_by_tag(struct client *client, uint32_t tag)
{
struct operation *o = operation_find(client, tag);
if (o)
operation_free(o);
}
#endif /* PULSER_SERVER_OPERATION_H */