Idefisk
Tools
Tutorials
Reviews
VoIP Providers
Archives
AsteriskGuru Archives
Mailing List Archives
FAQ
Search
Memberlist
Usergroups
Register
Profile
Log in to check your private messages
Log in
[svn-commits] russell: trunk r198438 - /trunk/main/manager.c
AsteriskGuru Archives Forum Index
->
Asterisk-CVS
View previous topic
::
View next topic
Author
Message
svn-commits at lists.digi
Guest
Posted: Sun May 31, 2009 12:44 am
Post subject: [svn-commits] russell: trunk r198438 - /trunk/main/manager.c
Author: russell
Date: Sat May 30 20:40:02 2009
New Revision: 198438
URL:
http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=198438
Log:
Constification and remove some unused code.
Modified:
trunk/main/manager.c
Modified: trunk/main/manager.c
URL:
http://svn.asterisk.org/svn-view/asterisk/trunk/main/manager.c?view=diff&rev=198438&r1=198437&r2=198438
==============================================================================
--- trunk/main/manager.c (original)
+++ trunk/main/manager.c Sat May 30 20:40:02 2009
@@ -756,8 +756,8 @@
* Digest Authentication http header).
*/
#define MAX_BLACKLIST_CMD_LEN 2
-static struct {
- char *words[AST_MAX_CMD_LEN];
+static const struct {
+ const char *words[AST_MAX_CMD_LEN];
} command_blacklist[] = {
{{ "module", "load", NULL }},
{{ "module", "unload", NULL }},
@@ -880,7 +880,6 @@
AST_RWLIST_WRLOCK(&manager_hooks);
AST_RWLIST_INSERT_TAIL(&manager_hooks, hook, list);
AST_RWLIST_UNLOCK(&manager_hooks);
- return;
}
/*! \brief Delete a custom hook to be called when an event is fired */
@@ -889,51 +888,7 @@
AST_RWLIST_WRLOCK(&manager_hooks);
AST_RWLIST_REMOVE(&manager_hooks, hook, list);
AST_RWLIST_UNLOCK(&manager_hooks);
- return;
-}
-
-/*! \brief
- * Event list management functions.
- * We assume that the event list always has at least one element,
- * and the delete code will not remove the last entry even if the
- *
- */
-#if 0
-static time_t __deb(time_t start, const char *msg)
-{
- time_t now = time(NULL);
- ast_verbose("%4d th %p %s\n", (int)(now % 3600), pthread_self(), msg);
- if (start != 0 && now - start > 5)
- ast_verbose("+++ WOW, %s took %d seconds\n", msg, (int)(now - start));
- return now;
-}
-
-static void LOCK_EVENTS(void)
-{
- time_t start = __deb(0, "about to lock events");
- AST_LIST_LOCK(&all_events);
- __deb(start, "done lock events");
-}
-
-static void UNLOCK_EVENTS(void)
-{
- __deb(0, "about to unlock events");
- AST_LIST_UNLOCK(&all_events);
-}
-
-static void LOCK_SESS(void)
-{
- time_t start = __deb(0, "about to lock sessions");
- AST_LIST_LOCK(&sessions);
- __deb(start, "done lock sessions");
-}
-
-static void UNLOCK_SESS(void)
-{
- __deb(0, "about to unlock sessions");
- AST_LIST_UNLOCK(&sessions);
-}
-#endif
+}
int check_manager_enabled()
{
@@ -986,9 +941,9 @@
* helper functions to convert back and forth between
* string and numeric representation of set of flags
*/
-static struct permalias {
+static const struct permalias {
int num;
- char *label;
+ const char *label;
} perms[] = {
{ EVENT_FLAG_SYSTEM, "system" },
{ EVENT_FLAG_CALL, "call" },
@@ -1009,7 +964,7 @@
};
/*! \brief Convert authority code to a list of options */
-static char *authority_to_str(int authority, struct ast_str **res)
+static const char *authority_to_str(int authority, struct ast_str **res)
{
int i;
char *sep = "";
_______________________________________________
--Bandwidth and Colocation Provided by
http://www.api-digital.com--
svn-commits mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/svn-commits
Back to top
Display posts from previous:
All Posts
1 Day
7 Days
2 Weeks
1 Month
3 Months
6 Months
1 Year
Oldest First
Newest First
AsteriskGuru Archives Forum Index
->
Asterisk-CVS
All times are GMT
Page
1
of
1
Jump to:
Select a forum
Asterisk Mailing Lists
----------------
Asterisk-Users
Asterisk-Dev
Asterisk-CVS
Asterisk-Biz
Asterisk-Doc
Asterisk-BSD
Asterisk-Announce
Asterisk Call Centers
Asterisk-Video
Asterisk-Speech-Rec
Bristuff-Users
You
cannot
post new topics in this forum
You
cannot
reply to topics in this forum
You
cannot
edit your posts in this forum
You
cannot
delete your posts in this forum
You
cannot
vote in polls in this forum
Powered by
phpBB
© 2001, 2005 phpBB Group