Mercurial > pidgin
comparison src/protocols/simple/simple.c @ 11190:fde0f4c1348d
[gaim-migrate @ 13308]
- UDP fix
- 501 response on unknown requests
committer: Tailor Script <tailor@pidgin.im>
| author | Thomas Butter <tbutter> |
|---|---|
| date | Thu, 04 Aug 2005 09:19:57 +0000 |
| parents | 5f79dfde334c |
| children | d4c34046f942 |
comparison
equal
deleted
inserted
replaced
| 11189:5f79dfde334c | 11190:fde0f4c1348d |
|---|---|
| 376 gaim_debug(GAIM_DEBUG_MISC, "simple", "header %s", auth); | 376 gaim_debug(GAIM_DEBUG_MISC, "simple", "header %s", auth); |
| 377 } | 377 } |
| 378 | 378 |
| 379 | 379 |
| 380 buf = g_strdup_printf("%s %s SIP/2.0\r\n" | 380 buf = g_strdup_printf("%s %s SIP/2.0\r\n" |
| 381 "Via: SIP/2.0/TCP %s:%d;branch=%s\r\n" | 381 "Via: SIP/2.0/%s %s:%d;branch=%s\r\n" |
| 382 "From: <sip:%s@%s>;tag=%s\r\n" | 382 "From: <sip:%s@%s>;tag=%s\r\n" |
| 383 "To: <%s>%s%s\r\n" | 383 "To: <%s>%s%s\r\n" |
| 384 "Max-Forwards: 10\r\n" | 384 "Max-Forwards: 10\r\n" |
| 385 "CSeq: %d %s\r\n" | 385 "CSeq: %d %s\r\n" |
| 386 "User-Agent: Gaim SIP/SIMPLE Plugin\r\n" | 386 "User-Agent: Gaim SIP/SIMPLE Plugin\r\n" |
| 387 "Call-ID: %s\r\n" | 387 "Call-ID: %s\r\n" |
| 388 "%s%s" | 388 "%s%s" |
| 389 "Content-Length: %d\r\n\r\n%s", | 389 "Content-Length: %d\r\n\r\n%s", |
| 390 method, | 390 method, |
| 391 url, | 391 url, |
| 392 sip->udp ? "UDP" : "TCP", | |
| 392 sip->ip, | 393 sip->ip, |
| 393 sip->listenport, | 394 sip->listenport, |
| 394 branch, | 395 branch, |
| 395 sip->username, | 396 sip->username, |
| 396 sip->servername, | 397 sip->servername, |
| 823 found = 1; | 824 found = 1; |
| 824 } | 825 } |
| 825 if(!strcmp(msg->method, "SUBSCRIBE")) { | 826 if(!strcmp(msg->method, "SUBSCRIBE")) { |
| 826 process_incoming_subscribe(sip, msg); | 827 process_incoming_subscribe(sip, msg); |
| 827 found = 1; | 828 found = 1; |
| 829 } | |
| 830 if(!found) { | |
| 831 send_sip_response(sip->gc, msg, 501, "Not implemented", NULL); | |
| 828 } | 832 } |
| 829 } else { // response | 833 } else { // response |
| 830 struct transaction *trans = transactions_find(sip, msg); | 834 struct transaction *trans = transactions_find(sip, msg); |
| 831 if(trans) { | 835 if(trans) { |
| 832 if(msg->response == 407) { | 836 if(msg->response == 407) { |
