[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ayttm-commits] CVS: ayttm/modules/msn2/libmsn2 msn_core.C,1.34,1.35 ms
From: |
Colin Leroy <address@hidden> |
Subject: |
[Ayttm-commits] CVS: ayttm/modules/msn2/libmsn2 msn_core.C,1.34,1.35 msn_core.h,1.10,1.11 |
Date: |
Wed, 19 Mar 2003 19:18:11 -0500 |
Update of /cvsroot/ayttm/ayttm/modules/msn2/libmsn2
In directory subversions:/tmp/cvs-serv19082/modules/msn2/libmsn2
Modified Files:
msn_core.C msn_core.h
Log Message:
Differentiate between netmeeting requests and SIP
requests (and don't handle SIP)
Index: msn_core.C
===================================================================
RCS file: /cvsroot/ayttm/ayttm/modules/msn2/libmsn2/msn_core.C,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- msn_core.C 19 Mar 2003 23:18:45 -0000 1.34
+++ msn_core.C 20 Mar 2003 00:18:09 -0000 1.35
@@ -988,7 +988,7 @@
msn_del_from_llist(conn->invitations_in, inv);
}
delete inv;
- } else if (inv->app == APP_NETMEETING) {
+ } else if (inv->app == APP_VOICE) {
if(inv_is_out)
{
msn_del_from_llist(conn->invitations_out, inv);
@@ -1033,18 +1033,39 @@
if(tmp1!=NULL) { delete tmp1; tmp1=NULL;}
if(tmp2!=NULL) { delete tmp2; tmp1=NULL;}
} else if ((tmp1=msn_find_in_mime(body, "Session-Protocol")) != NULL) {
+ tmp2=msn_find_in_mime(body, "Context-Data");
invitation_voice * inv=new invitation_voice;
invg=inv;
- invg->app=APP_NETMEETING;
+ invg->app=tmp2 ? APP_VOICE:APP_NETMEETING;
invg->other_user=msn_permstring(from);
invg->cookie=msn_find_in_mime(body, "Invitation-Cookie");
invg->conn=conn;
inv->sessionid=msn_find_in_mime(body, "Session-ID");
-
- ext_netmeeting_invite(conn, from, friendlyname, inv);
- if(tmp1!=NULL) { delete tmp1; tmp1=NULL;}
- if(tmp2!=NULL) { delete tmp2; tmp1=NULL;}
+ if(invg->app == APP_VOICE) {
+ /*
+ SIP doesn't seem really fun to implement
+
+ http://www.radvision.com/papers/C1_What_is_SIP.html
+ http://www.cs.ucl.ac.uk/staff/J.Crowcroft/mmbook/book/node185.html
+ */
+ ext_show_error(conn, "Your contact tries to use the "
+ "SIP MSN Voice Protocol. "
+ "SIP isn't supported yet.\n"
+ "You may ask your contact to use netmeeting, which "
+ "is supported.");
+ delete tmp2;
+ delete tmp1;
+ msn_netmeeting_reject(inv);
+ delete invg;
+ invg=NULL;
+ recognized = 1;
+ } else {
+ ext_netmeeting_invite(conn, from, friendlyname, inv);
+
+ if(tmp1!=NULL) { delete tmp1; tmp1=NULL;}
+ if(tmp2!=NULL) { delete tmp2; tmp1=NULL;}
+ }
}
@@ -1726,7 +1747,9 @@
{
message * msg=new message;
- sprintf(buf, "Invitation-Command: ACCEPT\r\n"
+ if (inv->app == APP_NETMEETING) {
+ if(DEBUG) printf("ACCEPTING NETMEETING\n");
+ sprintf(buf, "Invitation-Command: ACCEPT\r\n"
"Invitation-Cookie: %s\r\n"
"Launch-Application: TRUE\r\n"
"Session-ID: %s\r\n"
@@ -1736,6 +1759,21 @@
inv->cookie,
inv->sessionid,
ext_get_IP());
+ } else { /* SIP voice ... will be supported one day or another */
+ if (DEBUG) printf("ACCEPTING VOICE\n");
+ sprintf(buf, "Invitation-Command: ACCEPT\r\n"
+ "Invitation-Cookie: %s\r\n"
+ "Launch-Application: FALSE\r\n"
+ "Session-ID: %s\r\n"
+ "Context-Data: Requested:SIP_A,;Capabilities:SIP_A,;\r\n"
+ "Session-Protocol: SM1\r\n"
+ "Request-Data: IP-Address:\r\n"
+ "IP-Address: %s\r\n\r\n",
+ inv->cookie,
+ inv->sessionid,
+ ext_get_IP());
+
+ }
msg->body=msn_permstring(buf);
msg->content=msn_permstring("text/x-msmsgsinvite; charset=UTF-8");
msn_send_IM(inv->conn, NULL, msg);
Index: msn_core.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/modules/msn2/libmsn2/msn_core.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- msn_core.h 19 Mar 2003 23:15:27 -0000 1.10
+++ msn_core.h 20 Mar 2003 00:18:09 -0000 1.11
@@ -142,7 +142,8 @@
};
#define APP_FTP 1 // NOTE: this is MSN file transfer, which is NOTHING
to do with ordinary FTP!
-#define APP_NETMEETING 2
+#define APP_VOICE 2
+#define APP_NETMEETING 3
class invitation_ftp : public invitation
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Ayttm-commits] CVS: ayttm/modules/msn2/libmsn2 msn_core.C,1.34,1.35 msn_core.h,1.10,1.11,
Colin Leroy <address@hidden> <=