- remove whitespaces between tags in received XML packets before giving

them to the parser ;
- report Gtalk error messages from a buddy to the console.

This patch makes Asterisk "Google Jingle" (chan_gtalk) implementation
work with Empathy. Note that this is only true for audio streams, not
video.

Thank you to PH for his great help!

(closes issue #12647)
Reported by: PH
Patches:
      trunk-12647-1.diff uploaded by phsultan (license 73)
Tested by: phsultan, PH

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@118020 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Philippe Sultan
2008-05-23 10:33:21 +00:00
parent a668a87a80
commit de98d48a0d
2 changed files with 38 additions and 4 deletions

View File

@@ -1702,7 +1702,10 @@ static int gtalk_parser(void *data, ikspak *pak)
{
struct gtalk *client = ASTOBJ_REF((struct gtalk *) data);
if (iks_find_with_attrib(pak->x, "session", "type", "initiate")) {
if (iks_find_attrib(pak->x, "type") && !strcmp(iks_find_attrib (pak->x, "type"),"error")) {
ast_log(LOG_NOTICE, "Remote peer reported an error, trying to establish the call anyway\n");
}
else if (iks_find_with_attrib(pak->x, "session", "type", "initiate")) {
/* New call */
gtalk_newcall(client, pak);
} else if (iks_find_with_attrib(pak->x, "session", "type", "candidates") || iks_find_with_attrib(pak->x, "session", "type", "transport-info")) {