mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 13:12:03 +00:00
FS-3471 making this the new default and patching libdingaling to use it exclusively with openssl, now we actually have single thread for gtalk an no gah noodlez
This commit is contained in:
@@ -145,6 +145,12 @@
|
||||
<Project>{e727e8f6-935d-46fe-8b0e-37834748a0e3}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\libs\win32\openssl\libeay32.2010.vcxproj">
|
||||
<Project>{d331904d-a00a-4694-a5a3-fcff64ab5dbe}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\libs\win32\openssl\ssleay32.2010.vcxproj">
|
||||
<Project>{b4b62169-5ad4-4559-8707-3d933ac5db39}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\w32\Library\FreeSwitchCore.2010.vcxproj">
|
||||
<Project>{202d7a4e-760d-4d0e-afa1-d7459ced30ff}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
|
||||
@@ -495,18 +495,24 @@ static switch_status_t chat_send(switch_event_t *message_event)
|
||||
mdl_profile_t *profile = NULL;
|
||||
const char *proto;
|
||||
const char *from;
|
||||
const char *from_full;
|
||||
const char *to_full;
|
||||
const char *to;
|
||||
const char *body;
|
||||
const char *hint;
|
||||
const char *profile_name;
|
||||
|
||||
proto = switch_event_get_header(message_event, "proto");
|
||||
from = switch_event_get_header(message_event, "from");
|
||||
from_full = switch_event_get_header(message_event, "from_full");
|
||||
to_full = switch_event_get_header(message_event, "to_full");
|
||||
to = switch_event_get_header(message_event, "to");
|
||||
body = switch_event_get_body(message_event);
|
||||
hint = switch_event_get_header(message_event, "hint");
|
||||
profile_name = switch_event_get_header(message_event, "ldl_profile");
|
||||
|
||||
switch_assert(proto != NULL);
|
||||
|
||||
|
||||
if (from && (f_user = strdup(from))) {
|
||||
if ((f_host = strchr(f_user, '@'))) {
|
||||
*f_host++ = '\0';
|
||||
@@ -516,12 +522,18 @@ static switch_status_t chat_send(switch_event_t *message_event)
|
||||
}
|
||||
}
|
||||
|
||||
if (to && (user = strdup(to))) {
|
||||
if ((profile_name && (profile = switch_core_hash_find(globals.profile_hash, profile_name)))) {
|
||||
from = from_full;
|
||||
to = to_full;
|
||||
|
||||
ldl_handle_send_msg(profile->handle, (char *) from, (char *) to, NULL, switch_str_nil(body));
|
||||
} else if (to && (user = strdup(to))) {
|
||||
if ((host = strchr(user, '@'))) {
|
||||
*host++ = '\0';
|
||||
}
|
||||
|
||||
if (f_host && (profile = switch_core_hash_find(globals.profile_hash, f_host))) {
|
||||
if (f_host && ((profile_name && (profile = switch_core_hash_find(globals.profile_hash, profile_name)))
|
||||
|| (profile = switch_core_hash_find(globals.profile_hash, f_host)))) {
|
||||
|
||||
if (!strcmp(proto, MDL_CHAT_PROTO)) {
|
||||
from = hint;
|
||||
@@ -2931,6 +2943,8 @@ static ldl_status handle_signalling(ldl_handle_t *handle, ldl_session_t *dlsessi
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "subject", subject);
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "type", "text/plain");
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "hint", hint);
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "from_full", hint);
|
||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "ldl_profile", profile->name);
|
||||
|
||||
if (msg) {
|
||||
switch_event_add_body(event, "%s", msg);
|
||||
@@ -2941,12 +2955,14 @@ static ldl_status handle_signalling(ldl_handle_t *handle, ldl_session_t *dlsessi
|
||||
|
||||
switch_safe_free(from_user);
|
||||
|
||||
if (strcasecmp(proto, MDL_CHAT_PROTO)) { /* yes no ! on purpose */
|
||||
switch_core_chat_send(proto, event);
|
||||
if (!zstr(msg)) {
|
||||
if (strcasecmp(proto, MDL_CHAT_PROTO)) { /* yes no ! on purpose */
|
||||
switch_core_chat_send(proto, event);
|
||||
}
|
||||
|
||||
switch_core_chat_send("GLOBAL", event);
|
||||
}
|
||||
|
||||
switch_core_chat_send("GLOBAL", event);
|
||||
|
||||
switch_event_destroy(&event);
|
||||
|
||||
switch_safe_free(pproto);
|
||||
|
||||
Reference in New Issue
Block a user