mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-26 04:27:25 +00:00
update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1331 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
3252e6ef68
commit
00219ede9d
@ -964,7 +964,7 @@ unsigned int ldl_session_candidates(ldl_session_t *session,
|
|||||||
|
|
||||||
char *ldl_handle_probe(ldl_handle_t *handle, char *id, char *buf, unsigned int len)
|
char *ldl_handle_probe(ldl_handle_t *handle, char *id, char *buf, unsigned int len)
|
||||||
{
|
{
|
||||||
iks *pres, *msg;
|
iks *pres, *msg, *disco, *q;
|
||||||
char *lid = NULL;
|
char *lid = NULL;
|
||||||
struct ldl_buffer buffer;
|
struct ldl_buffer buffer;
|
||||||
apr_time_t started;
|
apr_time_t started;
|
||||||
@ -978,13 +978,24 @@ char *ldl_handle_probe(ldl_handle_t *handle, char *id, char *buf, unsigned int l
|
|||||||
|
|
||||||
pres = iks_new("presence");
|
pres = iks_new("presence");
|
||||||
iks_insert_attrib(pres, "type", "probe");
|
iks_insert_attrib(pres, "type", "probe");
|
||||||
|
iks_insert_attrib(pres, "xtype", "ping");
|
||||||
iks_insert_attrib(pres, "to", id);
|
iks_insert_attrib(pres, "to", id);
|
||||||
|
|
||||||
|
disco = iks_new("iq");
|
||||||
|
iks_insert_attrib(disco, "type", "get");
|
||||||
|
iks_insert_attrib(disco, "from", handle->login);
|
||||||
|
iks_insert_attrib(disco, "to", id);
|
||||||
|
iks_insert_attrib(disco, "id", "ping");
|
||||||
|
q = iks_insert(disco, "query");
|
||||||
|
iks_insert_attrib(q, "xmlns", "http://jabber.org/protocol/disco#info");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
apr_hash_set(handle->probe_hash, id, APR_HASH_KEY_STRING, &buffer);
|
apr_hash_set(handle->probe_hash, id, APR_HASH_KEY_STRING, &buffer);
|
||||||
|
|
||||||
msg = iks_make_s10n (IKS_TYPE_SUBSCRIBE, id, notice);
|
msg = iks_make_s10n (IKS_TYPE_SUBSCRIBE, id, notice);
|
||||||
|
apr_queue_push(handle->queue, msg);
|
||||||
msg = iks_make_s10n (IKS_TYPE_SUBSCRIBED, id, notice);
|
msg = iks_make_s10n (IKS_TYPE_SUBSCRIBED, id, notice);
|
||||||
|
|
||||||
apr_queue_push(handle->queue, msg);
|
apr_queue_push(handle->queue, msg);
|
||||||
apr_queue_push(handle->queue, pres);
|
apr_queue_push(handle->queue, pres);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user