tweak to jingle

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3624 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2006-12-12 17:44:59 +00:00
parent 34be89ec13
commit 322ecbbb9b
4 changed files with 17 additions and 13 deletions

View File

@@ -701,6 +701,8 @@ static int on_presence(void *user_data, ikspak *pak)
if (type && !strcasecmp(type, "unavailable")) {
signal = LDL_SIGNAL_PRESENCE_OUT;
} else if (type && !strcasecmp(type, "probe")) {
signal = LDL_SIGNAL_PRESENCE_PROBE;
} else {
signal = LDL_SIGNAL_PRESENCE_IN;
}
@@ -725,20 +727,15 @@ static int on_presence(void *user_data, ikspak *pak)
}
if (resource && strstr(resource, "talk") && (buffer = apr_hash_get(handle->probe_hash, id, APR_HASH_KEY_STRING))) {
apr_cpystrn(buffer->buf, from, buffer->len);
fflush(stderr);
buffer->hit = 1;
}
if (!type || (type && strcasecmp(type, "probe"))) {
if (handle->session_callback) {
handle->session_callback(handle, NULL, signal, to, id, status ? status : "n/a", show ? show : "n/a");
}
}
if (handle->session_callback) {
handle->session_callback(handle, NULL, signal, to, id, status ? status : "n/a", show ? show : "n/a");
}
return IKS_FILTER_EAT;
}

View File

@@ -125,6 +125,7 @@ typedef enum {
LDL_SIGNAL_MSG,
LDL_SIGNAL_PRESENCE_IN,
LDL_SIGNAL_PRESENCE_OUT,
LDL_SIGNAL_PRESENCE_PROBE,
LDL_SIGNAL_ROSTER,
LDL_SIGNAL_SUBSCRIBE,
LDL_SIGNAL_UNSUBSCRIBE,