class Port *port_first = NULL;
-unsigned long port_serial = 1; /* must be 1, because 0== no port */
+unsigned int port_serial = 1; /* must be 1, because 0== no port */
/* free epointlist relation
}
-void Port::free_epointid(unsigned long epoint_id)
+void Port::free_epointid(unsigned int epoint_id)
{
struct epoint_list *temp, **tempp;
/* create new epointlist relation
*/
-struct epoint_list *Port::epointlist_new(unsigned long epoint_id)
+struct epoint_list *Port::epointlist_new(unsigned int epoint_id)
{
struct epoint_list *epointlist, **epointlistpointer;
/*
* port constructor
*/
-Port::Port(int type, char *portname, struct port_settings *settings)
+Port::Port(int type, const char *portname, struct port_settings *settings)
{
class Port *temp, **tempp;
/*
* find the port with port_id
*/
-class Port *find_port_id(unsigned long port_id)
+class Port *find_port_id(unsigned int port_id)
{
class Port *port = port_first;
/*
* set the file in the tone directory with the given name
*/
-void Port::set_tone(char *dir, char *name)
+void Port::set_tone(const char *dir, const char *name)
{
int fh;
char filename[128];
if (name == NULL)
name = "";
+#if 0
+ /* if tones is jingle, store next tone */
+ if ((p_tone_fh >= 0 || p_tone_fetched)
+ && (!strcmp(p_tone_name, "left") || !strcmp(p_tone_name, "joined")))
+ {
+ SCPY(p_tone_dir, dir);
+ SCPY(p_tone_name, name);
+ return;
+ }
+#endif
+
/* no counter, no eof, normal speed */
p_tone_counter = 0;
p_tone_eof = 0;
* set the file in the tone directory for vbox playback
* also set the play_eof-flag
*/
-void Port::set_vbox_tone(char *dir, char *name)
+void Port::set_vbox_tone(const char *dir, const char *name)
{
char filename[256];
* also set the eof-flag
* also set the counter-flag
*/
-void Port::set_vbox_play(char *name, int offset)
+void Port::set_vbox_play(const char *name, int offset)
{
- signed long size;
+ signed int size;
struct lcr_msg *message;
/* use ser_box_tone() */
* therefor a return=1 means: stop, no more processing
*/
//extern struct lcr_msg *dddebug;
-int Port::message_epoint(unsigned long epoint_id, int message_id, union parameter *param)
+int Port::message_epoint(unsigned int epoint_id, int message_id, union parameter *param)
{
/* check if we got audio data from one remote port */
switch(message_id)
struct fmt {
unsigned short stereo; /* 1 = mono, 2 = stereo */
unsigned short channels; /* number of channels */
- unsigned long sample_rate; /* sample rate */
- unsigned long data_rate; /* data rate */
+ unsigned int sample_rate; /* sample rate */
+ unsigned int data_rate; /* data rate */
unsigned short bytes_sample; /* bytes per sample (all channels) */
unsigned short bits_sample; /* bits per sample (one channel) */
};
* written before close, because we do not know the size yet)
* type=1 record annoucement, type=0 record audio stream, type=2 record vbox
*/
-int Port::open_record(int type, int vbox, int skip, char *extension, int anon_ignore, char *vbox_email, int vbox_email_file)
+int Port::open_record(int type, int vbox, int skip, char *extension, int anon_ignore, const char *vbox_email, int vbox_email_file)
{
/* RIFFxxxxWAVEfmt xxxx(fmt-size)dataxxxx... */
char dummyheader[8+4+8+sizeof(fmt)+8];
void Port::close_record(int beep, int mute)
{
static signed short beep_mono[256];
- unsigned long size, wsize;
+ unsigned int size, wsize;
struct fmt fmt;
char filename[512], indexname[512];
FILE *fp;
char number[256], callerid[256];
char *p;
struct caller_info callerinfo;
- char *valid_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890_.-!$%&/()=+*;~";
+ const char *valid_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890_.-!$%&/()=+*;~";
if (!p_record)
return;
// apply_callerid_restriction(p_record_anon_ignore, callerinfo.id, &callerinfo.ntype, &callerinfo.present, &callerinfo.screen, callerinfo.extension, callerinfo.name);
SCPY(number, p_dialinginfo.id);
- SCPY(callerid, numberrize_callerinfo(callerinfo.id, callerinfo.ntype));
+ SCPY(callerid, numberrize_callerinfo(callerinfo.id, callerinfo.ntype, options.national, options.international));
if (callerid[0] == '\0')
{
if (callerinfo.present == INFO_PRESENT_RESTRICTED)
fprintf(p_record, "WAVE");
/* fmt */
- fprintf(p_record, "fmt %c%c%c%c", sizeof(fmt), 0, 0, 0);
+ fprintf(p_record, "fmt %c%c%c%c", (unsigned int)sizeof(fmt), 0, 0, 0);
switch(p_record_type)
{
case CODEC_MONO:
unsigned char write_buffer[1024], *d;
signed short *s;
int free, i, ii;
- signed long sample;
+ signed int sample;
/* no recording */
if (!p_record || !length)