From 7768c2201f3ec97439ffe515da4513e95b70100a Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Fri, 19 Dec 2008 12:26:42 +0000 Subject: Fixed ticket #686: Failure to cancel outstanding DNS SRV query job (API change) git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2387 74dad513-b988-da41-8d7b-12977e46ad98 --- pjlib-util/include/pjlib-util/srv_resolver.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'pjlib-util/include') diff --git a/pjlib-util/include/pjlib-util/srv_resolver.h b/pjlib-util/include/pjlib-util/srv_resolver.h index d1c896eb..1ff8f903 100644 --- a/pjlib-util/include/pjlib-util/srv_resolver.h +++ b/pjlib-util/include/pjlib-util/srv_resolver.h @@ -137,6 +137,9 @@ typedef struct pj_dns_srv_record } pj_dns_srv_record; +/** Opaque declaration for DNS SRV query */ +typedef struct pj_dns_srv_async_query pj_dns_srv_async_query; + /** * Type of callback function to receive notification from the resolver * when the resolution process completes. @@ -184,7 +187,20 @@ PJ_DECL(pj_status_t) pj_dns_srv_resolve(const pj_str_t *domain_name, unsigned option, void *token, pj_dns_srv_resolver_cb *cb, - pj_dns_async_query **p_query); + pj_dns_srv_async_query **p_query); + + +/** + * Cancel an outstanding DNS SRV query. + * + * @param query The pending asynchronous query to be cancelled. + * @param notify If non-zero, the callback will be called with failure + * status to notify that the query has been cancelled. + * + * @return PJ_SUCCESS on success, or the appropriate error code, + */ +PJ_DECL(pj_status_t) pj_dns_srv_cancel_query(pj_dns_srv_async_query *query, + pj_bool_t notify); /** -- cgit v1.2.3