summaryrefslogtreecommitdiff
path: root/pjlib-util/include
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2008-12-19 12:26:42 +0000
committerBenny Prijono <bennylp@teluu.com>2008-12-19 12:26:42 +0000
commit7768c2201f3ec97439ffe515da4513e95b70100a (patch)
treea320cf40cc38df87470b3c06c166fa151e9c6078 /pjlib-util/include
parent35b0514196eaa7973d98a30d8aef3dcc7dd0fee2 (diff)
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
Diffstat (limited to 'pjlib-util/include')
-rw-r--r--pjlib-util/include/pjlib-util/srv_resolver.h18
1 files changed, 17 insertions, 1 deletions
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);
/**