ast_log(LOG_WARNING, "'%s' is not a valid state name at line %d of %s\n", tok, lineno, script);
return 0;
}
- if ((snums[scnt] = getstatebyname(state, sname, script, lineno, 0) < 0)) {
+ if ((snums[scnt] = getstatebyname(state, sname, script, lineno, 0) == NULL)) {
ast_log(LOG_WARNING, "State '%s' not declared at line %d of %s\n", sname, lineno, script);
return 0;
}
#include "isdn_lib_intern.h"
#include "isdn_lib.h"
+enum event_response_e (*cb_event) (enum event_e event, struct misdn_bchannel *bc, void *user_data);
+
+void (*cb_log) (int level, int port, char *tmpl, ...)
+ __attribute__ ((format (printf, 3, 4)));
+
+int (*cb_jb_empty)(struct misdn_bchannel *bc, char *buffer, int len);
+
+
/*
* Define ARRAY_LEN() because I cannot
* #include "asterisk/utils.h"
static struct misdn_lib *glob_mgr;
-char tone_425_flip[TONE_425_SIZE];
-char tone_silence_flip[TONE_SILENCE_SIZE];
+static char tone_425_flip[TONE_425_SIZE];
+static char tone_silence_flip[TONE_SILENCE_SIZE];
static void misdn_lib_isdn_event_catcher(void *arg);
static int handle_event_nt(void *dat, void *arg);
}
-void misdn_dump_chanlist()
+void misdn_dump_chanlist(void)
{
struct misdn_stack *stack=get_misdn_stack();
for ( ; stack; stack=stack->next) {
}
-int set_chan_in_stack(struct misdn_stack *stack, int channel)
+static int set_chan_in_stack(struct misdn_stack *stack, int channel)
{
cb_log(4,stack->port,"set_chan_in_stack: %d\n",channel);
return 0 ;
}
-int
+static int
handle_event_nt(void *dat, void *arg)
{
manager_t *mgr = (manager_t *)dat;
/** App Interface **/
-int te_lib_init() {
+int te_lib_init(void) {
char buff[1025] = "";
iframe_t *frm=(iframe_t*)buff;
int midev=mISDN_open();
-sem_t handler_started;
+static sem_t handler_started;
/* This is a thread */
static void manager_event_handler(void *arg)
}
}
-
int misdn_lib_init(char *portlist, struct misdn_lib_iface *iface, void *user_data)
{
struct misdn_lib *mgr=calloc(1, sizeof(struct misdn_lib));
#endif
}
-struct misdn_stack* get_misdn_stack() {
+struct misdn_stack* get_misdn_stack(void) {
return glob_mgr->stack_list;
}
};
-enum event_response_e (*cb_event) (enum event_e event, struct misdn_bchannel *bc, void *user_data);
-void (*cb_log) (int level, int port, char *tmpl, ...)
+extern enum event_response_e (*cb_event) (enum event_e event, struct misdn_bchannel *bc, void *user_data);
+
+extern void (*cb_log) (int level, int port, char *tmpl, ...)
__attribute__ ((format (printf, 3, 4)));
-int (*cb_jb_empty)(struct misdn_bchannel *bc, char *buffer, int len);
+
+extern int (*cb_jb_empty)(struct misdn_bchannel *bc, char *buffer, int len);
struct misdn_lib_iface {
enum event_response_e (*cb_event)(enum event_e event, struct misdn_bchannel *bc, void *user_data);
#endif
+#if 0
ibuffer_t *astbuf; /* Not used */
ibuffer_t *misdnbuf; /* Not used */
+#endif
struct send_lock {
pthread_mutex_t lock;
-lf2c -lm (in that order)
*/
+#include <stdlib.h>
#include "f2c.h"
/* *********************************************************************** */
/* Subroutine */ int chanrd_(integer *order, integer *ipitv, integer *irms,
integer *irc, integer *ibits)
{
- return chanwr_0_(1, order, ipitv, irms, irc, ibits, 0);
+ return chanwr_0_(1, order, ipitv, irms, irc, ibits, NULL);
}
#include "asterisk/devicestate.h"
#include "asterisk/module.h"
#include "asterisk/dsp.h"
+#include "asterisk/buildinfo.h"
#include "asterisk/doxyref.h" /* Doxygen documentation */
static char ast_config_AST_CTL_GROUP[PATH_MAX] = "\0";
static char ast_config_AST_CTL[PATH_MAX] = "asterisk.ctl";
-extern const char *ast_build_hostname;
-extern const char *ast_build_kernel;
-extern const char *ast_build_machine;
-extern const char *ast_build_os;
-extern const char *ast_build_date;
-extern const char *ast_build_user;
-
static char *_argv[256];
static int shuttingdown;
static int restartnow;
* \author Kevin P. Fleming <kpfleming@digium.com>
*/
+#include "asterisk/buildinfo.h"
#include "asterisk/build.h"
const char *ast_build_hostname = BUILD_HOSTNAME;
/*! \brief Dialing channel structure. Contains per-channel dialing options, asterisk channel, and more! */
struct ast_dial_channel {
- int num; /*!< Unique number for dialed channel */
- int timeout; /*!< Maximum time allowed for attempt */
- char *tech; /*!< Technology being dialed */
- char *device; /*!< Device being dialed */
- void *options[AST_DIAL_OPTION_MAX]; /*!< Channel specific options */
- int cause; /*!< Cause code in case of failure */
- int is_running_app:1; /*!< Is this running an application? */
- struct ast_channel *owner; /*!< Asterisk channel */
- AST_LIST_ENTRY(ast_dial_channel) list; /*!< Linked list information */
+ int num; /*!< Unique number for dialed channel */
+ int timeout; /*!< Maximum time allowed for attempt */
+ char *tech; /*!< Technology being dialed */
+ char *device; /*!< Device being dialed */
+ void *options[AST_DIAL_OPTION_MAX]; /*!< Channel specific options */
+ int cause; /*!< Cause code in case of failure */
+ unsigned int is_running_app:1; /*!< Is this running an application? */
+ struct ast_channel *owner; /*!< Asterisk channel */
+ AST_LIST_ENTRY(ast_dial_channel) list; /*!< Linked list information */
};
/*! \brief Typedef for dial option enable */
/*! SRV record to lookup, if provided. Composed of service, protocol, and domain name: _Service._Proto.Name */
char *service;
/*! Set to 1 if the entry changes */
- int changed:1;
+ unsigned int changed:1;
ast_mutex_t lock;
AST_RWLIST_ENTRY(ast_dnsmgr_entry) list;
/*! just 1 here, but we use calloc to allocate the correct size */
* Asterisk itself.
*/
-const char explanation[] =
+static const char explanation[] =
"This file is created when Asterisk is run with a realtime priority (-p). It\n"
"must continue to exist, and the astcanary process must be allowed to continue\n"
"running, or else the Asterisk process will, within a short period of time,\n"