| 740 |
740 |
| 741 if (!strncmp(body, "INVITE", strlen("INVITE"))) |
741 if (!strncmp(body, "INVITE", strlen("INVITE"))) |
| 742 { |
742 { |
| 743 /* This is an INVITE request */ |
743 /* This is an INVITE request */ |
| 744 char *branch; |
744 char *branch; |
| |
745 char *call_id; |
| 745 char *content; |
746 char *content; |
| 746 char *content_type; |
747 char *content_type; |
| 747 |
|
| 748 slpcall = msn_slpcall_new(slplink); |
|
| 749 |
748 |
| 750 /* From: <msnmsgr:buddy@hotmail.com> */ |
749 /* From: <msnmsgr:buddy@hotmail.com> */ |
| 751 #if 0 |
750 #if 0 |
| 752 slpcall->remote_user = get_token(body, "From: <msnmsgr:", ">\r\n"); |
751 slpcall->remote_user = get_token(body, "From: <msnmsgr:", ">\r\n"); |
| 753 #endif |
752 #endif |
| 754 |
753 |
| 755 branch = get_token(body, ";branch={", "}"); |
754 branch = get_token(body, ";branch={", "}"); |
| 756 |
755 |
| 757 slpcall->id = get_token(body, "Call-ID: {", "}"); |
756 call_id = get_token(body, "Call-ID: {", "}"); |
| 758 |
757 |
| 759 #if 0 |
758 #if 0 |
| 760 long content_len = -1; |
759 long content_len = -1; |
| 761 |
760 |
| 762 temp = get_token(body, "Content-Length: ", "\r\n"); |
761 temp = get_token(body, "Content-Length: ", "\r\n"); |
| 766 #endif |
765 #endif |
| 767 content_type = get_token(body, "Content-Type: ", "\r\n"); |
766 content_type = get_token(body, "Content-Type: ", "\r\n"); |
| 768 |
767 |
| 769 content = get_token(body, "\r\n\r\n", NULL); |
768 content = get_token(body, "\r\n\r\n", NULL); |
| 770 |
769 |
| 771 if (branch && content_type && content) |
770 if (branch && call_id && content_type && content) |
| 772 { |
771 { |
| |
772 slpcall = msn_slpcall_new(slplink); |
| |
773 slpcall->id = call_id; |
| 773 got_invite(slpcall, branch, content_type, content); |
774 got_invite(slpcall, branch, content_type, content); |
| 774 } |
775 } |
| 775 else |
776 else |
| 776 { |
777 { |
| 777 msn_slpcall_destroy(slpcall); |
778 g_free(call_id); |
| 778 slpcall = NULL; |
779 slpcall = NULL; |
| 779 } |
780 } |
| 780 |
781 |
| 781 g_free(branch); |
782 g_free(branch); |
| 782 g_free(content_type); |
783 g_free(content_type); |