diff options
Diffstat (limited to 'res')
-rw-r--r-- | res/res_indications.c | 16 | ||||
-rw-r--r-- | res/res_musiconhold.c | 16 | ||||
-rw-r--r-- | res/snmp/agent.c | 4 |
3 files changed, 19 insertions, 17 deletions
diff --git a/res/res_indications.c b/res/res_indications.c index ed8a24b33..2147546af 100644 --- a/res/res_indications.c +++ b/res/res_indications.c @@ -85,7 +85,7 @@ char *playtones_desc= */ static int handle_add_indication(int fd, int argc, char *argv[]) { - struct tone_zone *tz; + struct ind_tone_zone *tz; int created_country = 0; if (argc != 5) return RESULT_SHOWUSAGE; @@ -119,7 +119,7 @@ static int handle_add_indication(int fd, int argc, char *argv[]) */ static int handle_remove_indication(int fd, int argc, char *argv[]) { - struct tone_zone *tz; + struct ind_tone_zone *tz; if (argc != 3 && argc != 4) return RESULT_SHOWUSAGE; if (argc == 3) { @@ -148,7 +148,7 @@ static int handle_remove_indication(int fd, int argc, char *argv[]) */ static int handle_show_indications(int fd, int argc, char *argv[]) { - struct tone_zone *tz = NULL; + struct ind_tone_zone *tz = NULL; char buf[256]; int found_country = 0; @@ -166,7 +166,7 @@ static int handle_show_indications(int fd, int argc, char *argv[]) for (i=2; i<argc; i++) { if (strcasecmp(tz->country,argv[i])==0 && !tz->alias[0]) { - struct tone_zone_sound* ts; + struct ind_tone_zone_sound* ts; if (!found_country) { found_country = 1; ast_cli(fd,"Country Indication PlayList\n" @@ -196,7 +196,7 @@ static int handle_show_indications(int fd, int argc, char *argv[]) */ static int handle_playtones(struct ast_channel *chan, void *data) { - struct tone_zone_sound *ts; + struct ind_tone_zone_sound *ts; int res; if (!data || !((char*)data)[0]) { @@ -231,7 +231,7 @@ static int ind_load_module(void) struct ast_variable *v; char *cxt; char *c; - struct tone_zone *tones; + struct ind_tone_zone *tones; const char *country = NULL; /* that the following cast is needed, is yuk! */ @@ -284,7 +284,7 @@ static int ind_load_module(void) c = countries; country = strsep(&c,","); while (country) { - struct tone_zone* azone; + struct ind_tone_zone* azone; if (!(azone = ast_calloc(1, sizeof(*azone)))) { ast_config_destroy(cfg); return -1; @@ -300,7 +300,7 @@ static int ind_load_module(void) } } else { /* add tone to country */ - struct tone_zone_sound *ps,*ts; + struct ind_tone_zone_sound *ps,*ts; for (ps=NULL,ts=tones->tones; ts; ps=ts, ts=ts->next) { if (strcasecmp(v->name,ts->name)==0) { /* already there */ diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c index faab84cae..476c7d120 100644 --- a/res/res_musiconhold.c +++ b/res/res_musiconhold.c @@ -52,10 +52,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include <thread.h> #endif -#ifdef HAVE_ZAPTEL -#include <zaptel/zaptel.h> -#endif - #include "asterisk/lock.h" #include "asterisk/file.h" #include "asterisk/logger.h" @@ -72,6 +68,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/stringfields.h" #include "asterisk/linkedlists.h" +#include "asterisk/dahdi_compat.h" + #define INITIAL_NUM_FILES 8 static char *app0 = "MusicOnHold"; @@ -865,7 +863,7 @@ static int moh_scan_files(struct mohclass *class) { static int moh_register(struct mohclass *moh, int reload) { -#ifdef HAVE_ZAPTEL +#ifdef HAVE_DAHDI int x; #endif struct mohclass *mohclass = NULL; @@ -909,15 +907,19 @@ static int moh_register(struct mohclass *moh, int reload) ast_set_flag(moh, MOH_QUIET); moh->srcfd = -1; -#ifdef HAVE_ZAPTEL +#ifdef HAVE_DAHDI /* Open /dev/zap/pseudo for timing... Is there a better, yet reliable way to do this? */ +#ifdef HAVE_ZAPTEL moh->pseudofd = open("/dev/zap/pseudo", O_RDONLY); +#else + moh->pseudofd = open("/dev/dahdi/pseudo", O_RDONLY); +#endif if (moh->pseudofd < 0) { ast_log(LOG_WARNING, "Unable to open pseudo channel for timing... Sound may be choppy.\n"); } else { x = 320; - ioctl(moh->pseudofd, ZT_SET_BLOCKSIZE, &x); + ioctl(moh->pseudofd, DAHDI_SET_BLOCKSIZE, &x); } #else moh->pseudofd = -1; diff --git a/res/snmp/agent.c b/res/snmp/agent.c index 96398e8a8..7ab0d68f9 100644 --- a/res/snmp/agent.c +++ b/res/snmp/agent.c @@ -621,7 +621,7 @@ static u_char *ast_var_indications(struct variable *vp, oid *name, size_t *lengt int exact, size_t *var_len, WriteMethod **write_method) { static unsigned long long_ret; - struct tone_zone *tz = NULL; + struct ind_tone_zone *tz = NULL; if (header_generic(vp, name, length, exact, var_len, write_method)) return NULL; @@ -651,7 +651,7 @@ static u_char *ast_var_indications_table(struct variable *vp, oid *name, size_t int exact, size_t *var_len, WriteMethod **write_method) { static unsigned long long_ret; - struct tone_zone *tz = NULL; + struct ind_tone_zone *tz = NULL; int i; if (header_simple_table(vp, name, length, exact, var_len, write_method, -1)) |