Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- ../tmp/certified-asterisk-1.8.15-cert1/channels/chan_sip.c 2013-01-02 14:39:05.000000000 -0500
- +++ channels/chan_sip.c 2013-03-13 10:53:45.487036563 -0400
- @@ -27480,16 +27480,13 @@
- }
- } else if (!strcasecmp(v->name, "nat")) {
- ast_set_flag(&mask[0], SIP_NAT_FORCE_RPORT);
- - ast_set_flag(&flags[0], SIP_NAT_FORCE_RPORT); /* Default to "force_rport" */
- - if (!strcasecmp(v->value, "no")) {
- - ast_clear_flag(&flags[0], SIP_NAT_FORCE_RPORT);
- - } else if (!strcasecmp(v->value, "yes")) {
- - /* We've already defaulted to force_rport */
- - ast_set_flag(&mask[1], SIP_PAGE2_SYMMETRICRTP);
- + ast_set_flag(&mask[1], SIP_PAGE2_SYMMETRICRTP);
- + if (!strcasecmp(v->value, "yes")) {
- + ast_set_flag(&flags[0], SIP_NAT_FORCE_RPORT);
- ast_set_flag(&flags[1], SIP_PAGE2_SYMMETRICRTP);
- + } else if (!strcasecmp(v->value, "force_rport")) {
- + ast_set_flag(&flags[0], SIP_NAT_FORCE_RPORT);
- } else if (!strcasecmp(v->value, "comedia")) {
- - ast_clear_flag(&flags[0], SIP_NAT_FORCE_RPORT);
- - ast_set_flag(&mask[1], SIP_PAGE2_SYMMETRICRTP);
- ast_set_flag(&flags[1], SIP_PAGE2_SYMMETRICRTP);
- }
- } else if (!strcasecmp(v->name, "directmedia") || !strcasecmp(v->name, "canreinvite")) {
- @@ -28643,7 +28640,8 @@
- struct sip_peer *peer;
- char *cat, *stringp, *context, *oldregcontext;
- char newcontexts[AST_MAX_CONTEXT], oldcontexts[AST_MAX_CONTEXT];
- - struct ast_flags dummy[2];
- + struct ast_flags dummy[2] = {{0}};
- + struct ast_flags setflags[2] = {{0}};
- struct ast_flags config_flags = { reason == CHANNEL_MODULE_LOAD ? 0 : ast_test_flag(&global_flags[1], SIP_PAGE2_RTCACHEFRIENDS) ? 0 : CONFIG_FLAG_FILEUNCHANGED };
- int auto_sip_domains = FALSE;
- struct ast_sockaddr old_bindaddr = bindaddr;
- @@ -28881,10 +28879,10 @@
- /* Read the [general] config section of sip.conf (or from realtime config) */
- for (v = ast_variable_browse(cfg, "general"); v; v = v->next) {
- - if (handle_common_options(&global_flags[0], &dummy[0], v)) {
- + if (handle_common_options(&setflags[0], &dummy[0], v)) {
- continue;
- }
- - if (handle_t38_options(&global_flags[0], &dummy[0], v, &global_t38_maxdatagram)) {
- + if (handle_t38_options(&setflags[0], &dummy[0], v, &global_t38_maxdatagram)) {
- continue;
- }
- /* handle jb conf */
- @@ -29371,6 +29369,11 @@
- }
- }
- + /* Override global defaults if setting found in general section */
- + ast_copy_flags(&global_flags[0], &setflags[0], dummy[0].flags);
- + ast_copy_flags(&global_flags[1], &setflags[1], dummy[1].flags);
- + ast_copy_flags(&global_flags[2], &setflags[2], dummy[2].flags);
- +
- if (subscribe_network_change) {
- network_change_event_subscribe();
- } else {
Advertisement
Add Comment
Please, Sign In to add comment