Skip to content

When 100rel is disabled, don't advertise PRACK as an allowed method #23

@GoogleCodeExporter

Description

@GoogleCodeExporter
What steps will reproduce the problem?
1. If 100rel support is disabled (PRACK)
2.
3.

What is the expected output? What do you see instead?

Currently even if 100rel support is not enabled, PRACK is advertised as being 
supported. Here is a proposed patch

Index: include/tinysip/headers/tsip_header_Allow.h
===================================================================
--- include/tinysip/headers/tsip_header_Allow.h (revision previous)
+++ include/tinysip/headers/tsip_header_Allow.h (revision new)
@@ -36,6 +36,7 @@
 TSIP_BEGIN_DECLS

 #define TSIP_HEADER_ALLOW_DEFAULT      "ACK, BYE, CANCEL, INVITE, MESSAGE, NOTIFY, OPTIONS, PRACK, REFER, UPDATE"
+#define TSIP_HEADER_ALLOW_NOPRACK      "ACK, BYE, CANCEL, INVITE, MESSAGE, 
NOTIFY, OPTIONS, REFER, UPDATE"
 #define TSIP_HEADER_STR                            "Allow:"TSIP_HEADER_ALLOW_DEFAULT"\r\n"

 ///////////////////////////////////////////////////////////////////////////////
/////////////////////
Index: src/dialogs/tsip_dialog_invite.c
===================================================================
--- src/dialogs/tsip_dialog_invite.c    (revision previous)
+++ src/dialogs/tsip_dialog_invite.c    (revision new)
@@ -1135,10 +1135,17 @@
                        }

                        /* Add Allow header */
-                       tsip_message_add_headers(response,
+                       if(self->supported._100rel){
+                               tsip_message_add_headers(response,
                                                TSIP_HEADER_DUMMY_VA_ARGS("Allow", TSIP_HEADER_ALLOW_DEFAULT),
                                                tsk_null
                                        );
+                       } else {
+                               tsip_message_add_headers(response,
+                                               
TSIP_HEADER_DUMMY_VA_ARGS("Allow", TSIP_HEADER_ALLOW_NOPRACK),
+                                               tsk_null
+                                       );
+                       }
                }

                ret = tsip_dialog_response_send(TSIP_DIALOG(self), response);
What version of the product are you using? On what operating system?


Please provide any additional information below.


Original issue reported on code.google.com by saket...@gmail.com on 14 Oct 2010 at 12:55

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions