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

Joshua Colp asteriskteam at digium.com
Sun Jul 22 10:46:01 CDT 2018


Joshua Colp has uploaded this change for review. ( https://gerrit.asterisk.org/9568


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(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/68/9568/1

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 9729ccb..0e7521e 100644
--- a/main/sched.c
+++ b/main/sched.c
@@ -610,11 +610,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/9568
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icbc69c801e357d7004efc5cf2ab936d9b83b6ab8
Gerrit-Change-Number: 9568
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180722/290e201d/attachment.html>


More information about the asterisk-code-review mailing list