[Asterisk-code-review] sched: Make ABI compatible between dev mode and non-dev mode. (asterisk[15])

George Joseph asteriskteam at digium.com
Mon Jul 23 13:31:43 CDT 2018


George Joseph has submitted this change and it was merged. ( https://gerrit.asterisk.org/9569 )

Change subject: sched: Make ABI compatible between dev mode and non-dev mode.
......................................................................

sched: Make ABI compatible between dev mode and non-dev mode.

In the past there was an assertion in the ast_sched_del function
and in order to ensure it was useful the calling function name,
line number, and filename had to be passed in. This cause the ABI
to be different between dev mode and non-dev mode.

This assertion is no longer present so the special logic can be
removed to make it the same between them both.

Change-Id: Icbc69c801e357d7004efc5cf2ab936d9b83b6ab8
---
M include/asterisk/sched.h
M main/sched.c
2 files changed, 0 insertions(+), 9 deletions(-)

Approvals:
  Corey Farrell: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved; Approved for Submit



diff --git a/include/asterisk/sched.h b/include/asterisk/sched.h
index fb63081..804b05c 100644
--- a/include/asterisk/sched.h
+++ b/include/asterisk/sched.h
@@ -284,12 +284,7 @@
  *
  * \return Returns 0 on success, -1 on failure
  */
-#ifndef AST_DEVMODE
 int ast_sched_del(struct ast_sched_context *con, int id) attribute_warn_unused_result;
-#else
-int _ast_sched_del(struct ast_sched_context *con, int id, const char *file, int line, const char *function) attribute_warn_unused_result;
-#define	ast_sched_del(a, b)	_ast_sched_del(a, b, __FILE__, __LINE__, __PRETTY_FUNCTION__)
-#endif
 
 /*!
  * \brief Determines number of seconds until the next outstanding event to take place
diff --git a/main/sched.c b/main/sched.c
index d8afc74..848b4c2 100644
--- a/main/sched.c
+++ b/main/sched.c
@@ -608,11 +608,7 @@
  * would be two or more in the list with that
  * id.
  */
-#ifndef AST_DEVMODE
 int ast_sched_del(struct ast_sched_context *con, int id)
-#else
-int _ast_sched_del(struct ast_sched_context *con, int id, const char *file, int line, const char *function)
-#endif
 {
 	struct sched *s = NULL;
 	int *last_id = ast_threadstorage_get(&last_del_id, sizeof(int));

-- 
To view, visit https://gerrit.asterisk.org/9569
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: merged
Gerrit-Change-Id: Icbc69c801e357d7004efc5cf2ab936d9b83b6ab8
Gerrit-Change-Number: 9569
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
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/20180723/071c19a4/attachment-0001.html>


More information about the asterisk-code-review mailing list