Mercurial > pidgin.yaz
comparison libpurple/protocols/msn/slp.c @ 29778:cece09dbb119
merge of 'e9d34ab5e47f22b35fd2d69d61a2c943cc0653db'
and 'fc3d5c2a3920e0875ac235415cea9fc7f5ed780c'
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 18 Feb 2010 08:10:58 +0000 |
parents | 69077f3993f6 |
children | 1a9977557dc9 c5a7516418c7 |
comparison
equal
deleted
inserted
replaced
29777:46abe1203e0b | 29778:cece09dbb119 |
---|---|
739 } | 739 } |
740 | 740 |
741 if (!strncmp(body, "INVITE", strlen("INVITE"))) | 741 if (!strncmp(body, "INVITE", strlen("INVITE"))) |
742 { | 742 { |
743 char *branch; | 743 char *branch; |
744 char *call_id; | |
744 char *content; | 745 char *content; |
745 char *content_type; | 746 char *content_type; |
746 | |
747 slpcall = msn_slpcall_new(slplink); | |
748 | 747 |
749 /* From: <msnmsgr:buddy@hotmail.com> */ | 748 /* From: <msnmsgr:buddy@hotmail.com> */ |
750 #if 0 | 749 #if 0 |
751 slpcall->remote_user = get_token(body, "From: <msnmsgr:", ">\r\n"); | 750 slpcall->remote_user = get_token(body, "From: <msnmsgr:", ">\r\n"); |
752 #endif | 751 #endif |
753 | 752 |
754 branch = get_token(body, ";branch={", "}"); | 753 branch = get_token(body, ";branch={", "}"); |
755 | 754 |
756 slpcall->id = get_token(body, "Call-ID: {", "}"); | 755 call_id = get_token(body, "Call-ID: {", "}"); |
757 | 756 |
758 #if 0 | 757 #if 0 |
759 long content_len = -1; | 758 long content_len = -1; |
760 | 759 |
761 temp = get_token(body, "Content-Length: ", "\r\n"); | 760 temp = get_token(body, "Content-Length: ", "\r\n"); |
765 #endif | 764 #endif |
766 content_type = get_token(body, "Content-Type: ", "\r\n"); | 765 content_type = get_token(body, "Content-Type: ", "\r\n"); |
767 | 766 |
768 content = get_token(body, "\r\n\r\n", NULL); | 767 content = get_token(body, "\r\n\r\n", NULL); |
769 | 768 |
770 if (branch && content_type && content) | 769 if (branch && call_id && content_type && content) |
771 { | 770 { |
771 slpcall = msn_slpcall_new(slplink); | |
772 slpcall->id = call_id; | |
772 got_invite(slpcall, branch, content_type, content); | 773 got_invite(slpcall, branch, content_type, content); |
773 } | 774 } |
774 else | 775 else |
775 { | 776 { |
776 msn_slpcall_destroy(slpcall); | 777 g_free(call_id); |
777 slpcall = NULL; | 778 slpcall = NULL; |
778 } | 779 } |
779 | 780 |
780 g_free(branch); | 781 g_free(branch); |
781 g_free(content_type); | 782 g_free(content_type); |