[Asterisk-code-review] stringfields: Collect extended stringfields into the stringf... (asterisk[master])
Jenkins2
asteriskteam at digium.com
Wed Apr 18 17:43:02 CDT 2018
Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/8785 )
Change subject: stringfields: Collect extended stringfields into the stringfield section.
......................................................................
stringfields: Collect extended stringfields into the stringfield section.
Use of extended stringfields is a temporary mechanism to avoid ABI
breakage in released branches without resorting to more inconvienient
methods.
* Collect existing extended stringfields into the parent stringfield
section of the struct.
Change-Id: I8d46d037801b4518837c3ea4b6df95ceadc9436b
---
M include/asterisk/res_pjsip.h
M include/asterisk/stasis_bridges.h
M main/stasis_bridges.c
M res/res_pjsip/location.c
M res/res_pjsip/pjsip_configuration.c
5 files changed, 14 insertions(+), 22 deletions(-)
Approvals:
Joshua Colp: Looks good to me, but someone else must approve
Corey Farrell: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Jenkins2: Approved for Submit
diff --git a/include/asterisk/res_pjsip.h b/include/asterisk/res_pjsip.h
index 092bb84..d2ae39b 100644
--- a/include/asterisk/res_pjsip.h
+++ b/include/asterisk/res_pjsip.h
@@ -258,6 +258,14 @@
AST_STRING_FIELD(user_agent);
/*! The name of the aor this contact belongs to */
AST_STRING_FIELD(aor);
+ /*! Asterisk Server name */
+ AST_STRING_FIELD(reg_server);
+ /*! IP-address of the Via header in REGISTER request */
+ AST_STRING_FIELD(via_addr);
+ /*! Content of the Call-ID header in REGISTER request */
+ AST_STRING_FIELD(call_id);
+ /*! The name of the endpoint that added the contact */
+ AST_STRING_FIELD(endpoint_name);
);
/*! Absolute time that this contact is no longer valid after */
struct timeval expiration_time;
@@ -269,16 +277,8 @@
double qualify_timeout;
/*! Endpoint that added the contact, only available in observers */
struct ast_sip_endpoint *endpoint;
- /*! Asterisk Server name */
- AST_STRING_FIELD_EXTENDED(reg_server);
- /*! IP-address of the Via header in REGISTER request */
- AST_STRING_FIELD_EXTENDED(via_addr);
- /* Port of the Via header in REGISTER request */
+ /*! Port of the Via header in REGISTER request */
int via_port;
- /*! Content of the Call-ID header in REGISTER request */
- AST_STRING_FIELD_EXTENDED(call_id);
- /*! The name of the endpoint that added the contact */
- AST_STRING_FIELD_EXTENDED(endpoint_name);
/*! If true delete the contact on Asterisk restart/boot */
int prune_on_boot;
};
@@ -751,6 +751,8 @@
AST_STRING_FIELD(message_context);
/*! Accountcode to auto-set on channels */
AST_STRING_FIELD(accountcode);
+ /*! If set, we'll push incoming MWI NOTIFYs to stasis using this mailbox */
+ AST_STRING_FIELD(incoming_mwi_mailbox);
);
/*! Configuration for extensions */
struct ast_sip_endpoint_extensions extensions;
@@ -812,8 +814,6 @@
unsigned int refer_blind_progress;
/*! Whether to notifies dialog-info 'early' on INUSE && RINGING state */
unsigned int notify_early_inuse_ringing;
- /*! If set, we'll push incoming MWI NOTIFYs to stasis using this mailbox */
- AST_STRING_FIELD_EXTENDED(incoming_mwi_mailbox);
};
/*! URI parameter for symmetric transport */
diff --git a/include/asterisk/stasis_bridges.h b/include/asterisk/stasis_bridges.h
index 05d356c..a455a5b 100644
--- a/include/asterisk/stasis_bridges.h
+++ b/include/asterisk/stasis_bridges.h
@@ -46,6 +46,8 @@
AST_STRING_FIELD(creator);
/*! Name given to the bridge by its creator */
AST_STRING_FIELD(name);
+ /*! Unique ID of the channel providing video, if one exists */
+ AST_STRING_FIELD(video_source_id);
);
/*! AO2 container of bare channel uniqueid strings participating in the bridge.
* Allocated from ast_str_container_alloc() */
@@ -60,8 +62,6 @@
unsigned int num_active;
/*! The video mode of the bridge */
enum ast_bridge_video_mode_type video_mode;
- /*! Unique ID of the channel providing video, if one exists */
- AST_STRING_FIELD_EXTENDED(video_source_id);
};
/*!
diff --git a/main/stasis_bridges.c b/main/stasis_bridges.c
index 4b68559..59b9685 100644
--- a/main/stasis_bridges.c
+++ b/main/stasis_bridges.c
@@ -246,8 +246,7 @@
return NULL;
}
- if (ast_string_field_init(snapshot, 128)
- || ast_string_field_init_extended(snapshot, video_source_id)) {
+ if (ast_string_field_init(snapshot, 128)) {
ao2_ref(snapshot, -1);
return NULL;
diff --git a/res/res_pjsip/location.c b/res/res_pjsip/location.c
index 22da805..6e79dc4 100644
--- a/res/res_pjsip/location.c
+++ b/res/res_pjsip/location.c
@@ -133,11 +133,6 @@
return NULL;
}
- ast_string_field_init_extended(contact, endpoint_name);
- ast_string_field_init_extended(contact, reg_server);
- ast_string_field_init_extended(contact, via_addr);
- ast_string_field_init_extended(contact, call_id);
-
/* Dynamic contacts are delimited with ";@" and static ones with "@@" */
if ((aor_separator = strstr(id, ";@")) || (aor_separator = strstr(id, "@@"))) {
*aor_separator = '\0';
diff --git a/res/res_pjsip/pjsip_configuration.c b/res/res_pjsip/pjsip_configuration.c
index 3094f24..fb84a1f 100644
--- a/res/res_pjsip/pjsip_configuration.c
+++ b/res/res_pjsip/pjsip_configuration.c
@@ -2248,8 +2248,6 @@
return NULL;
}
- ast_string_field_init_extended(endpoint, incoming_mwi_mailbox);
-
if (!(endpoint->media.codecs = ast_format_cap_alloc(AST_FORMAT_CAP_FLAG_DEFAULT))) {
ao2_cleanup(endpoint);
return NULL;
--
To view, visit https://gerrit.asterisk.org/8785
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I8d46d037801b4518837c3ea4b6df95ceadc9436b
Gerrit-Change-Number: 8785
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180418/980cbe1f/attachment.html>
More information about the asterisk-code-review
mailing list