switchmask return value was not changed correctly in manual patching
authorRick L Bird <nveid@yahoo.com>
Tue, 19 Apr 2011 02:06:35 +0000 (22:06 -0400)
committerRick L Bird <nveid@yahoo.com>
Tue, 19 Apr 2011 02:06:35 +0000 (22:06 -0400)
Fixes #241

hdrs/command.h
src/command.c

index 3b4400b8de22505845d0671747ac4e0ce2064690..feb388ee9965646fb2b59097ede61ca36b20be66 100644 (file)
@@ -202,7 +202,7 @@ struct command_perms_t {
 #define SWITCH_NONE 0
 #include "switches.h"
 
-extern switch_mask *switchmask(const char *switches);
+extern switch_mask switchmask(const char *switches);
 extern COMMAND_INFO *command_find(const char *name);
 extern COMMAND_INFO *command_find_exact(const char *name);
 extern COMMAND_INFO *command_add
index bbbe48ae09b2fda844fa7511f12c467501665701..896b4123c852e78d0a47b5a4cc287e03798c8a75 100644 (file)
@@ -642,7 +642,7 @@ command_modify(const char *name, int type, const char *command_lock, switch_mask
  * \return pointer to a static switch mask.
  */
 switch_mask
-*switchmask(const char *switches)
+switchmask(const char *switches)
 {
   static switch_mask sw = NULL;
   static int sm_bytes = 0;
@@ -668,7 +668,7 @@ switch_mask
     else
       SW_SET(sw, switchnum);
   }
-  return &sw;
+  return sw;
 }
 
 /** Add an alias to the table of reserved aliases.