<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[Freeswitch-trunk][14619] </title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<div id="header">FreeSWITCH Subversion</div>
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://fisheye.freeswitch.org/changelog/FreeSWITCH?cs=14619">14619</a></dd>
<dt>Author</dt> <dd>gmaruzz</dd>
<dt>Date</dt> <dd>2009-08-24 11:55:31 -0500 (Mon, 24 Aug 2009)</dd>
</dl>
<h3>Log Message</h3>
<pre>celliax: beginning initialization serial port</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#freeswitchbranchesgmaruzzmod_celliaxcelliaxh">freeswitch/branches/gmaruzz/mod_celliax/celliax.h</a></li>
<li><a href="#freeswitchbranchesgmaruzzmod_celliaxcelliax_protocolc">freeswitch/branches/gmaruzz/mod_celliax/celliax_protocol.c</a></li>
<li><a href="#freeswitchbranchesgmaruzzmod_celliaxmod_celliaxc">freeswitch/branches/gmaruzz/mod_celliax/mod_celliax.c</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="freeswitchbranchesgmaruzzmod_celliaxcelliaxh"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/gmaruzz/mod_celliax/celliax.h (14618 => 14619)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/gmaruzz/mod_celliax/celliax.h        2009-08-24 14:16:19 UTC (rev 14618)
+++ freeswitch/branches/gmaruzz/mod_celliax/celliax.h        2009-08-24 16:55:31 UTC (rev 14619)
</span><span class="lines">@@ -36,6 +36,8 @@
</span><span class="cx">
</span><span class="cx"> #include <switch.h>
</span><span class="cx"> #include <switch_version.h>
</span><ins>+#include <termios.h>
+#include <sys/ioctl.h>
</ins><span class="cx">
</span><span class="cx"> #ifndef WIN32
</span><span class="cx"> #include <sys/time.h>
</span><span class="lines">@@ -50,6 +52,11 @@
</span><span class="cx"> #pragma warning(disable:4127)
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#define         PROTOCOL_ALSA_VOICEMODEM 4
+#define         PROTOCOL_AT 2
+#define         PROTOCOL_FBUS2 1
+#define         PROTOCOL_NO_SERIAL 3
+
</ins><span class="cx"> #define SAMPLERATE_SKYPIAX 16000
</span><span class="cx"> #define SAMPLES_PER_FRAME SAMPLERATE_SKYPIAX/50
</span><span class="cx">
</span><span class="lines">@@ -247,6 +254,86 @@
</span><span class="cx">         unsigned long ob_calls;
</span><span class="cx">         unsigned long ib_failed_calls;
</span><span class="cx">         unsigned long ob_failed_calls;
</span><ins>+
+
+ char controldevice_name[50]; /*!< \brief name of the serial device controlling the interface, possibly none */
+ int controldevprotocol; /*!< \brief which protocol is used for serial control of this interface */
+ char controldevprotocolname[50]; /*!< \brief name of the serial device controlling protocol, one of "at" "fbus2" "no_serial" "alsa_voicemodem" */
+ int controldevfd; /*!< \brief serial controlling file descriptor for this interface */
+ //pthread_t controldev_thread; /*!< \brief serial control thread for this interface, running during the call */
+ speed_t controldevice_speed;
+
+ char at_dial_pre_number[64];
+ char at_dial_post_number[64];
+ char at_dial_expect[64];
+ unsigned int at_early_audio;
+ char at_hangup[64];
+ char at_hangup_expect[64];
+ char at_answer[64];
+ char at_answer_expect[64];
+ unsigned int at_initial_pause;
+ char at_preinit_1[64];
+ char at_preinit_1_expect[64];
+ char at_preinit_2[64];
+ char at_preinit_2_expect[64];
+ char at_preinit_3[64];
+ char at_preinit_3_expect[64];
+ char at_preinit_4[64];
+ char at_preinit_4_expect[64];
+ char at_preinit_5[64];
+ char at_preinit_5_expect[64];
+ unsigned int at_after_preinit_pause;
+
+ char at_postinit_1[64];
+ char at_postinit_1_expect[64];
+ char at_postinit_2[64];
+ char at_postinit_2_expect[64];
+ char at_postinit_3[64];
+ char at_postinit_3_expect[64];
+ char at_postinit_4[64];
+ char at_postinit_4_expect[64];
+ char at_postinit_5[64];
+ char at_postinit_5_expect[64];
+
+ char at_send_dtmf[64];
+
+ char at_query_battchg[64];
+ char at_query_battchg_expect[64];
+ char at_query_signal[64];
+ char at_query_signal_expect[64];
+ char at_call_idle[64];
+ char at_call_incoming[64];
+ char at_call_active[64];
+ char at_call_failed[64];
+ char at_call_calling[64];
+
+#define CIEV_STRING_SIZE 64
+ char at_indicator_noservice_string[64];
+ char at_indicator_nosignal_string[64];
+ char at_indicator_lowsignal_string[64];
+ char at_indicator_lowbattchg_string[64];
+ char at_indicator_nobattchg_string[64];
+ char at_indicator_callactive_string[64];
+ char at_indicator_nocallactive_string[64];
+ char at_indicator_nocallsetup_string[64];
+ char at_indicator_callsetupincoming_string[64];
+ char at_indicator_callsetupoutgoing_string[64];
+ char at_indicator_callsetupremoteringing_string[64];
+
+ int at_indicator_callp;
+ int at_indicator_callsetupp;
+ int at_indicator_roamp;
+ int at_indicator_battchgp;
+ int at_indicator_servicep;
+ int at_indicator_signalp;
+
+ int at_has_clcc;
+ int at_has_ecam;
+
+ int no_ucs2;
+ int sms_cnmi_not_supported;
+ time_t celliax_serial_sync_period;
+
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> typedef struct private_object private_t;
</span><span class="lines">@@ -289,3 +376,46 @@
</span><span class="cx"> int celliax_answer(private_t * tech_pvt, char *id, char *value);
</span><span class="cx"> int celliax_transfer(private_t * tech_pvt, char *id, char *value);
</span><span class="cx"> int celliax_socket_create_and_bind(private_t * tech_pvt, int *which_port);
</span><ins>+
+
+
+
+
+void *celliax_do_controldev_thread(void *data);
+int celliax_serial_init(private_t * tech_pvt, speed_t controldevice_speed);
+int celliax_serial_monitor(private_t * tech_pvt);
+int celliax_serial_sync(private_t * tech_pvt);
+int celliax_serial_sync_AT(private_t * tech_pvt);
+int celliax_serial_config(private_t * tech_pvt);
+int celliax_serial_config_AT(private_t * tech_pvt);
+
+#define celliax_serial_write_AT_expect(P, D, S) celliax_serial_write_AT_expect1(P, D, S, 1, 2)
+#define celliax_serial_write_AT_expect_noexpcr(P, D, S) celliax_serial_write_AT_expect1(P, D, S, 0, 2)
+#define celliax_serial_write_AT_expect_noexpcr_tout(P, D, S, T) celliax_serial_write_AT_expect1(P, D, S, 0, T)
+// 20.5 sec timeout, used for querying the SIM and sending SMSs
+#define celliax_serial_write_AT_expect_longtime(P, D, S) celliax_serial_write_AT_expect1(P, D, S, 1, 20)
+#define celliax_serial_write_AT_expect_longtime_noexpcr(P, D, S) celliax_serial_write_AT_expect1(P, D, S, 0, 20)
+int celliax_serial_write_AT(private_t * tech_pvt, const char *data);
+int celliax_serial_write_AT_nocr(private_t * tech_pvt, const char *data);
+int celliax_serial_write_AT_ack(private_t * tech_pvt, const char *data);
+int celliax_serial_write_AT_ack_nocr_longtime(private_t * tech_pvt, const char *data);
+int celliax_serial_write_AT_noack(private_t * tech_pvt, const char *data);
+int celliax_serial_write_AT_expect1(private_t * tech_pvt, const char *data,
+ const char *expected_string, int expect_crlf,
+ int seconds);
+int celliax_serial_AT_expect(private_t * tech_pvt, const char *expected_string,
+ int expect_crlf, int seconds);
+int celliax_serial_read_AT(private_t * tech_pvt, int look_for_ack, int timeout_usec,
+ int timeout_sec, const char *expected_string, int expect_crlf);
+int celliax_serial_read(private_t * tech_pvt);
+#ifdef NOTDEF
+int celliax_serial_getstatus(private_t * tech_pvt);
+int celliax_serial_hangup(private_t * tech_pvt);
+int celliax_serial_answer(private_t * tech_pvt);
+int celliax_serial_answer_AT(private_t * tech_pvt);
+int celliax_serial_hangup_AT(private_t * tech_pvt);
+int celliax_serial_call_AT(private_t * tech_pvt, char *dstr);
+int celliax_serial_getstatus_AT(private_t * tech_pvt);
+#endif// NOTDEF
+#define RESULT_FAILURE 0
+#define RESULT_SUCCESS 1
</ins></span></pre></div>
<a id="freeswitchbranchesgmaruzzmod_celliaxcelliax_protocolc"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/gmaruzz/mod_celliax/celliax_protocol.c (14618 => 14619)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/gmaruzz/mod_celliax/celliax_protocol.c        2009-08-24 14:16:19 UTC (rev 14618)
+++ freeswitch/branches/gmaruzz/mod_celliax/celliax_protocol.c        2009-08-24 16:55:31 UTC (rev 14619)
</span><span class="lines">@@ -1564,7 +1564,496 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx">
</span><ins>+int celliax_serial_init(private_t *tech_pvt, speed_t controldevice_speed)
+{
+ int fd;
+ int rt;
+ struct termios tp;
</ins><span class="cx">
</span><ins>+/* if there is a file descriptor, close it. But it is probably just an old value, so don't check for close success*/
+ fd = tech_pvt->controldevfd;
+ if (fd) {
+ close(fd);
+ }
+/* open the serial port */
+#ifdef __CYGWIN__
+ fd = open(tech_pvt->controldevice_name, O_RDWR | O_NOCTTY | O_NONBLOCK);
+ sleep(1);
+ close(fd);
+#endif /* __CYGWIN__ */
+ fd = open(tech_pvt->controldevice_name, O_RDWR | O_NOCTTY | O_NONBLOCK);
+ if (fd == -1) {
+ DEBUGA_SKYPE("serial error: %s\n", SKYPIAX_P_LOG, strerror(errno));
+ tech_pvt->controldevfd = fd;
+ return -1;
+ }
+/* flush it */
+ rt = tcflush(fd, TCIFLUSH);
+ if (rt == -1) {
+ ERRORA("serial error: %s", SKYPIAX_P_LOG, strerror(errno));
+ }
+/* attributes */
+ tp.c_cflag = B0 | CS8 | CLOCAL | CREAD | HUPCL;
+ tp.c_iflag = IGNPAR;
+ tp.c_cflag &= ~CRTSCTS;
+ tp.c_oflag = 0;
+ tp.c_lflag = 0;
+ tp.c_cc[VMIN] = 1;
+ tp.c_cc[VTIME] = 0;
+/* set controldevice_speed */
+ rt = cfsetispeed(&tp, tech_pvt->controldevice_speed);
+ if (rt == -1) {
+ ERRORA("serial error: %s", SKYPIAX_P_LOG, strerror(errno));
+ }
+ rt = cfsetospeed(&tp, tech_pvt->controldevice_speed);
+ if (rt == -1) {
+ ERRORA("serial error: %s", SKYPIAX_P_LOG, strerror(errno));
+ }
+/* set port attributes */
+ if (tcsetattr(fd, TCSADRAIN, &tp) == -1) {
+ ERRORA("serial error: %s", SKYPIAX_P_LOG, strerror(errno));
+ }
+ rt = tcsetattr(fd, TCSANOW, &tp);
+ if (rt == -1) {
+ ERRORA("serial error: %s", SKYPIAX_P_LOG, strerror(errno));
+ }
+ unsigned int status = 0;
+#ifndef __CYGWIN__
+ ioctl(fd, TIOCMGET, &status);
+ status |= TIOCM_DTR; /* Set DTR high */
+ status &= ~TIOCM_RTS; /* Set RTS low */
+ ioctl(fd, TIOCMSET, &status);
+ ioctl(fd, TIOCMGET, &status);
+ unsigned int flags = TIOCM_DTR;
+ ioctl(fd, TIOCMBIS, &flags);
+ flags = TIOCM_RTS;
+ ioctl(fd, TIOCMBIC, &flags);
+ ioctl(fd, TIOCMGET, &status);
+#else /* __CYGWIN__ */
+ ioctl(fd, TIOCMGET, &status);
+ status |= TIOCM_DTR; /* Set DTR high */
+ status &= ~TIOCM_RTS; /* Set RTS low */
+ ioctl(fd, TIOCMSET, &status);
+#endif /* __CYGWIN__ */
+ tech_pvt->controldevfd = fd;
+ DEBUGA_SKYPE("Syncing Serial\n", SKYPIAX_P_LOG);
+ rt = celliax_serial_sync(tech_pvt);
+ if (rt == -1) {
+ ERRORA("Serial init error\n", SKYPIAX_P_LOG);
+ return -1;
+ }
+ return (fd);
+}
+
+int celliax_serial_sync(private_t * tech_pvt)
+{
+ if (tech_pvt->controldevprotocol == PROTOCOL_AT)
+ return celliax_serial_sync_AT(tech_pvt);
+#ifdef CELLIAX_FBUS2
+ if (tech_pvt->controldevprotocol == PROTOCOL_FBUS2)
+ return celliax_serial_sync_FBUS2(tech_pvt);
+#endif /* CELLIAX_FBUS2 */
+#ifdef CELLIAX_CVM
+ if (tech_pvt->controldevprotocol == PROTOCOL_CVM_BUSMAIL)
+ return celliax_serial_sync_CVM_BUSMAIL(tech_pvt);
+#endif /* CELLIAX_CVM */
+
+ return -1;
+}
+
+int celliax_serial_config(private_t * tech_pvt)
+{
+ if (tech_pvt->controldevprotocol == PROTOCOL_AT)
+ return celliax_serial_config_AT(tech_pvt);
+#ifdef CELLIAX_FBUS2
+ if (tech_pvt->controldevprotocol == PROTOCOL_FBUS2)
+ return celliax_serial_config_FBUS2(tech_pvt);
+#endif /* CELLIAX_FBUS2 */
+#ifdef CELLIAX_CVM
+ if (tech_pvt->controldevprotocol == PROTOCOL_CVM_BUSMAIL)
+ return celliax_serial_config_CVM_BUSMAIL(tech_pvt);
+#endif /* CELLIAX_CVM */
+ return -1;
+}
+
+int celliax_serial_config_AT(private_t * tech_pvt)
+{
+ int res;
+
+/* initial_pause? */
+ if (tech_pvt->at_initial_pause) {
+ DEBUGA_SKYPE("sleeping for %d usec\n", SKYPIAX_P_LOG, tech_pvt->at_initial_pause);
+ usleep(tech_pvt->at_initial_pause);
+ }
+
+/* go until first empty preinit string, or last preinit string */
+ while (1) {
+
+ if (strlen(tech_pvt->at_preinit_1)) {
+ res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt->at_preinit_1, tech_pvt->at_preinit_1_expect);
+ if (res) {
+ DEBUGA_SKYPE("%s does not get %s from the phone. Continuing.\n", SKYPIAX_P_LOG,
+ tech_pvt->at_preinit_1, tech_pvt->at_preinit_1_expect);
+ }
+ } else {
+ break;
+ }
+
+ if (strlen(tech_pvt->at_preinit_2)) {
+ res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt->at_preinit_2, tech_pvt->at_preinit_2_expect);
+ if (res) {
+ DEBUGA_SKYPE("%s does not get %s from the phone. Continuing.\n", SKYPIAX_P_LOG,
+ tech_pvt->at_preinit_2, tech_pvt->at_preinit_2_expect);
+ }
+ } else {
+ break;
+ }
+
+ if (strlen(tech_pvt->at_preinit_3)) {
+ res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt->at_preinit_3, tech_pvt->at_preinit_3_expect);
+ if (res) {
+ DEBUGA_SKYPE("%s does not get %s from the phone. Continuing.\n", SKYPIAX_P_LOG,
+ tech_pvt->at_preinit_3, tech_pvt->at_preinit_3_expect);
+ }
+ } else {
+ break;
+ }
+
+ if (strlen(tech_pvt->at_preinit_4)) {
+ res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt->at_preinit_4, tech_pvt->at_preinit_4_expect);
+ if (res) {
+ DEBUGA_SKYPE("%s does not get %s from the phone. Continuing.\n", SKYPIAX_P_LOG,
+ tech_pvt->at_preinit_4, tech_pvt->at_preinit_4_expect);
+ }
+ } else {
+ break;
+ }
+
+ if (strlen(tech_pvt->at_preinit_5)) {
+ res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt->at_preinit_5, tech_pvt->at_preinit_5_expect);
+ if (res) {
+ DEBUGA_SKYPE("%s does not get %s from the phone. Continuing.\n", SKYPIAX_P_LOG,
+ tech_pvt->at_preinit_5, tech_pvt->at_preinit_5_expect);
+ }
+ } else {
+ break;
+ }
+
+ break;
+ }
+
+/* after_preinit_pause? */
+ if (tech_pvt->at_after_preinit_pause) {
+ DEBUGA_SKYPE("sleeping for %d usec\n", SKYPIAX_P_LOG, tech_pvt->at_after_preinit_pause);
+ usleep(tech_pvt->at_after_preinit_pause);
+ }
+
+ /* phone, brother, art you alive? */
+ res = celliax_serial_write_AT_ack(tech_pvt, "AT");
+ if (res) {
+ ERRORA("no response to AT\n", SKYPIAX_P_LOG);
+ return -1;
+ }
+ /* for motorola, bring it back to "normal" mode if it happens to be in another mode */
+ res = celliax_serial_write_AT_ack(tech_pvt, "AT+mode=0");
+ if (res) {
+ DEBUGA_SKYPE("AT+mode=0 does not get OK from the phone. If it is NOT Motorola,"
+ " no problem.\n", SKYPIAX_P_LOG);
+ }
+ usleep(50000);
+ /* for motorola end */
+
+ /* reset AT configuration to phone default */
+ res = celliax_serial_write_AT_ack(tech_pvt, "ATZ");
+ if (res) {
+ DEBUGA_SKYPE("ATZ failed\n", SKYPIAX_P_LOG);
+ }
+
+ /* disable AT command echo */
+ res = celliax_serial_write_AT_ack(tech_pvt, "ATE0");
+ if (res) {
+ DEBUGA_SKYPE("ATE0 failed\n", SKYPIAX_P_LOG);
+ }
+
+ /* disable extended error reporting */
+ res = celliax_serial_write_AT_ack(tech_pvt, "AT+CMEE=0");
+ if (res) {
+ DEBUGA_SKYPE("AT+CMEE failed\n", SKYPIAX_P_LOG);
+ }
+
+ /* various phone manufacturer identifier */
+ char at_command[5];
+ int i;
+ for (i = 0; i < 10; i++) {
+ memset(at_command, 0, sizeof(at_command));
+ sprintf(at_command, "ATI%d", i);
+ res = celliax_serial_write_AT_ack(tech_pvt, at_command);
+ if (res) {
+ DEBUGA_SKYPE("ATI%d command failed, continue\n", SKYPIAX_P_LOG, i);
+ }
+ }
+
+ /* phone manufacturer */
+ res = celliax_serial_write_AT_ack(tech_pvt, "AT+CGMI");
+ if (res) {
+ DEBUGA_SKYPE("AT+CGMI failed\n", SKYPIAX_P_LOG);
+ }
+
+ /* phone model */
+ res = celliax_serial_write_AT_ack(tech_pvt, "AT+CGMM");
+ if (res) {
+ DEBUGA_SKYPE("AT+CGMM failed\n", SKYPIAX_P_LOG);
+ }
+
+ res = celliax_serial_write_AT_ack(tech_pvt, "AT+CGSN");
+ if (res) {
+ DEBUGA_SKYPE("AT+CGSN failed\n", SKYPIAX_P_LOG);
+ }
+
+/* this take a lot of time to complete on devices with slow serial link (eg.: 9600bps) */
+#if 0
+ /* ask for the list of supported AT commands, useful to implement new models and debugging */
+ res = celliax_serial_write_AT_ack(tech_pvt, "AT+CLAC");
+ if (res) {
+ DEBUGA_SKYPE("AT+CLAC failed, continue\n", SKYPIAX_P_LOG);
+ }
+#endif
+ /* signal incoming SMS with a +CMTI unsolicited msg */
+ res = celliax_serial_write_AT_ack(tech_pvt, "AT+CNMI=3,1,0,0,0");
+ if (res) {
+ DEBUGA_SKYPE("AT+CNMI=3,1,0,0,0 failed, continue\n", SKYPIAX_P_LOG);
+ tech_pvt->sms_cnmi_not_supported = 1;
+ tech_pvt->celliax_serial_sync_period = 30;
+ }
+ /* what is the Message Center address (number) to which the SMS has to be sent? */
+ res = celliax_serial_write_AT_ack(tech_pvt, "AT+CSCA?");
+ if (res) {
+ DEBUGA_SKYPE("AT+CSCA? failed, continue\n", SKYPIAX_P_LOG);
+ }
+ /* what is the Message Format of SMSs? */
+ res = celliax_serial_write_AT_ack(tech_pvt, "AT+CMGF?");
+ if (res) {
+ DEBUGA_SKYPE("AT+CMGF? failed, continue\n", SKYPIAX_P_LOG);
+ }
+ res = celliax_serial_write_AT_ack(tech_pvt, "AT+CMGF=1"); //TODO: support phones that only accept pdu mode
+ if (res) {
+ ERRORA("Error setting SMS sending mode to TEXT on the cellphone\n", SKYPIAX_P_LOG);
+ return RESULT_FAILURE;
+ }
+ /* what is the Charset of SMSs? */
+ res = celliax_serial_write_AT_ack(tech_pvt, "AT+CSCS?");
+ if (res) {
+ DEBUGA_SKYPE("AT+CSCS? failed, continue\n", SKYPIAX_P_LOG);
+ }
+
+ tech_pvt->no_ucs2 = 0;
+ res = celliax_serial_write_AT_ack(tech_pvt, "AT+CSCS=\"UCS2\"");
+ if (res) {
+ WARNINGA
+ ("AT+CSCS=\"UCS2\" (set TE messages to ucs2) do not got OK from the phone, let's try with 'GSM'\n",
+ SKYPIAX_P_LOG);
+ tech_pvt->no_ucs2 = 1;
+ }
+
+ if (tech_pvt->no_ucs2) {
+ res = celliax_serial_write_AT_ack(tech_pvt, "AT+CSCS=\"GSM\"");
+ if (res) {
+ WARNINGA("AT+CSCS=\"GSM\" (set TE messages to GSM) do not got OK from the phone\n",
+ SKYPIAX_P_LOG);
+ }
+ //res = celliax_serial_write_AT_ack(tech_pvt, "AT+CSMP=17,167,0,16"); //"flash", class 0 sms 7 bit
+ res = celliax_serial_write_AT_ack(tech_pvt, "AT+CSMP=17,167,0,0"); //normal, 7 bit message
+ if (res) {
+ WARNINGA("AT+CSMP do not got OK from the phone, continuing\n", SKYPIAX_P_LOG);
+ }
+ } else {
+ //res = celliax_serial_write_AT_ack(tech_pvt, "AT+CSMP=17,167,0,20"); //"flash", class 0 sms 16 bit unicode
+ res = celliax_serial_write_AT_ack(tech_pvt, "AT+CSMP=17,167,0,8"); //unicode, 16 bit message
+ if (res) {
+ WARNINGA("AT+CSMP do not got OK from the phone, continuing\n", SKYPIAX_P_LOG);
+ }
+ }
+
+ /* is the unsolicited reporting of mobile equipment event supported? */
+ res = celliax_serial_write_AT_ack(tech_pvt, "AT+CMER=?");
+ if (res) {
+ DEBUGA_SKYPE("AT+CMER=? failed, continue\n", SKYPIAX_P_LOG);
+ }
+ /* request unsolicited reporting of mobile equipment indicators' events, to be screened by categories reported by +CIND=? */
+ res = celliax_serial_write_AT_ack(tech_pvt, "AT+CMER=3,0,0,1");
+ if (res) {
+ DEBUGA_SKYPE("AT+CMER=? failed, continue\n", SKYPIAX_P_LOG);
+ }
+
+ /* is the solicited reporting of mobile equipment indications supported? */
+
+ res = celliax_serial_write_AT_ack(tech_pvt, "AT+CIND=?");
+ if (res) {
+ DEBUGA_SKYPE("AT+CIND=? failed, continue\n", SKYPIAX_P_LOG);
+ }
+
+ /* is the unsolicited reporting of call monitoring supported? sony-ericsson specific */
+ res = celliax_serial_write_AT_ack(tech_pvt, "AT*ECAM=?");
+ if (res) {
+ DEBUGA_SKYPE("AT*ECAM=? failed, continue\n", SKYPIAX_P_LOG);
+ }
+ /* enable the unsolicited reporting of call monitoring. sony-ericsson specific */
+ res = celliax_serial_write_AT_ack(tech_pvt, "AT*ECAM=1");
+ if (res) {
+ DEBUGA_SKYPE("AT*ECAM=1 failed, continue\n", SKYPIAX_P_LOG);
+ tech_pvt->at_has_ecam = 0;
+ } else {
+ tech_pvt->at_has_ecam = 1;
+ }
+
+ /* disable unsolicited signaling of call list */
+ res = celliax_serial_write_AT_ack(tech_pvt, "AT+CLCC=0");
+ if (res) {
+ DEBUGA_SKYPE("AT+CLCC=0 failed, continue\n", SKYPIAX_P_LOG);
+ tech_pvt->at_has_clcc = 0;
+ } else {
+ tech_pvt->at_has_clcc = 1;
+ }
+
+ /* give unsolicited caller id when incoming call */
+ res = celliax_serial_write_AT_ack(tech_pvt, "AT+CLIP=1");
+ if (res) {
+ DEBUGA_SKYPE("AT+CLIP failed, continue\n", SKYPIAX_P_LOG);
+ }
+ /* for motorola */
+ res = celliax_serial_write_AT_ack(tech_pvt, "AT+MCST=1"); /* motorola call control codes
+ (to know when call is disconnected (they
+ don't give you "no carrier") */
+ if (res) {
+ DEBUGA_SKYPE("AT+MCST=1 does not get OK from the phone. If it is NOT Motorola,"
+ " no problem.\n", SKYPIAX_P_LOG);
+ }
+ /* for motorola end */
+
+/* go until first empty postinit string, or last postinit string */
+ while (1) {
+
+ if (strlen(tech_pvt->at_postinit_1)) {
+ res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt->at_postinit_1, tech_pvt->at_postinit_1_expect);
+ if (res) {
+ DEBUGA_SKYPE("%s does not get %s from the phone. Continuing.\n", SKYPIAX_P_LOG,
+ tech_pvt->at_postinit_1, tech_pvt->at_postinit_1_expect);
+ }
+ } else {
+ break;
+ }
+
+ if (strlen(tech_pvt->at_postinit_2)) {
+ res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt->at_postinit_2, tech_pvt->at_postinit_2_expect);
+ if (res) {
+ DEBUGA_SKYPE("%s does not get %s from the phone. Continuing.\n", SKYPIAX_P_LOG,
+ tech_pvt->at_postinit_2, tech_pvt->at_postinit_2_expect);
+ }
+ } else {
+ break;
+ }
+
+ if (strlen(tech_pvt->at_postinit_3)) {
+ res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt->at_postinit_3, tech_pvt->at_postinit_3_expect);
+ if (res) {
+ DEBUGA_SKYPE("%s does not get %s from the phone. Continuing.\n", SKYPIAX_P_LOG,
+ tech_pvt->at_postinit_3, tech_pvt->at_postinit_3_expect);
+ }
+ } else {
+ break;
+ }
+
+ if (strlen(tech_pvt->at_postinit_4)) {
+ res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt->at_postinit_4, tech_pvt->at_postinit_4_expect);
+ if (res) {
+ DEBUGA_SKYPE("%s does not get %s from the phone. Continuing.\n", SKYPIAX_P_LOG,
+ tech_pvt->at_postinit_4, tech_pvt->at_postinit_4_expect);
+ }
+ } else {
+ break;
+ }
+
+ if (strlen(tech_pvt->at_postinit_5)) {
+ res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt->at_postinit_5, tech_pvt->at_postinit_5_expect);
+ if (res) {
+ DEBUGA_SKYPE("%s does not get %s from the phone. Continuing.\n", SKYPIAX_P_LOG,
+ tech_pvt->at_postinit_5, tech_pvt->at_postinit_5_expect);
+ }
+ } else {
+ break;
+ }
+
+ break;
+ }
+
+ return 0;
+}
+
+
+#ifdef NOTDEF
+int celliax_serial_getstatus(private_t * tech_pvt)
+{
+ if (tech_pvt->controldevprotocol == PROTOCOL_AT)
+ return celliax_serial_getstatus_AT(tech_pvt);
+#ifdef CELLIAX_FBUS2
+ if (tech_pvt->controldevprotocol == PROTOCOL_FBUS2)
+ return celliax_serial_getstatus_FBUS2(tech_pvt);
+#endif /* CELLIAX_FBUS2 */
+
+#ifdef CELLIAX_CVM
+ if (tech_pvt->controldevprotocol == PROTOCOL_CVM_BUSMAIL)
+ return celliax_serial_getstatus_CVM_BUSMAIL(tech_pvt);
+#endif /* CELLIAX_CVM */
+ return -1;
+}
+
+int celliax_serial_read(private_t * tech_pvt)
+{
+ if (tech_pvt->controldevprotocol == PROTOCOL_AT)
+ return celliax_serial_read_AT(tech_pvt, 0, 100000, 0, NULL, 1); // a 10th of a second timeout
+#ifdef CELLIAX_FBUS2
+ if (tech_pvt->controldevprotocol == PROTOCOL_FBUS2)
+ return celliax_serial_read_FBUS2(tech_pvt);
+#endif /* CELLIAX_FBUS2 */
+#ifdef CELLIAX_CVM
+ if (tech_pvt->controldevprotocol == PROTOCOL_CVM_BUSMAIL)
+ return celliax_serial_read_CVM_BUSMAIL(tech_pvt);
+#endif /* CELLIAX_CVM */
+ return -1;
+}
+
+int celliax_serial_hangup(private_t * tech_pvt)
+{
+ if (tech_pvt->controldevprotocol == PROTOCOL_AT)
+ return celliax_serial_hangup_AT(tech_pvt);
+#ifdef CELLIAX_FBUS2
+ if (tech_pvt->controldevprotocol == PROTOCOL_FBUS2)
+ return celliax_serial_hangup_FBUS2(tech_pvt);
+#endif /* CELLIAX_FBUS2 */
+#ifdef CELLIAX_CVM
+ if (tech_pvt->controldevprotocol == PROTOCOL_CVM_BUSMAIL)
+ return celliax_serial_hangup_CVM_BUSMAIL(tech_pvt);
+#endif /* CELLIAX_CVM */
+ return -1;
+}
+
+int celliax_serial_answer(private_t * tech_pvt)
+{
+ if (tech_pvt->controldevprotocol == PROTOCOL_AT)
+ return celliax_serial_answer_AT(tech_pvt);
+#ifdef CELLIAX_FBUS2
+ if (tech_pvt->controldevprotocol == PROTOCOL_FBUS2)
+ return celliax_serial_answer_FBUS2(tech_pvt);
+#endif /* CELLIAX_FBUS2 */
+#ifdef CELLIAX_CVM
+ if (tech_pvt->controldevprotocol == PROTOCOL_CVM_BUSMAIL)
+ return celliax_serial_answer_CVM_BUSMAIL(tech_pvt);
+#endif /* CELLIAX_CVM */
+ return -1;
+}
+#endif //NOTDEF
+
+
</ins><span class="cx"> #undef CELLIAX_ADDITIONAL
</span><span class="cx"> #ifdef CELLIAX_ADDITIONAL
</span><span class="cx">
</span><span class="lines">@@ -1575,7 +2064,7 @@
</span><span class="cx"> extern int celliax_debug;
</span><span class="cx"> extern char *celliax_console_active;
</span><span class="cx"> extern char celliax_type[];
</span><del>-extern struct celliax_pvt *celliax_iflist;
</del><ins>+extern private_t *celliax_iflist;
</ins><span class="cx"> extern int celliax_dir_entry_extension;
</span><span class="cx">
</span><span class="cx"> #ifndef GIOVA48
</span><span class="lines">@@ -1600,22 +2089,22 @@
</span><span class="cx"> *
</span><span class="cx"> * \return zero on success, -1 on error.
</span><span class="cx"> */
</span><del>-int alsa_init(struct celliax_pvt *p)
</del><ins>+int alsa_init(private_t * tech_pvt)
</ins><span class="cx"> {
</span><del>- p->alsac = alsa_open_dev(p, SND_PCM_STREAM_CAPTURE);
</del><ins>+ tech_pvt->alsac = alsa_open_dev(p, SND_PCM_STREAM_CAPTURE);
</ins><span class="cx"> if (!p->alsac) {
</span><del>- ERRORA("Failed opening ALSA capture device: %s\n", CELLIAX_P_LOG, p->alsacname);
</del><ins>+ ERRORA("Failed opening ALSA capture device: %s\n", SKYPIAX_P_LOG, p->alsacname);
</ins><span class="cx"> if (alsa_shutdown(p)) {
</span><del>- ERRORA("alsa_shutdown failed\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("alsa_shutdown failed\n", SKYPIAX_P_LOG);
</ins><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="cx"> p->alsap = alsa_open_dev(p, SND_PCM_STREAM_PLAYBACK);
</span><span class="cx"> if (!p->alsap) {
</span><del>- ERRORA("Failed opening ALSA playback device: %s\n", CELLIAX_P_LOG, p->alsapname);
</del><ins>+ ERRORA("Failed opening ALSA playback device: %s\n", SKYPIAX_P_LOG, p->alsapname);
</ins><span class="cx"> if (alsa_shutdown(p)) {
</span><del>- ERRORA("alsa_shutdown failed\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("alsa_shutdown failed\n", SKYPIAX_P_LOG);
</ins><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="cx"> return -1;
</span><span class="lines">@@ -1635,7 +2124,7 @@
</span><span class="cx"> * \return zero on success, -1 on error.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-int alsa_shutdown(struct celliax_pvt *p)
</del><ins>+int alsa_shutdown(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx">
</span><span class="cx"> int err;
</span><span class="lines">@@ -1643,13 +2132,13 @@
</span><span class="cx"> if (p->alsap) {
</span><span class="cx"> err = snd_pcm_drop(p->alsap);
</span><span class="cx"> if (err < 0) {
</span><del>- ERRORA("device [%s], snd_pcm_drop failed with error '%s'\n", CELLIAX_P_LOG,
</del><ins>+ ERRORA("device [%s], snd_pcm_drop failed with error '%s'\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->alsapname, snd_strerror(err));
</span><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="cx"> err = snd_pcm_close(p->alsap);
</span><span class="cx"> if (err < 0) {
</span><del>- ERRORA("device [%s], snd_pcm_close failed with error '%s'\n", CELLIAX_P_LOG,
</del><ins>+ ERRORA("device [%s], snd_pcm_close failed with error '%s'\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->alsapname, snd_strerror(err));
</span><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="lines">@@ -1657,13 +2146,13 @@
</span><span class="cx"> if (p->alsac) {
</span><span class="cx"> err = snd_pcm_drop(p->alsac);
</span><span class="cx"> if (err < 0) {
</span><del>- ERRORA("device [%s], snd_pcm_drop failed with error '%s'\n", CELLIAX_P_LOG,
</del><ins>+ ERRORA("device [%s], snd_pcm_drop failed with error '%s'\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->alsacname, snd_strerror(err));
</span><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="cx"> err = snd_pcm_close(p->alsac);
</span><span class="cx"> if (err < 0) {
</span><del>- ERRORA("device [%s], snd_pcm_close failed with error '%s'\n", CELLIAX_P_LOG,
</del><ins>+ ERRORA("device [%s], snd_pcm_close failed with error '%s'\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->alsacname, snd_strerror(err));
</span><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="lines">@@ -1681,7 +2170,7 @@
</span><span class="cx"> *
</span><span class="cx"> * \return zero on success, -1 on error.
</span><span class="cx"> */
</span><del>-snd_pcm_t *alsa_open_dev(struct celliax_pvt * p, snd_pcm_stream_t stream)
</del><ins>+snd_pcm_t *alsa_open_dev(private_t * p, snd_pcm_stream_t stream)
</ins><span class="cx"> {
</span><span class="cx">
</span><span class="cx"> snd_pcm_t *handle = NULL;
</span><span class="lines">@@ -1713,7 +2202,7 @@
</span><span class="cx"> if (err < 0) {
</span><span class="cx"> ERRORA
</span><span class="cx"> ("snd_pcm_open failed with error '%s' on device '%s', if you are using a plughw:n device please change it to be a default:n device (so to allow it to be shared with other concurrent programs), or maybe you are using an ALSA voicemodem and slmodemd"
</span><del>- " is running?\n", CELLIAX_P_LOG, snd_strerror(err),
</del><ins>+ " is running?\n", SKYPIAX_P_LOG, snd_strerror(err),
</ins><span class="cx"> stream == SND_PCM_STREAM_CAPTURE ? p->alsacname : p->alsapname);
</span><span class="cx"> return NULL;
</span><span class="cx"> }
</span><span class="lines">@@ -1721,47 +2210,47 @@
</span><span class="cx"> snd_pcm_info_alloca(&info);
</span><span class="cx">
</span><span class="cx"> if ((err = snd_pcm_info(handle, info)) < 0) {
</span><del>- ERRORA("info error: %s", CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+ ERRORA("info error: %s", SKYPIAX_P_LOG, snd_strerror(err));
</ins><span class="cx"> return NULL;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> err = snd_pcm_nonblock(handle, 1);
</span><span class="cx"> if (err < 0) {
</span><del>- ERRORA("nonblock setting error: %s", CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+ ERRORA("nonblock setting error: %s", SKYPIAX_P_LOG, snd_strerror(err));
</ins><span class="cx"> return NULL;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> err = snd_pcm_hw_params_any(handle, params);
</span><span class="cx"> if (err < 0) {
</span><span class="cx"> ERRORA("Broken configuration for this PCM, no configurations available: %s\n",
</span><del>- CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+ SKYPIAX_P_LOG, snd_strerror(err));
</ins><span class="cx"> return NULL;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> err = snd_pcm_hw_params_set_access(handle, params, SND_PCM_ACCESS_RW_INTERLEAVED);
</span><span class="cx"> if (err < 0) {
</span><del>- ERRORA("Access type not available: %s\n", CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+ ERRORA("Access type not available: %s\n", SKYPIAX_P_LOG, snd_strerror(err));
</ins><span class="cx"> return NULL;
</span><span class="cx"> }
</span><span class="cx"> err = snd_pcm_hw_params_set_format(handle, params, celliax_format);
</span><span class="cx"> if (err < 0) {
</span><del>- ERRORA("Sample format non available: %s\n", CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+ ERRORA("Sample format non available: %s\n", SKYPIAX_P_LOG, snd_strerror(err));
</ins><span class="cx"> return NULL;
</span><span class="cx"> }
</span><span class="cx"> err = snd_pcm_hw_params_set_channels(handle, params, 1);
</span><span class="cx"> if (err < 0) {
</span><del>- DEBUGA_SOUND("Channels count set failed: %s\n", CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+ DEBUGA_SOUND("Channels count set failed: %s\n", SKYPIAX_P_LOG, snd_strerror(err));
</ins><span class="cx"> }
</span><span class="cx"> #if 1
</span><span class="cx"> unsigned int chan_num;
</span><span class="cx"> err = snd_pcm_hw_params_get_channels(params, &chan_num);
</span><span class="cx"> if (err < 0) {
</span><del>- ERRORA("Channels count non available: %s\n", CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+ ERRORA("Channels count non available: %s\n", SKYPIAX_P_LOG, snd_strerror(err));
</ins><span class="cx"> return NULL;
</span><span class="cx"> }
</span><span class="cx"> if (chan_num < 1 || chan_num > 2) {
</span><del>- ERRORA("Channels count MUST BE 1 or 2, it is: %d\n", CELLIAX_P_LOG, chan_num);
- ERRORA("Channels count MUST BE 1 or 2, it is: %d on %s %s\n", CELLIAX_P_LOG, chan_num,
</del><ins>+ ERRORA("Channels count MUST BE 1 or 2, it is: %d\n", SKYPIAX_P_LOG, chan_num);
+ ERRORA("Channels count MUST BE 1 or 2, it is: %d on %s %s\n", SKYPIAX_P_LOG, chan_num,
</ins><span class="cx"> p->alsapname, p->alsacname);
</span><span class="cx"> return NULL;
</span><span class="cx"> } else {
</span><span class="lines">@@ -1817,12 +2306,12 @@
</span><span class="cx"> err = snd_pcm_hw_params_set_rate_near(handle, params, &rate, 0);
</span><span class="cx"> if ((float) p->celliax_sound_rate * 1.05 < rate
</span><span class="cx"> || (float) p->celliax_sound_rate * 0.95 > rate) {
</span><del>- WARNINGA("Rate is not accurate (requested = %iHz, got = %iHz)\n", CELLIAX_P_LOG,
</del><ins>+ WARNINGA("Rate is not accurate (requested = %iHz, got = %iHz)\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->celliax_sound_rate, rate);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (err < 0) {
</span><del>- ERRORA("Error setting rate: %s\n", CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+ ERRORA("Error setting rate: %s\n", SKYPIAX_P_LOG, snd_strerror(err));
</ins><span class="cx"> return NULL;
</span><span class="cx"> }
</span><span class="cx"> p->celliax_sound_rate = rate;
</span><span class="lines">@@ -1830,7 +2319,7 @@
</span><span class="cx"> err = snd_pcm_hw_params_set_period_size_near(handle, params, &period_size, 0);
</span><span class="cx">
</span><span class="cx"> if (err < 0) {
</span><del>- ERRORA("Error setting period_size: %s\n", CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+ ERRORA("Error setting period_size: %s\n", SKYPIAX_P_LOG, snd_strerror(err));
</ins><span class="cx"> return NULL;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1841,21 +2330,21 @@
</span><span class="cx"> err = snd_pcm_hw_params_set_buffer_size_near(handle, params, &p->alsa_buffer_size);
</span><span class="cx">
</span><span class="cx"> if (err < 0) {
</span><del>- ERRORA("Error setting buffer_size: %s\n", CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+ ERRORA("Error setting buffer_size: %s\n", SKYPIAX_P_LOG, snd_strerror(err));
</ins><span class="cx"> return NULL;
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> err = snd_pcm_hw_params(handle, params);
</span><span class="cx"> if (err < 0) {
</span><del>- ERRORA("Unable to install hw params: %s\n", CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+ ERRORA("Unable to install hw params: %s\n", SKYPIAX_P_LOG, snd_strerror(err));
</ins><span class="cx"> return NULL;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> snd_pcm_hw_params_get_period_size(params, &chunk_size, 0);
</span><span class="cx"> snd_pcm_hw_params_get_buffer_size(params, &buffer_size);
</span><span class="cx"> if (chunk_size == buffer_size) {
</span><del>- ERRORA("Can't use period equal to buffer size (%lu == %lu)\n", CELLIAX_P_LOG,
</del><ins>+ ERRORA("Can't use period equal to buffer size (%lu == %lu)\n", SKYPIAX_P_LOG,
</ins><span class="cx"> chunk_size, buffer_size);
</span><span class="cx"> return NULL;
</span><span class="cx"> }
</span><span class="lines">@@ -1865,24 +2354,24 @@
</span><span class="cx"> #if 0
</span><span class="cx"> err = snd_pcm_sw_params_get_xfer_align(swparams, &xfer_align);
</span><span class="cx"> if (err < 0) {
</span><del>- ERRORA("Unable to obtain xfer align: %s\n", CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+ ERRORA("Unable to obtain xfer align: %s\n", SKYPIAX_P_LOG, snd_strerror(err));
</ins><span class="cx"> }
</span><del>- NOTICA("xfer_align: %d\n", CELLIAX_P_LOG, xfer_align);
</del><ins>+ NOTICA("xfer_align: %d\n", SKYPIAX_P_LOG, xfer_align);
</ins><span class="cx"> /* for some reason, on some platforms, xfer_align here is zero, that gives a floating point exception later. So, let's try to force it to 160, the frame size used by celliax */
</span><span class="cx"> xfer_align = p->alsa_period_size;
</span><del>- NOTICA("xfer_align: %d\n", CELLIAX_P_LOG, xfer_align);
</del><ins>+ NOTICA("xfer_align: %d\n", SKYPIAX_P_LOG, xfer_align);
</ins><span class="cx">
</span><span class="cx"> err = snd_pcm_sw_params_set_xfer_align(handle, swparams, xfer_align);
</span><span class="cx"> if (err < 0) {
</span><del>- ERRORA("Error setting xfer_align: %s\n", CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+ ERRORA("Error setting xfer_align: %s\n", SKYPIAX_P_LOG, snd_strerror(err));
</ins><span class="cx"> }
</span><del>- NOTICA("xfer_align: %d\n", CELLIAX_P_LOG, xfer_align);
</del><ins>+ NOTICA("xfer_align: %d\n", SKYPIAX_P_LOG, xfer_align);
</ins><span class="cx">
</span><span class="cx"> err = snd_pcm_sw_params_get_xfer_align(swparams, &xfer_align);
</span><span class="cx"> if (err < 0) {
</span><del>- ERRORA("Unable to obtain xfer align: %s\n", CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+ ERRORA("Unable to obtain xfer align: %s\n", SKYPIAX_P_LOG, snd_strerror(err));
</ins><span class="cx"> }
</span><del>- NOTICA("xfer_align: %d\n", CELLIAX_P_LOG, xfer_align);
</del><ins>+ NOTICA("xfer_align: %d\n", SKYPIAX_P_LOG, xfer_align);
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> /*
</span><span class="lines">@@ -1892,13 +2381,13 @@
</span><span class="cx"> 0);
</span><span class="cx">
</span><span class="cx"> if (err < 0) {
</span><del>- ERRORA("Error setting slep_min: %s\n", CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+ ERRORA("Error setting slep_min: %s\n", SKYPIAX_P_LOG, snd_strerror(err));
</ins><span class="cx"> }
</span><span class="cx"> */
</span><span class="cx"> n = chunk_size;
</span><span class="cx"> err = snd_pcm_sw_params_set_avail_min(handle, swparams, n);
</span><span class="cx"> if (err < 0) {
</span><del>- ERRORA("Error setting avail_min: %s\n", CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+ ERRORA("Error setting avail_min: %s\n", SKYPIAX_P_LOG, snd_strerror(err));
</ins><span class="cx"> }
</span><span class="cx"> #if 0
</span><span class="cx"> /* round up to closest transfer boundary */
</span><span class="lines">@@ -1922,7 +2411,7 @@
</span><span class="cx"> start_threshold = n;
</span><span class="cx"> err = snd_pcm_sw_params_set_start_threshold(handle, swparams, start_threshold);
</span><span class="cx"> if (err < 0) {
</span><del>- ERRORA("Error setting start_threshold: %s\n", CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+ ERRORA("Error setting start_threshold: %s\n", SKYPIAX_P_LOG, snd_strerror(err));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (stop_delay <= 0)
</span><span class="lines">@@ -1937,39 +2426,39 @@
</span><span class="cx"> err = snd_pcm_sw_params_set_stop_threshold(handle, swparams, stop_threshold);
</span><span class="cx">
</span><span class="cx"> if (err < 0) {
</span><del>- ERRORA("Error setting stop_threshold: %s\n", CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+ ERRORA("Error setting stop_threshold: %s\n", SKYPIAX_P_LOG, snd_strerror(err));
</ins><span class="cx"> }
</span><span class="cx"> #if 0
</span><span class="cx"> err = snd_pcm_sw_params_set_xfer_align(handle, swparams, xfer_align);
</span><span class="cx">
</span><span class="cx"> if (err < 0) {
</span><del>- ERRORA("Error setting xfer_align: %s\n", CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+ ERRORA("Error setting xfer_align: %s\n", SKYPIAX_P_LOG, snd_strerror(err));
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> if (snd_pcm_sw_params(handle, swparams) < 0) {
</span><del>- ERRORA("Error installing software parameters: %s\n", CELLIAX_P_LOG,
</del><ins>+ ERRORA("Error installing software parameters: %s\n", SKYPIAX_P_LOG,
</ins><span class="cx"> snd_strerror(err));
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> err = snd_pcm_poll_descriptors_count(handle);
</span><span class="cx"> if (err <= 0) {
</span><del>- ERRORA("Unable to get a poll descriptors count, error is %s\n", CELLIAX_P_LOG,
</del><ins>+ ERRORA("Unable to get a poll descriptors count, error is %s\n", SKYPIAX_P_LOG,
</ins><span class="cx"> snd_strerror(err));
</span><span class="cx"> return NULL;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (err != 1) { //number of poll descriptors
</span><del>- DEBUGA_SOUND("Can't handle more than one device\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_SOUND("Can't handle more than one device\n", SKYPIAX_P_LOG);
</ins><span class="cx"> return NULL;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> err = snd_pcm_poll_descriptors(handle, &p->pfd, err);
</span><span class="cx"> if (err != 1) {
</span><del>- ERRORA("snd_pcm_poll_descriptors failed, %s\n", CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+ ERRORA("snd_pcm_poll_descriptors failed, %s\n", SKYPIAX_P_LOG, snd_strerror(err));
</ins><span class="cx"> return NULL;
</span><span class="cx"> }
</span><del>- DEBUGA_SOUND("Acquired fd %d from the poll descriptor\n", CELLIAX_P_LOG, p->pfd.fd);
</del><ins>+ DEBUGA_SOUND("Acquired fd %d from the poll descriptor\n", SKYPIAX_P_LOG, p->pfd.fd);
</ins><span class="cx">
</span><span class="cx"> if (stream == SND_PCM_STREAM_CAPTURE) {
</span><span class="cx"> p->celliax_sound_capt_fd = p->pfd.fd;
</span><span class="lines">@@ -1981,37 +2470,37 @@
</span><span class="cx"> if (state != SND_PCM_STATE_PREPARED) {
</span><span class="cx"> err = snd_pcm_prepare(handle);
</span><span class="cx"> if (err) {
</span><del>- ERRORA("snd_pcm_prepare failed, %s\n", CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+ ERRORA("snd_pcm_prepare failed, %s\n", SKYPIAX_P_LOG, snd_strerror(err));
</ins><span class="cx"> return NULL;
</span><span class="cx"> }
</span><del>- DEBUGA_SOUND("prepared!\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_SOUND("prepared!\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> if (stream == SND_PCM_STREAM_CAPTURE) {
</span><span class="cx"> err = snd_pcm_start(handle);
</span><span class="cx"> if (err) {
</span><del>- ERRORA("snd_pcm_start failed, %s\n", CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+ ERRORA("snd_pcm_start failed, %s\n", SKYPIAX_P_LOG, snd_strerror(err));
</ins><span class="cx"> return NULL;
</span><span class="cx"> }
</span><del>- DEBUGA_SOUND("started!\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_SOUND("started!\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> if (option_debug > 1) {
</span><span class="cx"> snd_output_t *output = NULL;
</span><span class="cx"> err = snd_output_stdio_attach(&output, stdout, 0);
</span><span class="cx"> if (err < 0) {
</span><del>- ERRORA("snd_output_stdio_attach failed: %s\n", CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+ ERRORA("snd_output_stdio_attach failed: %s\n", SKYPIAX_P_LOG, snd_strerror(err));
</ins><span class="cx"> }
</span><span class="cx"> snd_pcm_dump(handle, output);
</span><span class="cx"> }
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_SOUND("ALSA handle = %ld\n", CELLIAX_P_LOG, (long int) handle);
</del><ins>+ DEBUGA_SOUND("ALSA handle = %ld\n", SKYPIAX_P_LOG, (long int) handle);
</ins><span class="cx"> return handle;
</span><span class="cx">
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /*! \brief Read audio frames from interface */
</span><span class="cx">
</span><del>-struct ast_frame *alsa_read(struct celliax_pvt *p)
</del><ins>+struct ast_frame *alsa_read(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx"> static struct ast_frame f;
</span><span class="cx"> static short __buf[CELLIAX_FRAME_SIZE + AST_FRIENDLY_OFFSET / 2];
</span><span class="lines">@@ -2041,23 +2530,23 @@
</span><span class="cx">
</span><span class="cx"> state = snd_pcm_state(p->alsac);
</span><span class="cx"> if (state != SND_PCM_STATE_RUNNING) {
</span><del>- DEBUGA_SOUND("ALSA read state is not SND_PCM_STATE_RUNNING\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_SOUND("ALSA read state is not SND_PCM_STATE_RUNNING\n", SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> if (state != SND_PCM_STATE_PREPARED) {
</span><span class="cx"> error = snd_pcm_prepare(p->alsac);
</span><span class="cx"> if (error) {
</span><del>- ERRORA("snd_pcm_prepare failed, %s\n", CELLIAX_P_LOG, snd_strerror(error));
</del><ins>+ ERRORA("snd_pcm_prepare failed, %s\n", SKYPIAX_P_LOG, snd_strerror(error));
</ins><span class="cx"> return &f;
</span><span class="cx"> }
</span><del>- DEBUGA_SOUND("prepared!\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_SOUND("prepared!\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> usleep(1000);
</span><span class="cx"> error = snd_pcm_start(p->alsac);
</span><span class="cx"> if (error) {
</span><del>- ERRORA("snd_pcm_start failed, %s\n", CELLIAX_P_LOG, snd_strerror(error));
</del><ins>+ ERRORA("snd_pcm_start failed, %s\n", SKYPIAX_P_LOG, snd_strerror(error));
</ins><span class="cx"> return &f;
</span><span class="cx"> }
</span><del>- DEBUGA_SOUND("started!\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_SOUND("started!\n", SKYPIAX_P_LOG);
</ins><span class="cx"> usleep(1000);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -2081,15 +2570,15 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (r == -EPIPE) {
</span><del>- ERRORA("XRUN read\n\n\n\n\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("XRUN read\n\n\n\n\n", SKYPIAX_P_LOG);
</ins><span class="cx"> return &f;
</span><span class="cx"> } else if (r == -ESTRPIPE) {
</span><del>- ERRORA("-ESTRPIPE\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("-ESTRPIPE\n", SKYPIAX_P_LOG);
</ins><span class="cx"> return &f;
</span><span class="cx">
</span><span class="cx"> } else if (r == -EAGAIN) {
</span><span class="cx"> DEBUGA_SOUND("ALSA read -EAGAIN, the soundcard is not ready to be read by celliax\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx"> while (r == -EAGAIN) {
</span><span class="cx"> usleep(1000);
</span><span class="cx">
</span><span class="lines">@@ -2110,9 +2599,9 @@
</span><span class="cx">
</span><span class="cx"> }
</span><span class="cx"> } else if (r < 0) {
</span><del>- WARNINGA("ALSA Read error: %s\n", CELLIAX_P_LOG, snd_strerror(r));
</del><ins>+ WARNINGA("ALSA Read error: %s\n", SKYPIAX_P_LOG, snd_strerror(r));
</ins><span class="cx"> } else if (r >= 0) {
</span><del>- //DEBUGA_SOUND("read: r=%d, readpos=%d, left=%d, off=%d\n", CELLIAX_P_LOG, r, readpos, left, off);
</del><ins>+ //DEBUGA_SOUND("read: r=%d, readpos=%d, left=%d, off=%d\n", SKYPIAX_P_LOG, r, readpos, left, off);
</ins><span class="cx"> off -= r; //what is the meaning of this? a leftover, probably
</span><span class="cx"> }
</span><span class="cx"> /* Update positions */
</span><span class="lines">@@ -2141,7 +2630,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /*! \brief Write audio frames to interface */
</span><del>-int alsa_write(struct celliax_pvt *p, struct ast_frame *f)
</del><ins>+int alsa_write(private_t * tech_pvt, struct ast_frame *f)
</ins><span class="cx"> {
</span><span class="cx"> static char sizbuf[8000];
</span><span class="cx"> static char sizbuf2[16000];
</span><span class="lines">@@ -2158,7 +2647,7 @@
</span><span class="cx">
</span><span class="cx"> /* We have to digest the frame in 160-byte portions */
</span><span class="cx"> if (f->datalen > sizeof(sizbuf) - sizpos) {
</span><del>- ERRORA("Frame too large\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("Frame too large\n", SKYPIAX_P_LOG);
</ins><span class="cx"> res = -1;
</span><span class="cx"> } else {
</span><span class="cx"> memcpy(sizbuf + sizpos, f->data, f->datalen);
</span><span class="lines">@@ -2173,23 +2662,23 @@
</span><span class="cx">
</span><span class="cx"> DEBUGA_SOUND
</span><span class="cx"> ("You've got an ALSA write XRUN in the past (celliax can't fill the soundcard buffer fast enough). If this happens often (not after silence or after a pause in the speech, that's OK), and appear to damage the sound quality, first check if you have some IRQ problem, maybe sharing the soundcard IRQ with a broken or heavy loaded ethernet or graphic card. Then consider to increase the alsa_periods_in_buffer (now is set to %d) for this interface in the config file\n",
</span><del>- CELLIAX_P_LOG, p->alsa_periods_in_buffer);
</del><ins>+ SKYPIAX_P_LOG, p->alsa_periods_in_buffer);
</ins><span class="cx"> res = snd_pcm_prepare(p->alsap);
</span><span class="cx"> if (res) {
</span><del>- ERRORA("audio play prepare failed: %s\n", CELLIAX_P_LOG, snd_strerror(res));
</del><ins>+ ERRORA("audio play prepare failed: %s\n", SKYPIAX_P_LOG, snd_strerror(res));
</ins><span class="cx"> } else {
</span><span class="cx"> res = snd_pcm_format_set_silence(celliax_format, silencebuf, len / 2);
</span><span class="cx"> if (res < 0) {
</span><del>- DEBUGA_SOUND("Silence error %s\n", CELLIAX_P_LOG, snd_strerror(res));
</del><ins>+ DEBUGA_SOUND("Silence error %s\n", SKYPIAX_P_LOG, snd_strerror(res));
</ins><span class="cx"> res = -1;
</span><span class="cx"> }
</span><span class="cx"> for (i = 0; i < (p->alsa_periods_in_buffer - 1); i++) {
</span><span class="cx"> res = snd_pcm_writei(p->alsap, silencebuf, len / 2);
</span><span class="cx"> if (res != len / 2) {
</span><del>- DEBUGA_SOUND("Write returned a different quantity: %d\n", CELLIAX_P_LOG, res);
</del><ins>+ DEBUGA_SOUND("Write returned a different quantity: %d\n", SKYPIAX_P_LOG, res);
</ins><span class="cx"> res = -1;
</span><span class="cx"> } else if (res < 0) {
</span><del>- DEBUGA_SOUND("Write error %s\n", CELLIAX_P_LOG, snd_strerror(res));
</del><ins>+ DEBUGA_SOUND("Write error %s\n", SKYPIAX_P_LOG, snd_strerror(res));
</ins><span class="cx"> res = -1;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -2199,23 +2688,23 @@
</span><span class="cx">
</span><span class="cx"> res = snd_pcm_delay(p->alsap, &delayp1);
</span><span class="cx"> if (res < 0) {
</span><del>- DEBUGA_SOUND("Error %d on snd_pcm_delay: \"%s\"\n", CELLIAX_P_LOG, res,
</del><ins>+ DEBUGA_SOUND("Error %d on snd_pcm_delay: \"%s\"\n", SKYPIAX_P_LOG, res,
</ins><span class="cx"> snd_strerror(res));
</span><span class="cx"> res = snd_pcm_prepare(p->alsap);
</span><span class="cx"> if (res) {
</span><del>- DEBUGA_SOUND("snd_pcm_prepare failed: '%s'\n", CELLIAX_P_LOG, snd_strerror(res));
</del><ins>+ DEBUGA_SOUND("snd_pcm_prepare failed: '%s'\n", SKYPIAX_P_LOG, snd_strerror(res));
</ins><span class="cx"> }
</span><span class="cx"> res = snd_pcm_delay(p->alsap, &delayp1);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> delayp2 = snd_pcm_avail_update(p->alsap);
</span><span class="cx"> if (delayp2 < 0) {
</span><del>- DEBUGA_SOUND("Error %d on snd_pcm_avail_update: \"%s\"\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SOUND("Error %d on snd_pcm_avail_update: \"%s\"\n", SKYPIAX_P_LOG,
</ins><span class="cx"> (int) delayp2, snd_strerror(delayp2));
</span><span class="cx">
</span><span class="cx"> res = snd_pcm_prepare(p->alsap);
</span><span class="cx"> if (res) {
</span><del>- DEBUGA_SOUND("snd_pcm_prepare failed: '%s'\n", CELLIAX_P_LOG, snd_strerror(res));
</del><ins>+ DEBUGA_SOUND("snd_pcm_prepare failed: '%s'\n", SKYPIAX_P_LOG, snd_strerror(res));
</ins><span class="cx"> }
</span><span class="cx"> delayp2 = snd_pcm_avail_update(p->alsap);
</span><span class="cx"> }
</span><span class="lines">@@ -2227,29 +2716,29 @@
</span><span class="cx"> if (res) {
</span><span class="cx"> DEBUGA_SOUND
</span><span class="cx"> ("snd_pcm_prepare failed while trying to prevent an ALSA write XRUN: %s, delayp1=%d, delayp2=%d\n",
</span><del>- CELLIAX_P_LOG, snd_strerror(res), (int) delayp1, (int) delayp2);
</del><ins>+ SKYPIAX_P_LOG, snd_strerror(res), (int) delayp1, (int) delayp2);
</ins><span class="cx"> } else {
</span><span class="cx">
</span><span class="cx"> int i;
</span><span class="cx"> for (i = 0; i < (p->alsa_periods_in_buffer - 1); i++) {
</span><span class="cx"> res = snd_pcm_format_set_silence(celliax_format, silencebuf, len / 2);
</span><span class="cx"> if (res < 0) {
</span><del>- DEBUGA_SOUND("Silence error %s\n", CELLIAX_P_LOG, snd_strerror(res));
</del><ins>+ DEBUGA_SOUND("Silence error %s\n", SKYPIAX_P_LOG, snd_strerror(res));
</ins><span class="cx"> res = -1;
</span><span class="cx"> }
</span><span class="cx"> res = snd_pcm_writei(p->alsap, silencebuf, len / 2);
</span><span class="cx"> if (res < 0) {
</span><del>- DEBUGA_SOUND("Write error %s\n", CELLIAX_P_LOG, snd_strerror(res));
</del><ins>+ DEBUGA_SOUND("Write error %s\n", SKYPIAX_P_LOG, snd_strerror(res));
</ins><span class="cx"> res = -1;
</span><span class="cx"> } else if (res != len / 2) {
</span><del>- DEBUGA_SOUND("Write returned a different quantity: %d\n", CELLIAX_P_LOG, res);
</del><ins>+ DEBUGA_SOUND("Write returned a different quantity: %d\n", SKYPIAX_P_LOG, res);
</ins><span class="cx"> res = -1;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> DEBUGA_SOUND
</span><span class="cx"> ("PREVENTING an ALSA write XRUN (celliax can't fill the soundcard buffer fast enough). If this happens often (not after silence or after a pause in the speech, that's OK), and appear to damage the sound quality, first check if you have some IRQ problem, maybe sharing the soundcard IRQ with a broken or heavy loaded ethernet or graphic card. Then consider to increase the alsa_periods_in_buffer (now is set to %d) for this interface in the config file. delayp1=%d, delayp2=%d\n",
</span><del>- CELLIAX_P_LOG, p->alsa_periods_in_buffer, (int) delayp1, (int) delayp2);
</del><ins>+ SKYPIAX_P_LOG, p->alsa_periods_in_buffer, (int) delayp1, (int) delayp2);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> }
</span><span class="lines">@@ -2279,10 +2768,10 @@
</span><span class="cx"> if (res == -EPIPE) {
</span><span class="cx"> DEBUGA_SOUND
</span><span class="cx"> ("ALSA write EPIPE (XRUN) (celliax can't fill the soundcard buffer fast enough). If this happens often (not after silence or after a pause in the speech, that's OK), and appear to damage the sound quality, first check if you have some IRQ problem, maybe sharing the soundcard IRQ with a broken or heavy loaded ethernet or graphic card. Then consider to increase the alsa_periods_in_buffer (now is set to %d) for this interface in the config file. delayp1=%d, delayp2=%d\n",
</span><del>- CELLIAX_P_LOG, p->alsa_periods_in_buffer, (int) delayp1, (int) delayp2);
</del><ins>+ SKYPIAX_P_LOG, p->alsa_periods_in_buffer, (int) delayp1, (int) delayp2);
</ins><span class="cx"> res = snd_pcm_prepare(p->alsap);
</span><span class="cx"> if (res) {
</span><del>- ERRORA("audio play prepare failed: %s\n", CELLIAX_P_LOG, snd_strerror(res));
</del><ins>+ ERRORA("audio play prepare failed: %s\n", SKYPIAX_P_LOG, snd_strerror(res));
</ins><span class="cx"> } else {
</span><span class="cx">
</span><span class="cx"> if (p->alsa_play_is_mono) {
</span><span class="lines">@@ -2311,11 +2800,11 @@
</span><span class="cx">
</span><span class="cx"> } else {
</span><span class="cx"> if (res == -ESTRPIPE) {
</span><del>- ERRORA("You've got some big problems\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("You've got some big problems\n", SKYPIAX_P_LOG);
</ins><span class="cx"> } else if (res == -EAGAIN) {
</span><span class="cx"> res = 0;
</span><span class="cx"> } else if (res < 0) {
</span><del>- ERRORA("Error %d on audio write: \"%s\"\n", CELLIAX_P_LOG, res,
</del><ins>+ ERRORA("Error %d on audio write: \"%s\"\n", SKYPIAX_P_LOG, res,
</ins><span class="cx"> snd_strerror(res));
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -2325,22 +2814,22 @@
</span><span class="cx"> time(&now_timestamp);
</span><span class="cx"> if ((now_timestamp - p->audio_play_reset_timestamp) > p->audio_play_reset_period) {
</span><span class="cx"> if (option_debug)
</span><del>- DEBUGA_SOUND("reset audio play\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_SOUND("reset audio play\n", SKYPIAX_P_LOG);
</ins><span class="cx"> res = snd_pcm_wait(p->alsap, 1000);
</span><span class="cx"> if (res < 0) {
</span><del>- ERRORA("audio play wait failed: %s\n", CELLIAX_P_LOG, snd_strerror(res));
</del><ins>+ ERRORA("audio play wait failed: %s\n", SKYPIAX_P_LOG, snd_strerror(res));
</ins><span class="cx"> }
</span><span class="cx"> res = snd_pcm_drop(p->alsap);
</span><span class="cx"> if (res) {
</span><del>- ERRORA("audio play drop failed: %s\n", CELLIAX_P_LOG, snd_strerror(res));
</del><ins>+ ERRORA("audio play drop failed: %s\n", SKYPIAX_P_LOG, snd_strerror(res));
</ins><span class="cx"> }
</span><span class="cx"> res = snd_pcm_prepare(p->alsap);
</span><span class="cx"> if (res) {
</span><del>- ERRORA("audio play prepare failed: %s\n", CELLIAX_P_LOG, snd_strerror(res));
</del><ins>+ ERRORA("audio play prepare failed: %s\n", SKYPIAX_P_LOG, snd_strerror(res));
</ins><span class="cx"> }
</span><span class="cx"> res = snd_pcm_wait(p->alsap, 1000);
</span><span class="cx"> if (res < 0) {
</span><del>- ERRORA("audio play wait failed: %s\n", CELLIAX_P_LOG, snd_strerror(res));
</del><ins>+ ERRORA("audio play wait failed: %s\n", SKYPIAX_P_LOG, snd_strerror(res));
</ins><span class="cx"> }
</span><span class="cx"> time(&p->audio_play_reset_timestamp);
</span><span class="cx"> }
</span><span class="lines">@@ -2356,7 +2845,7 @@
</span><span class="cx"> #endif /* CELLIAX_ALSA */
</span><span class="cx">
</span><span class="cx"> #ifdef CELLIAX_PORTAUDIO
</span><del>-int celliax_portaudio_devlist(struct celliax_pvt *p)
</del><ins>+int celliax_portaudio_devlist(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx"> int i, numDevices;
</span><span class="cx"> const PaDeviceInfo *deviceInfo;
</span><span class="lines">@@ -2369,14 +2858,14 @@
</span><span class="cx"> deviceInfo = Pa_GetDeviceInfo(i);
</span><span class="cx"> NOTICA
</span><span class="cx"> ("Found PORTAUDIO device: id=%d\tname=%s\tmax input channels=%d\tmax output channels=%d\n",
</span><del>- CELLIAX_P_LOG, i, deviceInfo->name, deviceInfo->maxInputChannels,
</del><ins>+ SKYPIAX_P_LOG, i, deviceInfo->name, deviceInfo->maxInputChannels,
</ins><span class="cx"> deviceInfo->maxOutputChannels);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return numDevices;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int celliax_portaudio_init(struct celliax_pvt *p)
</del><ins>+int celliax_portaudio_init(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx"> PaError err;
</span><span class="cx"> int c;
</span><span class="lines">@@ -2396,13 +2885,13 @@
</span><span class="cx">
</span><span class="cx"> if (p->portaudiocindex > (numdevices - 1)) {
</span><span class="cx"> ERRORA("Portaudio Capture id=%d is out of range: valid id are from 0 to %d\n",
</span><del>- CELLIAX_P_LOG, p->portaudiocindex, (numdevices - 1));
</del><ins>+ SKYPIAX_P_LOG, p->portaudiocindex, (numdevices - 1));
</ins><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (p->portaudiopindex > (numdevices - 1)) {
</span><span class="cx"> ERRORA("Portaudio Playback id=%d is out of range: valid id are from 0 to %d\n",
</span><del>- CELLIAX_P_LOG, p->portaudiopindex, (numdevices - 1));
</del><ins>+ SKYPIAX_P_LOG, p->portaudiopindex, (numdevices - 1));
</ins><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="cx"> //inputParameters.device = 0;
</span><span class="lines">@@ -2414,12 +2903,12 @@
</span><span class="cx"> deviceInfo = Pa_GetDeviceInfo(inputParameters.device);
</span><span class="cx"> NOTICA
</span><span class="cx"> ("Using INPUT PORTAUDIO device: id=%d\tname=%s\tmax input channels=%d\tmax output channels=%d\n",
</span><del>- CELLIAX_P_LOG, inputParameters.device, deviceInfo->name,
</del><ins>+ SKYPIAX_P_LOG, inputParameters.device, deviceInfo->name,
</ins><span class="cx"> deviceInfo->maxInputChannels, deviceInfo->maxOutputChannels);
</span><span class="cx"> if (deviceInfo->maxInputChannels == 0) {
</span><span class="cx"> ERRORA
</span><span class="cx"> ("No INPUT channels on device: id=%d\tname=%s\tmax input channels=%d\tmax output channels=%d\n",
</span><del>- CELLIAX_P_LOG, inputParameters.device, deviceInfo->name,
</del><ins>+ SKYPIAX_P_LOG, inputParameters.device, deviceInfo->name,
</ins><span class="cx"> deviceInfo->maxInputChannels, deviceInfo->maxOutputChannels);
</span><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="lines">@@ -2438,12 +2927,12 @@
</span><span class="cx"> deviceInfo = Pa_GetDeviceInfo(outputParameters.device);
</span><span class="cx"> NOTICA
</span><span class="cx"> ("Using OUTPUT PORTAUDIO device: id=%d\tname=%s\tmax input channels=%d\tmax output channels=%d\n",
</span><del>- CELLIAX_P_LOG, outputParameters.device, deviceInfo->name,
</del><ins>+ SKYPIAX_P_LOG, outputParameters.device, deviceInfo->name,
</ins><span class="cx"> deviceInfo->maxInputChannels, deviceInfo->maxOutputChannels);
</span><span class="cx"> if (deviceInfo->maxOutputChannels == 0) {
</span><span class="cx"> ERRORA
</span><span class="cx"> ("No OUTPUT channels on device: id=%d\tname=%s\tmax input channels=%d\tmax output channels=%d\n",
</span><del>- CELLIAX_P_LOG, inputParameters.device, deviceInfo->name,
</del><ins>+ SKYPIAX_P_LOG, inputParameters.device, deviceInfo->name,
</ins><span class="cx"> deviceInfo->maxInputChannels, deviceInfo->maxOutputChannels);
</span><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="lines">@@ -2460,7 +2949,7 @@
</span><span class="cx"> /* build the pipe that will be polled on by pbx */
</span><span class="cx"> c = pipe(p->audiopipe);
</span><span class="cx"> if (c) {
</span><del>- ERRORA("Unable to create audio pipe\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("Unable to create audio pipe\n", SKYPIAX_P_LOG);
</ins><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="cx"> fcntl(p->audiopipe[0], F_SETFL, O_NONBLOCK);
</span><span class="lines">@@ -2479,7 +2968,7 @@
</span><span class="cx">
</span><span class="cx"> #endif // GIOVA48
</span><span class="cx"> if (err != paNoError) {
</span><del>- ERRORA("Unable to open audio stream: %s\n", CELLIAX_P_LOG, Pa_GetErrorText(err));
</del><ins>+ ERRORA("Unable to open audio stream: %s\n", SKYPIAX_P_LOG, Pa_GetErrorText(err));
</ins><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -2489,7 +2978,7 @@
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int celliax_portaudio_write(struct celliax_pvt *p, struct ast_frame *f)
</del><ins>+int celliax_portaudio_write(private_t * tech_pvt, struct ast_frame *f)
</ins><span class="cx"> {
</span><span class="cx"> int samples;
</span><span class="cx"> #ifdef GIOVA48
</span><span class="lines">@@ -2497,7 +2986,7 @@
</span><span class="cx"> short buf[3840];
</span><span class="cx"> short *buf2;
</span><span class="cx">
</span><del>- //ERRORA("1 f->datalen=: %d\n", CELLIAX_P_LOG, f->datalen);
</del><ins>+ //ERRORA("1 f->datalen=: %d\n", SKYPIAX_P_LOG, f->datalen);
</ins><span class="cx">
</span><span class="cx"> memset(buf, '\0', CELLIAX_FRAME_SIZE * 2);
</span><span class="cx">
</span><span class="lines">@@ -2536,7 +3025,7 @@
</span><span class="cx"> }
</span><span class="cx"> f->data = &buf;
</span><span class="cx"> f->datalen = f->datalen * 6;
</span><del>- //ERRORA("2 f->datalen=: %d\n", CELLIAX_P_LOG, f->datalen);
</del><ins>+ //ERRORA("2 f->datalen=: %d\n", SKYPIAX_P_LOG, f->datalen);
</ins><span class="cx"> //f->datalen = f->datalen;
</span><span class="cx"> #endif // GIOVA48
</span><span class="cx">
</span><span class="lines">@@ -2550,13 +3039,13 @@
</span><span class="cx"> #endif /* ASTERISK_VERSION_1_6_0_1 */
</span><span class="cx">
</span><span class="cx"> if (samples != (int) (f->datalen / sizeof(short)))
</span><del>- ERRORA("WriteAudioStream wrote: %d of %d\n", CELLIAX_P_LOG, samples,
</del><ins>+ ERRORA("WriteAudioStream wrote: %d of %d\n", SKYPIAX_P_LOG, samples,
</ins><span class="cx"> (int) (f->datalen / sizeof(short)));
</span><span class="cx">
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-struct ast_frame *celliax_portaudio_read(struct celliax_pvt *p)
</del><ins>+struct ast_frame *celliax_portaudio_read(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx"> static struct ast_frame f;
</span><span class="cx"> static short __buf[CELLIAX_FRAME_SIZE + AST_FRIENDLY_OFFSET / 2];
</span><span class="lines">@@ -2631,34 +3120,34 @@
</span><span class="cx"> return &f;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int celliax_portaudio_shutdown(struct celliax_pvt *p)
</del><ins>+int celliax_portaudio_shutdown(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx"> PaError err;
</span><span class="cx">
</span><span class="cx"> err = CloseAudioStream(p->stream);
</span><span class="cx">
</span><span class="cx"> if (err != paNoError)
</span><del>- ERRORA("not able to CloseAudioStream\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("not able to CloseAudioStream\n", SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> Pa_Terminate();
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx"> #endif // CELLIAX_PORTAUDIO
</span><span class="cx">
</span><del>-int celliax_serial_sync_AT(struct celliax_pvt *p)
</del><ins>+int celliax_serial_sync_AT(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx"> usleep(10000); /* 10msec */
</span><span class="cx"> time(&p->celliax_serial_synced_timestamp);
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int celliax_serial_getstatus_AT(struct celliax_pvt *p)
</del><ins>+int celliax_serial_getstatus_AT(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx"> int res;
</span><span class="cx">
</span><span class="cx"> if (p->owner) {
</span><span class="cx"> if (p->owner->_state != AST_STATE_UP && p->owner->_state != AST_STATE_DOWN) {
</span><del>- DEBUGA_AT("No getstatus, we're neither UP nor DOWN\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_SKYPE("No getstatus, we're neither UP nor DOWN\n", SKYPIAX_P_LOG);
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -2668,7 +3157,7 @@
</span><span class="cx"> res = celliax_serial_write_AT_ack(p, "AT");
</span><span class="cx"> if (res) {
</span><span class="cx"> ERRORA("AT was not acknowledged, continuing but maybe there is a problem\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> usleep(1000);
</span><span class="cx">
</span><span class="lines">@@ -2676,7 +3165,7 @@
</span><span class="cx"> res =
</span><span class="cx"> celliax_serial_write_AT_expect(p, p->at_query_battchg, p->at_query_battchg_expect);
</span><span class="cx"> if (res) {
</span><del>- WARNINGA("%s does not get %s from the phone. Continuing.\n", CELLIAX_P_LOG,
</del><ins>+ WARNINGA("%s does not get %s from the phone. Continuing.\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->at_query_battchg, p->at_query_battchg_expect);
</span><span class="cx"> }
</span><span class="cx"> usleep(1000);
</span><span class="lines">@@ -2686,7 +3175,7 @@
</span><span class="cx"> res =
</span><span class="cx"> celliax_serial_write_AT_expect(p, p->at_query_signal, p->at_query_signal_expect);
</span><span class="cx"> if (res) {
</span><del>- WARNINGA("%s does not get %s from the phone. Continuing.\n", CELLIAX_P_LOG,
</del><ins>+ WARNINGA("%s does not get %s from the phone. Continuing.\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->at_query_signal, p->at_query_signal_expect);
</span><span class="cx"> }
</span><span class="cx"> usleep(1000);
</span><span class="lines">@@ -2698,7 +3187,7 @@
</span><span class="cx"> if (res) {
</span><span class="cx"> WARNINGA
</span><span class="cx"> ("%s does not get %s from the modem, maybe a long msg is incoming. If this cellmodem is not a Motorola, you are arriving here because your cellmodem do not supports CNMI kind of incoming SMS alert; please let it know to the developers of Celliax. If this cellmodem is a Motorola and this message keeps repeating, and you cannot correctly receive SMSs from this interface, please manually clean all messages from the cellmodem/SIM. Continuing.\n",
</span><del>- CELLIAX_P_LOG, "AT+MMGL=\"HEADER ONLY\"", "OK");
</del><ins>+ SKYPIAX_P_LOG, "AT+MMGL=\"HEADER ONLY\"", "OK");
</ins><span class="cx"> } else {
</span><span class="cx"> usleep(1000);
</span><span class="cx"> if (p->unread_sms_msg_id) {
</span><span class="lines">@@ -2709,7 +3198,7 @@
</span><span class="cx"> if (res) {
</span><span class="cx"> ERRORA
</span><span class="cx"> ("AT+CSCS=\"UCS2\" (set TE messages to ucs2) do not got OK from the phone\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx"> memset(p->sms_message, 0, sizeof(p->sms_message));
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -2724,13 +3213,13 @@
</span><span class="cx"> if (res) {
</span><span class="cx"> ERRORA
</span><span class="cx"> ("AT+CMGR (read SMS) do not got OK from the phone, message sent was:|||%s|||\n",
</span><del>- CELLIAX_P_LOG, at_command);
</del><ins>+ SKYPIAX_P_LOG, at_command);
</ins><span class="cx"> }
</span><span class="cx"> res = celliax_serial_write_AT_ack(p, "AT+CSCS=\"GSM\"");
</span><span class="cx"> if (res) {
</span><span class="cx"> ERRORA
</span><span class="cx"> ("AT+CSCS=\"GSM\" (set TE messages to GSM) do not got OK from the phone\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> memset(at_command, 0, sizeof(at_command));
</span><span class="cx"> sprintf(at_command, "AT+CMGD=%d", p->unread_sms_msg_id); /* delete the message */
</span><span class="lines">@@ -2739,7 +3228,7 @@
</span><span class="cx"> if (res) {
</span><span class="cx"> ERRORA
</span><span class="cx"> ("AT+CMGD (Delete SMS) do not got OK from the phone, message sent was:|||%s|||\n",
</span><del>- CELLIAX_P_LOG, at_command);
</del><ins>+ SKYPIAX_P_LOG, at_command);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (strlen(p->sms_message)) {
</span><span class="lines">@@ -2753,7 +3242,7 @@
</span><span class="cx"> char *arg1[] = { p->sms_receiving_program, (char *) NULL };
</span><span class="cx"> int i;
</span><span class="cx">
</span><del>- NOTICA("incoming SMS message:>>>%s<<<\n", CELLIAX_P_LOG, p->sms_message);
</del><ins>+ NOTICA("incoming SMS message:>>>%s<<<\n", SKYPIAX_P_LOG, p->sms_message);
</ins><span class="cx"> pipe(fd1);
</span><span class="cx"> pid1 = fork();
</span><span class="cx">
</span><span class="lines">@@ -2767,7 +3256,7 @@
</span><span class="cx"> if (err) {
</span><span class="cx"> ERRORA
</span><span class="cx"> ("'sms_receiving_program' is set in config file to '%s', and it gave us back this error: %d, (%s). SMS received was:---%s---\n",
</span><del>- CELLIAX_P_LOG, p->sms_receiving_program, err, strerror(errno),
</del><ins>+ SKYPIAX_P_LOG, p->sms_receiving_program, err, strerror(errno),
</ins><span class="cx"> p->sms_message);
</span><span class="cx"> }
</span><span class="cx"> close(fd1[0]); // close output pipe side
</span><span class="lines">@@ -2781,7 +3270,7 @@
</span><span class="cx"> } else {
</span><span class="cx"> ERRORA
</span><span class="cx"> ("got SMS incoming message, but 'sms_receiving_program' is not set in config file. SMS received was:---%s---\n",
</span><del>- CELLIAX_P_LOG, p->sms_message);
</del><ins>+ SKYPIAX_P_LOG, p->sms_message);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> #if 1 //is this one needed? maybe it can interrupt an incoming call that is just to announce itself
</span><span class="lines">@@ -2792,7 +3281,7 @@
</span><span class="cx"> if (res) {
</span><span class="cx"> ERRORA
</span><span class="cx"> ("AT+CKPD=\"EEE\" (cellphone screen back to user) do not got OK from the phone\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="lines">@@ -2805,7 +3294,7 @@
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int celliax_serial_read_AT(struct celliax_pvt *p, int look_for_ack, int timeout_usec,
</del><ins>+int celliax_serial_read_AT(private_t * tech_pvt, int look_for_ack, int timeout_usec,
</ins><span class="cx"> int timeout_sec, const char *expected_string, int expect_crlf)
</span><span class="cx"> {
</span><span class="cx"> int select_err;
</span><span class="lines">@@ -2825,7 +3314,7 @@
</span><span class="cx"> FD_ZERO(&read_fds);
</span><span class="cx"> FD_SET(p->controldevfd, &read_fds);
</span><span class="cx">
</span><del>- //NOTICA (" INSIDE this celliax_serial_device %s \n", CELLIAX_P_LOG, p->controldevice_name);
</del><ins>+ //NOTICA (" INSIDE this celliax_serial_device %s \n", SKYPIAX_P_LOG, p->controldevice_name);
</ins><span class="cx"> tmp_answer_ptr = tmp_answer;
</span><span class="cx"> memset(tmp_answer, 0, sizeof(char) * AT_BUFSIZ);
</span><span class="cx">
</span><span class="lines">@@ -2843,7 +3332,7 @@
</span><span class="cx"> if (read_count == 0) {
</span><span class="cx"> ERRORA
</span><span class="cx"> ("read 0 bytes!!! Nenormalno! Marking this celliax_serial_device %s as dead, andif it is owned by a channel, hanging up. Maybe the phone is stuck, switched off, power down or battery exhausted\n",
</span><del>- CELLIAX_P_LOG, p->controldevice_name);
</del><ins>+ SKYPIAX_P_LOG, p->controldevice_name);
</ins><span class="cx"> p->controldev_dead = 1;
</span><span class="cx"> close(p->controldevfd);
</span><span class="cx"> UNLOCKA(&p->controldev_lock);
</span><span class="lines">@@ -2855,8 +3344,8 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (option_debug > 90) {
</span><del>- //DEBUGA_AT("1 read %d bytes, --|%s|--\n", CELLIAX_P_LOG, read_count, tmp_answer_ptr);
- //DEBUGA_AT("2 read %d bytes, --|%s|--\n", CELLIAX_P_LOG, read_count, tmp_answer);
</del><ins>+ //DEBUGA_SKYPE("1 read %d bytes, --|%s|--\n", SKYPIAX_P_LOG, read_count, tmp_answer_ptr);
+ //DEBUGA_SKYPE("2 read %d bytes, --|%s|--\n", SKYPIAX_P_LOG, read_count, tmp_answer);
</ins><span class="cx"> }
</span><span class="cx"> tmp_answer_ptr = tmp_answer_ptr + read_count;
</span><span class="cx">
</span><span class="lines">@@ -2871,7 +3360,7 @@
</span><span class="cx"> if (strlen(token_ptr) > AT_MESG_MAX_LENGTH) {
</span><span class="cx"> WARNINGA
</span><span class="cx"> ("AT mesg longer than buffer, original message was: |%s|, in buffer only: |%s|\n",
</span><del>- CELLIAX_P_LOG, token_ptr, p->line_array.result[la_counter]);
</del><ins>+ SKYPIAX_P_LOG, token_ptr, p->line_array.result[la_counter]);
</ins><span class="cx"> }
</span><span class="cx"> la_counter++;
</span><span class="cx"> while ((token_ptr = strtok(NULL, "\n\r"))) {
</span><span class="lines">@@ -2880,7 +3369,7 @@
</span><span class="cx"> if (strlen(token_ptr) > AT_MESG_MAX_LENGTH) {
</span><span class="cx"> WARNINGA
</span><span class="cx"> ("AT mesg longer than buffer, original message was: |%s|, in buffer only: |%s|\n",
</span><del>- CELLIAX_P_LOG, token_ptr, p->line_array.result[la_counter]);
</del><ins>+ SKYPIAX_P_LOG, token_ptr, p->line_array.result[la_counter]);
</ins><span class="cx"> }
</span><span class="cx"> la_counter++;
</span><span class="cx"> }
</span><span class="lines">@@ -2889,9 +3378,9 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (expected_string && !expect_crlf) {
</span><del>- DEBUGA_AT
</del><ins>+ DEBUGA_SKYPE
</ins><span class="cx"> ("last_line_ptr=|%s|, expected_string=|%s|, expect_crlf=%d, memcmp(last_line_ptr, expected_string, strlen(expected_string)) = %d\n",
</span><del>- CELLIAX_P_LOG, last_line_ptr, expected_string, expect_crlf, memcmp(last_line_ptr,
</del><ins>+ SKYPIAX_P_LOG, last_line_ptr, expected_string, expect_crlf, memcmp(last_line_ptr,
</ins><span class="cx"> expected_string,
</span><span class="cx"> strlen
</span><span class="cx"> (expected_string)));
</span><span class="lines">@@ -2913,7 +3402,7 @@
</span><span class="cx"> /* let's list the complete lines read so far, without re-listing the lines that has yet been listed */
</span><span class="cx"> if (option_debug > 1) {
</span><span class="cx"> for (i = la_read; i < la_counter; i++)
</span><del>- DEBUGA_AT("Read line %d: |%s|\n", CELLIAX_P_LOG, i, p->line_array.result[i]);
</del><ins>+ DEBUGA_SKYPE("Read line %d: |%s|\n", SKYPIAX_P_LOG, i, p->line_array.result[i]);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /* let's interpret the complete lines read so far (WITHOUT looking for OK, ERROR, and EXPECTED_STRING), without re-interpreting the lines that has been yet interpreted, so we're sure we don't miss anything */
</span><span class="lines">@@ -2925,7 +3414,7 @@
</span><span class="cx"> /* give CALLID (+CLIP) a chance, wait for the next RING before answering */
</span><span class="cx"> if (p->phone_callflow == CALLFLOW_INCOMING_RING) {
</span><span class="cx"> /* we're at the second ring, set the interface state, will be answered by celliax_do_monitor */
</span><del>- DEBUGA_AT("|%s| got second RING\n", CELLIAX_P_LOG, p->line_array.result[i]);
</del><ins>+ DEBUGA_SKYPE("|%s| got second RING\n", SKYPIAX_P_LOG, p->line_array.result[i]);
</ins><span class="cx"> p->interface_state = AST_STATE_RING;
</span><span class="cx"> } else {
</span><span class="cx"> /* we're at the first ring, so there is no CALLID yet thus clean the previous one
</span><span class="lines">@@ -2935,16 +3424,16 @@
</span><span class="cx"> /* only send AT+CLCC? if the device previously reported its support */
</span><span class="cx"> if (p->at_has_clcc != 0) {
</span><span class="cx"> /* we're at the first ring, try to get CALLID (with +CLCC) */
</span><del>- DEBUGA_AT("|%s| got first RING, sending AT+CLCC?\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("|%s| got first RING, sending AT+CLCC?\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx"> res = celliax_serial_write_AT_noack(p, "AT+CLCC?");
</span><span class="cx"> if (res) {
</span><span class="cx"> ERRORA("AT+CLCC? (call list) was not correctly sent to the phone\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> } else {
</span><del>- DEBUGA_AT("|%s| got first RING, but not sending AT+CLCC? as this device "
- "seems not to support\n", CELLIAX_P_LOG, p->line_array.result[i]);
</del><ins>+ DEBUGA_SKYPE("|%s| got first RING, but not sending AT+CLCC? as this device "
+ "seems not to support\n", SKYPIAX_P_LOG, p->line_array.result[i]);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> p->phone_callflow = CALLFLOW_INCOMING_RING;
</span><span class="lines">@@ -2979,7 +3468,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> p->phone_callflow = CALLFLOW_INCOMING_RING;
</span><del>- DEBUGA_AT("|%s| CLCC CALLID: name is %s, number is %s\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("|%s| CLCC CALLID: name is %s, number is %s\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i],
</span><span class="cx"> p->callid_name[0] ? p->callid_name : "not available",
</span><span class="cx"> p->callid_number[0] ? p->callid_number : "not available");
</span><span class="lines">@@ -3015,14 +3504,14 @@
</span><span class="cx">
</span><span class="cx"> if (p->interface_state != AST_STATE_RING) {
</span><span class="cx"> gettimeofday(&(p->call_incoming_time), NULL);
</span><del>- DEBUGA_AT("AST_STATE_RING call_incoming_time.tv_sec=%ld\n",
- CELLIAX_P_LOG, p->call_incoming_time.tv_sec);
</del><ins>+ DEBUGA_SKYPE("AST_STATE_RING call_incoming_time.tv_sec=%ld\n",
+ SKYPIAX_P_LOG, p->call_incoming_time.tv_sec);
</ins><span class="cx">
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> p->interface_state = AST_STATE_RING;
</span><span class="cx"> p->phone_callflow = CALLFLOW_INCOMING_RING;
</span><del>- DEBUGA_AT("|%s| CLIP INCOMING CALLID: name is %s, number is %s\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("|%s| CLIP INCOMING CALLID: name is %s, number is %s\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i],
</span><span class="cx"> p->callid_name[0] != 1 ? p->callid_name : "not available",
</span><span class="cx"> p->callid_number[0] ? p->callid_number : "not available");
</span><span class="lines">@@ -3031,37 +3520,37 @@
</span><span class="cx"> if ((strcmp(p->line_array.result[i], "BUSY") == 0)) {
</span><span class="cx"> p->phone_callflow = CALLFLOW_CALL_LINEBUSY;
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT("|%s| CALLFLOW_CALL_LINEBUSY\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("|%s| CALLFLOW_CALL_LINEBUSY\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx"> if (p->interface_state != AST_STATE_DOWN && p->owner) {
</span><span class="cx"> ast_setstate(p->owner, AST_STATE_BUSY);
</span><span class="cx"> celliax_queue_control(p->owner, AST_CONTROL_BUSY);
</span><span class="cx"> } else {
</span><del>- ERRORA("Why BUSY now?\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("Why BUSY now?\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> if ((strcmp(p->line_array.result[i], "NO ANSWER") == 0)) {
</span><span class="cx"> p->phone_callflow = CALLFLOW_CALL_NOANSWER;
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT("|%s| CALLFLOW_CALL_NOANSWER\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("|%s| CALLFLOW_CALL_NOANSWER\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx"> if (p->interface_state != AST_STATE_DOWN && p->owner) {
</span><span class="cx"> p->owner->hangupcause = AST_CAUSE_NO_ANSWER;
</span><span class="cx"> celliax_queue_control(p->owner, AST_CONTROL_HANGUP);
</span><span class="cx"> } else {
</span><del>- ERRORA("Why NO ANSWER now?\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("Why NO ANSWER now?\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> if ((strcmp(p->line_array.result[i], "NO CARRIER") == 0)) {
</span><span class="cx"> p->phone_callflow = CALLFLOW_CALL_NOCARRIER;
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT("|%s| CALLFLOW_CALL_NOCARRIER\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("|%s| CALLFLOW_CALL_NOCARRIER\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx"> if (p->interface_state != AST_STATE_DOWN && p->owner) {
</span><span class="cx"> p->owner->hangupcause = AST_CAUSE_FAILURE;
</span><span class="cx"> celliax_queue_control(p->owner, AST_CONTROL_HANGUP);
</span><span class="cx"> } else {
</span><del>- ERRORA("Why NO CARRIER now?\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("Why NO CARRIER now?\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -3073,34 +3562,34 @@
</span><span class="cx"> err =
</span><span class="cx"> sscanf(&p->line_array.result[i][6], "%d,%d", &power_supply, &battery_strenght);
</span><span class="cx"> if (err < 2) {
</span><del>- DEBUGA_AT("|%s| is not formatted as: |+CBC: xx,yy| now trying |+CBC:xx,yy|\n",
- CELLIAX_P_LOG, p->line_array.result[i]);
</del><ins>+ DEBUGA_SKYPE("|%s| is not formatted as: |+CBC: xx,yy| now trying |+CBC:xx,yy|\n",
+ SKYPIAX_P_LOG, p->line_array.result[i]);
</ins><span class="cx">
</span><span class="cx"> err =
</span><span class="cx"> sscanf(&p->line_array.result[i][5], "%d,%d", &power_supply,
</span><span class="cx"> &battery_strenght);
</span><del>- DEBUGA_AT("|%s| +CBC: Powered by %s, battery strenght=%d\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("|%s| +CBC: Powered by %s, battery strenght=%d\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i], power_supply ? "power supply" : "battery",
</span><span class="cx"> battery_strenght);
</span><span class="cx">
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (err < 2) {
</span><del>- DEBUGA_AT("|%s| is not formatted as: |+CBC:xx,yy| giving up\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("|%s| is not formatted as: |+CBC:xx,yy| giving up\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> else {
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT("|%s| +CBC: Powered by %s, battery strenght=%d\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("|%s| +CBC: Powered by %s, battery strenght=%d\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i], power_supply ? "power supply" : "battery",
</span><span class="cx"> battery_strenght);
</span><span class="cx"> if (!power_supply) {
</span><span class="cx"> if (battery_strenght < 10) {
</span><del>- ERRORA("|%s| BATTERY ALMOST EXHAUSTED\n", CELLIAX_P_LOG,
</del><ins>+ ERRORA("|%s| BATTERY ALMOST EXHAUSTED\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx"> } else if (battery_strenght < 20) {
</span><del>- WARNINGA("|%s| BATTERY LOW\n", CELLIAX_P_LOG, p->line_array.result[i]);
</del><ins>+ WARNINGA("|%s| BATTERY LOW\n", SKYPIAX_P_LOG, p->line_array.result[i]);
</ins><span class="cx">
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -3116,18 +3605,18 @@
</span><span class="cx">
</span><span class="cx"> err = sscanf(&p->line_array.result[i][6], "%d,%d", &signal_quality, &ber);
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT("|%s| +CSQ: Signal Quality: %d, Error Rate=%d\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("|%s| +CSQ: Signal Quality: %d, Error Rate=%d\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i], signal_quality, ber);
</span><span class="cx"> if (err < 2) {
</span><del>- ERRORA("|%s| is not formatted as: |+CSQ: xx,yy|\n", CELLIAX_P_LOG,
</del><ins>+ ERRORA("|%s| is not formatted as: |+CSQ: xx,yy|\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx"> } else {
</span><span class="cx"> if (signal_quality < 11 || signal_quality == 99) {
</span><span class="cx"> WARNINGA
</span><span class="cx"> ("|%s| CELLPHONE GETS ALMOST NO SIGNAL, consider to move it or additional antenna\n",
</span><del>- CELLIAX_P_LOG, p->line_array.result[i]);
</del><ins>+ SKYPIAX_P_LOG, p->line_array.result[i]);
</ins><span class="cx"> } else if (signal_quality < 15) {
</span><del>- WARNINGA("|%s| CELLPHONE GETS SIGNAL LOW\n", CELLIAX_P_LOG,
</del><ins>+ WARNINGA("|%s| CELLPHONE GETS SIGNAL LOW\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx">
</span><span class="cx"> }
</span><span class="lines">@@ -3139,9 +3628,9 @@
</span><span class="cx"> int err;
</span><span class="cx">
</span><span class="cx"> err = sscanf(&p->line_array.result[i][7], "%s", p->at_cmgw);
</span><del>- DEBUGA_AT("|%s| +CMGW: %s\n", CELLIAX_P_LOG, p->line_array.result[i], p->at_cmgw);
</del><ins>+ DEBUGA_SKYPE("|%s| +CMGW: %s\n", SKYPIAX_P_LOG, p->line_array.result[i], p->at_cmgw);
</ins><span class="cx"> if (err < 1) {
</span><del>- ERRORA("|%s| is not formatted as: |+CMGW: xxxx|\n", CELLIAX_P_LOG,
</del><ins>+ ERRORA("|%s| is not formatted as: |+CMGW: xxxx|\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -3151,12 +3640,12 @@
</span><span class="cx"> if ((strcmp(p->line_array.result[i], p->at_call_idle) == 0)) {
</span><span class="cx"> p->phone_callflow = CALLFLOW_CALL_IDLE;
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT("|%s| CALLFLOW_CALL_IDLE\n", CELLIAX_P_LOG, p->line_array.result[i]);
</del><ins>+ DEBUGA_SKYPE("|%s| CALLFLOW_CALL_IDLE\n", SKYPIAX_P_LOG, p->line_array.result[i]);
</ins><span class="cx"> if (p->interface_state != AST_STATE_DOWN && p->owner) {
</span><del>- DEBUGA_AT("just received a remote HANGUP\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_SKYPE("just received a remote HANGUP\n", SKYPIAX_P_LOG);
</ins><span class="cx"> p->owner->hangupcause = AST_CAUSE_NORMAL;
</span><span class="cx"> celliax_queue_control(p->owner, AST_CONTROL_HANGUP);
</span><del>- DEBUGA_AT("just sent AST_CONTROL_HANGUP\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_SKYPE("just sent AST_CONTROL_HANGUP\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -3165,7 +3654,7 @@
</span><span class="cx"> //char list_command[64];
</span><span class="cx">
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT("|%s| CALLFLOW_CALL_INCOMING\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("|%s| CALLFLOW_CALL_INCOMING\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx">
</span><span class="cx"> if (p->phone_callflow != CALLFLOW_CALL_INCOMING
</span><span class="lines">@@ -3173,8 +3662,8 @@
</span><span class="cx"> //mark the time of CALLFLOW_CALL_INCOMING
</span><span class="cx"> gettimeofday(&(p->call_incoming_time), NULL);
</span><span class="cx"> p->phone_callflow = CALLFLOW_CALL_INCOMING;
</span><del>- DEBUGA_AT("CALLFLOW_CALL_INCOMING call_incoming_time.tv_sec=%ld\n",
- CELLIAX_P_LOG, p->call_incoming_time.tv_sec);
</del><ins>+ DEBUGA_SKYPE("CALLFLOW_CALL_INCOMING call_incoming_time.tv_sec=%ld\n",
+ SKYPIAX_P_LOG, p->call_incoming_time.tv_sec);
</ins><span class="cx">
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -3182,34 +3671,34 @@
</span><span class="cx"> if ((strcmp(p->line_array.result[i], p->at_call_active) == 0)) {
</span><span class="cx"> p->phone_callflow = CALLFLOW_CALL_ACTIVE;
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT("|%s| CALLFLOW_CALL_ACTIVE\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("|%s| CALLFLOW_CALL_ACTIVE\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx">
</span><span class="cx"> if (p->owner && p->interface_state == CALLFLOW_CALL_DIALING) {
</span><del>- DEBUGA_PBX("just received a remote ANSWER\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_PBX("just received a remote ANSWER\n", SKYPIAX_P_LOG);
</ins><span class="cx"> if (p->owner->_state != AST_STATE_UP) {
</span><span class="cx"> celliax_queue_control(p->owner, AST_CONTROL_RINGING);
</span><del>- DEBUGA_PBX("just sent AST_CONTROL_RINGING\n", CELLIAX_P_LOG);
- DEBUGA_PBX("going to send AST_CONTROL_ANSWER\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_PBX("just sent AST_CONTROL_RINGING\n", SKYPIAX_P_LOG);
+ DEBUGA_PBX("going to send AST_CONTROL_ANSWER\n", SKYPIAX_P_LOG);
</ins><span class="cx"> celliax_queue_control(p->owner, AST_CONTROL_ANSWER);
</span><del>- DEBUGA_PBX("just sent AST_CONTROL_ANSWER\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_PBX("just sent AST_CONTROL_ANSWER\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> } else {
</span><span class="cx"> }
</span><span class="cx"> p->interface_state = AST_STATE_UP;
</span><del>- DEBUGA_PBX("just interface_state UP\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_PBX("just interface_state UP\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if ((strcmp(p->line_array.result[i], p->at_call_calling) == 0)) {
</span><span class="cx"> p->phone_callflow = CALLFLOW_CALL_DIALING;
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT("|%s| CALLFLOW_CALL_DIALING\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("|%s| CALLFLOW_CALL_DIALING\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx"> }
</span><span class="cx"> if ((strcmp(p->line_array.result[i], p->at_call_failed) == 0)) {
</span><span class="cx"> p->phone_callflow = CALLFLOW_CALL_FAILED;
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT("|%s| CALLFLOW_CALL_FAILED\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("|%s| CALLFLOW_CALL_FAILED\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx"> if (p->interface_state != AST_STATE_DOWN && p->owner) {
</span><span class="cx"> p->owner->hangupcause = AST_CAUSE_FAILURE;
</span><span class="lines">@@ -3219,13 +3708,13 @@
</span><span class="cx">
</span><span class="cx"> if ((strncmp(p->line_array.result[i], "+CSCA:", 6) == 0)) { //TODO SMS FIXME in config!
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT("|%s| +CSCA: Message Center Address!\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("|%s| +CSCA: Message Center Address!\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if ((strncmp(p->line_array.result[i], "+CMGF:", 6) == 0)) { //TODO SMS FIXME in config!
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT("|%s| +CMGF: Message Format!\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("|%s| +CMGF: Message Format!\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -3235,15 +3724,15 @@
</span><span class="cx">
</span><span class="cx"> //FIXME all the following commands in config!
</span><span class="cx"> if (option_debug)
</span><del>- DEBUGA_AT("|%s| +CMTI: Incoming SMS!\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("|%s| +CMTI: Incoming SMS!\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx">
</span><span class="cx"> err = sscanf(&p->line_array.result[i][12], "%d", &pos);
</span><span class="cx"> if (err < 1) {
</span><del>- ERRORA("|%s| is not formatted as: |+CMTI: \"MT\",xx|\n", CELLIAX_P_LOG,
</del><ins>+ ERRORA("|%s| is not formatted as: |+CMTI: \"MT\",xx|\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx"> } else {
</span><del>- DEBUGA_AT("|%s| +CMTI: Incoming SMS in position: %d!\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("|%s| +CMTI: Incoming SMS in position: %d!\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i], pos);
</span><span class="cx"> p->unread_sms_msg_id = pos;
</span><span class="cx"> usleep(1000);
</span><span class="lines">@@ -3256,7 +3745,7 @@
</span><span class="cx"> if (res) {
</span><span class="cx"> ERRORA
</span><span class="cx"> ("AT+CSCS=\"UCS2\" (set TE messages to ucs2) do not got OK from the phone, continuing\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx"> //memset(p->sms_message, 0, sizeof(p->sms_message));
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -3271,13 +3760,13 @@
</span><span class="cx"> if (res) {
</span><span class="cx"> ERRORA
</span><span class="cx"> ("AT+CMGR (read SMS) do not got OK from the phone, message sent was:|||%s|||\n",
</span><del>- CELLIAX_P_LOG, at_command);
</del><ins>+ SKYPIAX_P_LOG, at_command);
</ins><span class="cx"> }
</span><span class="cx"> res = celliax_serial_write_AT_ack(p, "AT+CSCS=\"GSM\"");
</span><span class="cx"> if (res) {
</span><span class="cx"> ERRORA
</span><span class="cx"> ("AT+CSCS=\"GSM\" (set TE messages to GSM) do not got OK from the phone\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> memset(at_command, 0, sizeof(at_command));
</span><span class="cx"> sprintf(at_command, "AT+CMGD=%d", p->unread_sms_msg_id); /* delete the message */
</span><span class="lines">@@ -3286,7 +3775,7 @@
</span><span class="cx"> if (res) {
</span><span class="cx"> ERRORA
</span><span class="cx"> ("AT+CMGD (Delete SMS) do not got OK from the phone, message sent was:|||%s|||\n",
</span><del>- CELLIAX_P_LOG, at_command);
</del><ins>+ SKYPIAX_P_LOG, at_command);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (strlen(p->sms_message)) {
</span><span class="lines">@@ -3299,7 +3788,7 @@
</span><span class="cx"> char *arg1[] = { p->sms_receiving_program, (char *) NULL };
</span><span class="cx"> int i;
</span><span class="cx">
</span><del>- NOTICA("incoming SMS message:>>>%s<<<\n", CELLIAX_P_LOG, p->sms_message);
</del><ins>+ NOTICA("incoming SMS message:>>>%s<<<\n", SKYPIAX_P_LOG, p->sms_message);
</ins><span class="cx"> pipe(fd1);
</span><span class="cx"> pid1 = fork();
</span><span class="cx">
</span><span class="lines">@@ -3314,7 +3803,7 @@
</span><span class="cx"> if (err) {
</span><span class="cx"> ERRORA
</span><span class="cx"> ("'sms_receiving_program' is set in config file to '%s', and it gave us back this error: %d, (%s). SMS received was:---%s---\n",
</span><del>- CELLIAX_P_LOG, p->sms_receiving_program, err, strerror(errno),
</del><ins>+ SKYPIAX_P_LOG, p->sms_receiving_program, err, strerror(errno),
</ins><span class="cx"> p->sms_message);
</span><span class="cx"> }
</span><span class="cx"> close(fd1[0]); // close output pipe side
</span><span class="lines">@@ -3329,7 +3818,7 @@
</span><span class="cx"> } else {
</span><span class="cx"> ERRORA
</span><span class="cx"> ("got SMS incoming message, but 'sms_receiving_program' is not set in config file. SMS received was:---%s---\n",
</span><del>- CELLIAX_P_LOG, p->sms_message);
</del><ins>+ SKYPIAX_P_LOG, p->sms_message);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> #if 1 //is this one needed? maybe it can interrupt an incoming call that is just to announce itself
</span><span class="lines">@@ -3340,7 +3829,7 @@
</span><span class="cx"> if (res) {
</span><span class="cx"> ERRORA
</span><span class="cx"> ("AT+CKPD=\"EEE\" (cellphone screen back to user) do not got OK from the phone\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="lines">@@ -3355,42 +3844,42 @@
</span><span class="cx"> //int unread_msg_id=0;
</span><span class="cx">
</span><span class="cx"> if (option_debug)
</span><del>- DEBUGA_AT("|%s| +MMGL: Listing Motorola SMSs!\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("|%s| +MMGL: Listing Motorola SMSs!\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx">
</span><span class="cx"> err = sscanf(&p->line_array.result[i][7], "%d", &p->unread_sms_msg_id);
</span><span class="cx"> if (err < 1) {
</span><del>- ERRORA("|%s| is not formatted as: |+MMGL: xx|\n", CELLIAX_P_LOG,
</del><ins>+ ERRORA("|%s| is not formatted as: |+MMGL: xx|\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> if ((strncmp(p->line_array.result[i], "+CMGL:", 6) == 0)) { //TODO SMS FIXME in config!
</span><span class="cx"> if (option_debug)
</span><del>- DEBUGA_AT("|%s| +CMGL: Listing SMSs!\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("|%s| +CMGL: Listing SMSs!\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx"> }
</span><span class="cx"> if ((strncmp(p->line_array.result[i], "+MMGR:", 6) == 0)) { //TODO MOTOROLA SMS FIXME in config!
</span><span class="cx"> if (option_debug)
</span><del>- DEBUGA_AT("|%s| +MMGR: Reading Motorola SMS!\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("|%s| +MMGR: Reading Motorola SMS!\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx"> if (p->reading_sms_msg)
</span><span class="cx"> p->reading_sms_msg++;
</span><span class="cx"> }
</span><span class="cx"> if ((strncmp(p->line_array.result[i], "+CMGR: \"STO U", 13) == 0)) { //TODO SMS FIXME in config!
</span><span class="cx"> if (option_debug)
</span><del>- DEBUGA_AT("|%s| +CMGR: Reading stored UNSENT SMS!\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("|%s| +CMGR: Reading stored UNSENT SMS!\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx"> } else if ((strncmp(p->line_array.result[i], "+CMGR: \"STO S", 13) == 0)) { //TODO SMS FIXME in config!
</span><span class="cx"> if (option_debug)
</span><del>- DEBUGA_AT("|%s| +CMGR: Reading stored SENT SMS!\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("|%s| +CMGR: Reading stored SENT SMS!\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx"> } else if ((strncmp(p->line_array.result[i], "+CMGR: \"REC R", 13) == 0)) { //TODO SMS FIXME in config!
</span><span class="cx"> if (option_debug)
</span><del>- DEBUGA_AT("|%s| +CMGR: Reading received READ SMS!\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("|%s| +CMGR: Reading received READ SMS!\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx"> } else if ((strncmp(p->line_array.result[i], "+CMGR: \"REC U", 13) == 0)) { //TODO SMS FIXME in config!
</span><span class="cx"> if (option_debug)
</span><del>- DEBUGA_AT("|%s| +CMGR: Reading received UNREAD SMS!\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("|%s| +CMGR: Reading received UNREAD SMS!\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx"> if (p->reading_sms_msg)
</span><span class="cx"> p->reading_sms_msg++;
</span><span class="lines">@@ -3399,14 +3888,14 @@
</span><span class="cx"> if ((strcmp(p->line_array.result[i], "+MCST: 17") == 0)) { /* motorola call processing unsolicited messages */
</span><span class="cx"> p->phone_callflow = CALLFLOW_CALL_INFLUX;
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT("|%s| CALLFLOW_CALL_INFLUX\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("|%s| CALLFLOW_CALL_INFLUX\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if ((strcmp(p->line_array.result[i], "+MCST: 68") == 0)) { /* motorola call processing unsolicited messages */
</span><span class="cx"> p->phone_callflow = CALLFLOW_CALL_NOSERVICE;
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT("|%s| CALLFLOW_CALL_NOSERVICE\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("|%s| CALLFLOW_CALL_NOSERVICE\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx"> if (p->interface_state != AST_STATE_DOWN && p->owner) {
</span><span class="cx"> p->owner->hangupcause = AST_CAUSE_FAILURE;
</span><span class="lines">@@ -3416,7 +3905,7 @@
</span><span class="cx"> if ((strcmp(p->line_array.result[i], "+MCST: 70") == 0)) { /* motorola call processing unsolicited messages */
</span><span class="cx"> p->phone_callflow = CALLFLOW_CALL_OUTGOINGRESTRICTED;
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT("|%s| CALLFLOW_CALL_OUTGOINGRESTRICTED\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("|%s| CALLFLOW_CALL_OUTGOINGRESTRICTED\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx"> if (p->interface_state != AST_STATE_DOWN && p->owner) {
</span><span class="cx"> p->owner->hangupcause = AST_CAUSE_FAILURE;
</span><span class="lines">@@ -3426,7 +3915,7 @@
</span><span class="cx"> if ((strcmp(p->line_array.result[i], "+MCST: 72") == 0)) { /* motorola call processing unsolicited messages */
</span><span class="cx"> p->phone_callflow = CALLFLOW_CALL_SECURITYFAIL;
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT("|%s| CALLFLOW_CALL_SECURITYFAIL\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("|%s| CALLFLOW_CALL_SECURITYFAIL\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx"> if (p->interface_state != AST_STATE_DOWN && p->owner) {
</span><span class="cx"> p->owner->hangupcause = AST_CAUSE_FAILURE;
</span><span class="lines">@@ -3440,7 +3929,7 @@
</span><span class="cx"> int err, first_entry, last_entry, number_lenght, text_lenght;
</span><span class="cx">
</span><span class="cx"> if (option_debug)
</span><del>- DEBUGA_AT("phonebook struct: |%s|\n", CELLIAX_P_LOG, p->line_array.result[i]);
</del><ins>+ DEBUGA_SKYPE("phonebook struct: |%s|\n", SKYPIAX_P_LOG, p->line_array.result[i]);
</ins><span class="cx">
</span><span class="cx"> err =
</span><span class="cx"> sscanf(&p->line_array.result[i][8], "%d-%d),%d,%d", &first_entry, &last_entry,
</span><span class="lines">@@ -3455,13 +3944,13 @@
</span><span class="cx"> if (err < 4) {
</span><span class="cx"> ERRORA
</span><span class="cx"> ("phonebook struct: |%s| is nor formatted as: |+CPBR: (1-750),40,14| neither as: |+CPBR: 1-750,40,14|\n",
</span><del>- CELLIAX_P_LOG, p->line_array.result[i]);
</del><ins>+ SKYPIAX_P_LOG, p->line_array.result[i]);
</ins><span class="cx"> } else {
</span><span class="cx">
</span><span class="cx"> if (option_debug)
</span><del>- DEBUGA_AT
</del><ins>+ DEBUGA_SKYPE
</ins><span class="cx"> ("First entry: %d, last entry: %d, phone number max lenght: %d, text max lenght: %d\n",
</span><del>- CELLIAX_P_LOG, first_entry, last_entry, number_lenght, text_lenght);
</del><ins>+ SKYPIAX_P_LOG, first_entry, last_entry, number_lenght, text_lenght);
</ins><span class="cx"> p->phonebook_first_entry = first_entry;
</span><span class="cx"> p->phonebook_last_entry = last_entry;
</span><span class="cx"> p->phonebook_number_lenght = number_lenght;
</span><span class="lines">@@ -3477,7 +3966,7 @@
</span><span class="cx"> char entry_text[256];
</span><span class="cx">
</span><span class="cx"> if (option_debug)
</span><del>- DEBUGA_AT("phonebook entry: |%s|\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("phonebook entry: |%s|\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx">
</span><span class="cx"> err =
</span><span class="lines">@@ -3486,11 +3975,11 @@
</span><span class="cx"> if (err < 4) {
</span><span class="cx"> ERRORA
</span><span class="cx"> ("err=%d, phonebook entry: |%s| is not formatted as: |+CPBR: 504,\"+39025458068\",145,\"ciao a tutti\"|\n",
</span><del>- CELLIAX_P_LOG, err, p->line_array.result[i]);
</del><ins>+ SKYPIAX_P_LOG, err, p->line_array.result[i]);
</ins><span class="cx"> } else {
</span><span class="cx"> //TODO: sanitize entry_text
</span><span class="cx"> if (option_debug)
</span><del>- DEBUGA_AT("Number: %s, Text: %s, Type: %d\n", CELLIAX_P_LOG, entry_number,
</del><ins>+ DEBUGA_SKYPE("Number: %s, Text: %s, Type: %d\n", SKYPIAX_P_LOG, entry_number,
</ins><span class="cx"> entry_text, entry_type);
</span><span class="cx"> /* write entry in phonebook file */
</span><span class="cx"> if (p->phonebook_writing_fp) {
</span><span class="lines">@@ -3518,7 +4007,7 @@
</span><span class="cx"> char entry_text[256] = "";
</span><span class="cx">
</span><span class="cx"> if (option_debug)
</span><del>- DEBUGA_AT("phonebook entry: |%s|\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("phonebook entry: |%s|\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx">
</span><span class="cx"> err =
</span><span class="lines">@@ -3527,23 +4016,23 @@
</span><span class="cx"> if (err < 1) { //we match only on the progressive id, maybe the remote party has not sent its number, and/or there is no corresponding text entry in the phone directory
</span><span class="cx"> ERRORA
</span><span class="cx"> ("err=%d, phonebook entry: |%s| is not formatted as: |+CPBR: 504,\"+39025458068\",145,\"ciao a tutti\"|\n",
</span><del>- CELLIAX_P_LOG, err, p->line_array.result[i]);
</del><ins>+ SKYPIAX_P_LOG, err, p->line_array.result[i]);
</ins><span class="cx"> } else {
</span><span class="cx"> //TODO: sanitize entry_text
</span><span class="cx">
</span><span class="cx"> if (option_debug)
</span><del>- DEBUGA_AT("Number: %s, Text: %s, Type: %d\n", CELLIAX_P_LOG, entry_number,
</del><ins>+ DEBUGA_SKYPE("Number: %s, Text: %s, Type: %d\n", SKYPIAX_P_LOG, entry_number,
</ins><span class="cx"> entry_text, entry_type);
</span><span class="cx"> memset(p->callid_name, 0, sizeof(p->callid_name));
</span><span class="cx"> memset(p->callid_number, 0, sizeof(p->callid_number));
</span><span class="cx"> strncpy(p->callid_name, entry_text, sizeof(p->callid_name));
</span><span class="cx"> strncpy(p->callid_number, entry_number, sizeof(p->callid_number));
</span><span class="cx"> if (option_debug)
</span><del>- DEBUGA_AT("incoming callid: Text: %s, Number: %s\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("incoming callid: Text: %s, Number: %s\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->callid_name, p->callid_number);
</span><span class="cx">
</span><del>- DEBUGA_AT("|%s| CPBR INCOMING CALLID: name is %s, number is %s\n",
- CELLIAX_P_LOG, p->line_array.result[i],
</del><ins>+ DEBUGA_SKYPE("|%s| CPBR INCOMING CALLID: name is %s, number is %s\n",
+ SKYPIAX_P_LOG, p->line_array.result[i],
</ins><span class="cx"> p->callid_name[0] != 1 ? p->callid_name : "not available",
</span><span class="cx"> p->callid_number[0] ? p->callid_number : "not available");
</span><span class="cx">
</span><span class="lines">@@ -3557,7 +4046,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> else {
</span><del>- DEBUGA_AT("phonebook entry: |%s|\n", CELLIAX_P_LOG, p->line_array.result[i]);
</del><ins>+ DEBUGA_SKYPE("phonebook entry: |%s|\n", SKYPIAX_P_LOG, p->line_array.result[i]);
</ins><span class="cx">
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -3582,12 +4071,12 @@
</span><span class="cx"> p->phone_callflow = CALLFLOW_CALL_IDLE;
</span><span class="cx"> p->interface_state = AST_STATE_DOWN;
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT("|%s| Sony-Ericsson *ECAM/*ECAV: IDLE\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("|%s| Sony-Ericsson *ECAM/*ECAV: IDLE\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx"> break;
</span><span class="cx"> case 1:
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT("|%s| Sony-Ericsson *ECAM/*ECAV: CALLING\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("|%s| Sony-Ericsson *ECAM/*ECAV: CALLING\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx"> break;
</span><span class="cx"> case 2:
</span><span class="lines">@@ -3596,7 +4085,7 @@
</span><span class="cx"> }
</span><span class="cx"> p->interface_state = CALLFLOW_CALL_DIALING;
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT("|%s| Sony-Ericsson *ECAM/*ECAV: CONNECTING\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("|%s| Sony-Ericsson *ECAM/*ECAV: CONNECTING\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx"> break;
</span><span class="cx"> case 3:
</span><span class="lines">@@ -3607,26 +4096,26 @@
</span><span class="cx"> p->phone_callflow = CALLFLOW_CALL_ACTIVE;
</span><span class="cx"> p->interface_state = AST_STATE_UP;
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT("|%s| Sony-Ericsson *ECAM/*ECAV: ACTIVE\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("|%s| Sony-Ericsson *ECAM/*ECAV: ACTIVE\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx"> break;
</span><span class="cx"> case 4:
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT
</del><ins>+ DEBUGA_SKYPE
</ins><span class="cx"> ("|%s| Sony-Ericsson *ECAM/*ECAV: don't know how to handle HOLD event\n",
</span><del>- CELLIAX_P_LOG, p->line_array.result[i]);
</del><ins>+ SKYPIAX_P_LOG, p->line_array.result[i]);
</ins><span class="cx"> break;
</span><span class="cx"> case 5:
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT
</del><ins>+ DEBUGA_SKYPE
</ins><span class="cx"> ("|%s| Sony-Ericsson *ECAM/*ECAV: don't know how to handle WAITING event\n",
</span><del>- CELLIAX_P_LOG, p->line_array.result[i]);
</del><ins>+ SKYPIAX_P_LOG, p->line_array.result[i]);
</ins><span class="cx"> break;
</span><span class="cx"> case 6:
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT
</del><ins>+ DEBUGA_SKYPE
</ins><span class="cx"> ("|%s| Sony-Ericsson *ECAM/*ECAV: don't know how to handle ALERTING event\n",
</span><del>- CELLIAX_P_LOG, p->line_array.result[i]);
</del><ins>+ SKYPIAX_P_LOG, p->line_array.result[i]);
</ins><span class="cx"> break;
</span><span class="cx"> case 7:
</span><span class="cx"> if (p->owner) {
</span><span class="lines">@@ -3636,14 +4125,14 @@
</span><span class="cx"> p->phone_callflow = CALLFLOW_CALL_LINEBUSY;
</span><span class="cx"> p->interface_state = AST_STATE_BUSY;
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT("|%s| Sony-Ericsson *ECAM/*ECAV: BUSY\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("|%s| Sony-Ericsson *ECAM/*ECAV: BUSY\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> } else {
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT("|%s| Sony-Ericsson *ECAM/*ECAV: could not parse parameters\n",
- CELLIAX_P_LOG, p->line_array.result[i]);
</del><ins>+ DEBUGA_SKYPE("|%s| Sony-Ericsson *ECAM/*ECAV: could not parse parameters\n",
+ SKYPIAX_P_LOG, p->line_array.result[i]);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> }
</span><span class="lines">@@ -3651,70 +4140,70 @@
</span><span class="cx"> /* at_indicator_* are unsolicited messages sent by the phone to signal us that some of its visual indicators on its screen has changed, based on CIND CMER ETSI docs */
</span><span class="cx"> if ((strcmp(p->line_array.result[i], p->at_indicator_noservice_string) == 0)) {
</span><span class="cx"> if (option_debug > 1)
</span><del>- ERRORA("|%s| at_indicator_noservice_string\n", CELLIAX_P_LOG,
</del><ins>+ ERRORA("|%s| at_indicator_noservice_string\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if ((strcmp(p->line_array.result[i], p->at_indicator_nosignal_string) == 0)) {
</span><span class="cx"> if (option_debug > 1)
</span><del>- ERRORA("|%s| at_indicator_nosignal_string\n", CELLIAX_P_LOG,
</del><ins>+ ERRORA("|%s| at_indicator_nosignal_string\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if ((strcmp(p->line_array.result[i], p->at_indicator_lowsignal_string) == 0)) {
</span><span class="cx"> if (option_debug > 1)
</span><del>- WARNINGA("|%s| at_indicator_lowsignal_string\n", CELLIAX_P_LOG,
</del><ins>+ WARNINGA("|%s| at_indicator_lowsignal_string\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if ((strcmp(p->line_array.result[i], p->at_indicator_lowbattchg_string) == 0)) {
</span><span class="cx"> if (option_debug > 1)
</span><del>- WARNINGA("|%s| at_indicator_lowbattchg_string\n", CELLIAX_P_LOG,
</del><ins>+ WARNINGA("|%s| at_indicator_lowbattchg_string\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if ((strcmp(p->line_array.result[i], p->at_indicator_nobattchg_string) == 0)) {
</span><span class="cx"> if (option_debug > 1)
</span><del>- ERRORA("|%s| at_indicator_nobattchg_string\n", CELLIAX_P_LOG,
</del><ins>+ ERRORA("|%s| at_indicator_nobattchg_string\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if ((strcmp(p->line_array.result[i], p->at_indicator_callactive_string) == 0)) {
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT("|%s| at_indicator_callactive_string\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("|%s| at_indicator_callactive_string\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if ((strcmp(p->line_array.result[i], p->at_indicator_nocallactive_string) == 0)) {
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT("|%s| at_indicator_nocallactive_string\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("|%s| at_indicator_nocallactive_string\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if ((strcmp(p->line_array.result[i], p->at_indicator_nocallsetup_string) == 0)) {
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT("|%s| at_indicator_nocallsetup_string\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("|%s| at_indicator_nocallsetup_string\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if ((strcmp(p->line_array.result[i], p->at_indicator_callsetupincoming_string) ==
</span><span class="cx"> 0)) {
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT("|%s| at_indicator_callsetupincoming_string\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("|%s| at_indicator_callsetupincoming_string\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if ((strcmp(p->line_array.result[i], p->at_indicator_callsetupoutgoing_string) ==
</span><span class="cx"> 0)) {
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT("|%s| at_indicator_callsetupoutgoing_string\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("|%s| at_indicator_callsetupoutgoing_string\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if ((strcmp(p->line_array.result[i], p->at_indicator_callsetupremoteringing_string)
</span><span class="cx"> == 0)) {
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT("|%s| at_indicator_callsetupremoteringing_string\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("|%s| at_indicator_callsetupremoteringing_string\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->line_array.result[i]);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -3726,19 +4215,19 @@
</span><span class="cx"> if ((strncmp(p->line_array.result[i], expected_string, strlen(expected_string))
</span><span class="cx"> == 0)) {
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT("|%s| got what EXPECTED\n", CELLIAX_P_LOG, p->line_array.result[i]);
</del><ins>+ DEBUGA_SKYPE("|%s| got what EXPECTED\n", SKYPIAX_P_LOG, p->line_array.result[i]);
</ins><span class="cx"> at_ack = AT_OK;
</span><span class="cx"> }
</span><span class="cx"> } else {
</span><span class="cx"> if ((strcmp(p->line_array.result[i], "OK") == 0)) {
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT("got OK\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_SKYPE("got OK\n", SKYPIAX_P_LOG);
</ins><span class="cx"> at_ack = AT_OK;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> if ((strcmp(p->line_array.result[i], "ERROR") == 0)) {
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT("got ERROR\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_SKYPE("got ERROR\n", SKYPIAX_P_LOG);
</ins><span class="cx"> at_ack = AT_ERROR;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -3763,18 +4252,18 @@
</span><span class="cx"> && p->line_array.result[i][c - 1] != '\\' && inside_quote == 0) {
</span><span class="cx"> if (inside_comma) {
</span><span class="cx"> inside_comma = 0;
</span><del>- //NOTICA("inside_comma=%d, inside_quote=%d, we're at=%s\n", CELLIAX_P_LOG, inside_comma, inside_quote, &p->line_array.result[i][c]);
</del><ins>+ //NOTICA("inside_comma=%d, inside_quote=%d, we're at=%s\n", SKYPIAX_P_LOG, inside_comma, inside_quote, &p->line_array.result[i][c]);
</ins><span class="cx"> } else {
</span><span class="cx"> inside_comma = 1;
</span><del>- //NOTICA("inside_comma=%d, inside_quote=%d, we're at=%s\n", CELLIAX_P_LOG, inside_comma, inside_quote, &p->line_array.result[i][c]);
</del><ins>+ //NOTICA("inside_comma=%d, inside_quote=%d, we're at=%s\n", SKYPIAX_P_LOG, inside_comma, inside_quote, &p->line_array.result[i][c]);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> if (p->line_array.result[i][c] == '"'
</span><span class="cx"> && p->line_array.result[i][c - 1] != '\\') {
</span><span class="cx"> if (inside_quote) {
</span><span class="cx"> inside_quote = 0;
</span><del>- //ERRORA("END_CONTENT inside_comma=%d, inside_quote=%d, we're at=%s\n", CELLIAX_P_LOG, inside_comma, inside_quote, &p->line_array.result[i][c]);
- DEBUGA_AT("content=%s\n", CELLIAX_P_LOG, content);
</del><ins>+ //ERRORA("END_CONTENT inside_comma=%d, inside_quote=%d, we're at=%s\n", SKYPIAX_P_LOG, inside_comma, inside_quote, &p->line_array.result[i][c]);
+ DEBUGA_SKYPE("content=%s\n", SKYPIAX_P_LOG, content);
</ins><span class="cx">
</span><span class="cx"> strncat(p->sms_message, "---",
</span><span class="cx"> ((sizeof(p->sms_message) - strlen(p->sms_message)) - 1));
</span><span class="lines">@@ -3797,7 +4286,7 @@
</span><span class="cx"> d = 0;
</span><span class="cx"> } else {
</span><span class="cx"> inside_quote = 1;
</span><del>- //WARNINGA("START_CONTENT inside_comma=%d, inside_quote=%d, we're at=%s\n", CELLIAX_P_LOG, inside_comma, inside_quote, &p->line_array.result[i][c]);
</del><ins>+ //WARNINGA("START_CONTENT inside_comma=%d, inside_quote=%d, we're at=%s\n", SKYPIAX_P_LOG, inside_comma, inside_quote, &p->line_array.result[i][c]);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> if (inside_quote && p->line_array.result[i][c] != '"') {
</span><span class="lines">@@ -3828,7 +4317,7 @@
</span><span class="cx"> strncat(p->sms_message, "|||",
</span><span class="cx"> ((sizeof(p->sms_message) - strlen(p->sms_message)) - 1));
</span><span class="cx">
</span><del>- DEBUGA_AT("sms_message=%s\n", CELLIAX_P_LOG, p->sms_message);
</del><ins>+ DEBUGA_SKYPE("sms_message=%s\n", SKYPIAX_P_LOG, p->sms_message);
</ins><span class="cx">
</span><span class="cx"> } //it was the UCS2 from cellphone
</span><span class="cx">
</span><span class="lines">@@ -3842,7 +4331,7 @@
</span><span class="cx"> break;
</span><span class="cx">
</span><span class="cx"> if (la_counter > AT_MESG_MAX_LINES) {
</span><del>- ERRORA("Too many lines in result (>%d). Stopping reader.\n", CELLIAX_P_LOG,
</del><ins>+ ERRORA("Too many lines in result (>%d). Stopping reader.\n", SKYPIAX_P_LOG,
</ins><span class="cx"> AT_MESG_MAX_LINES);
</span><span class="cx"> at_ack = AT_ERROR;
</span><span class="cx"> break;
</span><span class="lines">@@ -3853,7 +4342,7 @@
</span><span class="cx"> POPPA_UNLOCKA(&p->controldev_lock);
</span><span class="cx"> if (select_err == -1) {
</span><span class="cx"> ERRORA("select returned -1 on %s, setting controldev_dead, error was: %s\n",
</span><del>- CELLIAX_P_LOG, p->controldevice_name, strerror(errno));
</del><ins>+ SKYPIAX_P_LOG, p->controldevice_name, strerror(errno));
</ins><span class="cx"> p->controldev_dead = 1;
</span><span class="cx"> close(p->controldevfd);
</span><span class="cx"> if (p->owner)
</span><span class="lines">@@ -3866,28 +4355,28 @@
</span><span class="cx"> struct timeval call_incoming_timeout;
</span><span class="cx"> gettimeofday(&call_incoming_timeout, NULL);
</span><span class="cx"> call_incoming_timeout.tv_sec -= 3;
</span><del>- DEBUGA_AT
</del><ins>+ DEBUGA_SKYPE
</ins><span class="cx"> ("CALLFLOW_CALL_INCOMING call_incoming_time.tv_sec=%ld, call_incoming_timeout.tv_sec=%ld\n",
</span><del>- CELLIAX_P_LOG, p->call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
</del><ins>+ SKYPIAX_P_LOG, p->call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
</ins><span class="cx"> if (call_incoming_timeout.tv_sec > p->call_incoming_time.tv_sec) {
</span><span class="cx">
</span><span class="cx"> p->call_incoming_time.tv_sec = 0;
</span><span class="cx"> p->call_incoming_time.tv_usec = 0;
</span><del>- DEBUGA_AT
</del><ins>+ DEBUGA_SKYPE
</ins><span class="cx"> ("CALLFLOW_CALL_INCOMING call_incoming_time.tv_sec=%ld, call_incoming_timeout.tv_sec=%ld\n",
</span><del>- CELLIAX_P_LOG, p->call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
</del><ins>+ SKYPIAX_P_LOG, p->call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
</ins><span class="cx"> res = celliax_serial_write_AT_ack(p, "AT+CPBS=RC");
</span><span class="cx"> if (res) {
</span><span class="cx"> ERRORA
</span><span class="cx"> ("AT+CPBS=RC (select memory of received calls) was not answered by the phone\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> p->phonebook_querying = 1;
</span><span class="cx"> res = celliax_serial_write_AT_ack(p, "AT+CPBR=?");
</span><span class="cx"> if (res) {
</span><span class="cx"> ERRORA
</span><span class="cx"> ("AT+CPBS=RC (select memory of received calls) was not answered by the phone\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> p->phonebook_querying = 0;
</span><span class="cx"> sprintf(list_command, "AT+CPBR=%d,%d", p->phonebook_first_entry,
</span><span class="lines">@@ -3895,7 +4384,7 @@
</span><span class="cx"> p->phonebook_listing_received_calls = 1;
</span><span class="cx"> res = celliax_serial_write_AT_expect_longtime(p, list_command, "OK");
</span><span class="cx"> if (res) {
</span><del>- WARNINGA("AT+CPBR=%d,%d failed, continue\n", CELLIAX_P_LOG,
</del><ins>+ WARNINGA("AT+CPBR=%d,%d failed, continue\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->phonebook_first_entry, p->phonebook_last_entry);
</span><span class="cx"> }
</span><span class="cx"> p->phonebook_listing_received_calls = 0;
</span><span class="lines">@@ -3906,14 +4395,14 @@
</span><span class="cx"> struct timeval call_incoming_timeout;
</span><span class="cx"> gettimeofday(&call_incoming_timeout, NULL);
</span><span class="cx"> call_incoming_timeout.tv_sec -= 10;
</span><del>- DEBUGA_AT
</del><ins>+ DEBUGA_SKYPE
</ins><span class="cx"> ("CALLFLOW_CALL_INCOMING call_incoming_time.tv_sec=%ld, call_incoming_timeout.tv_sec=%ld\n",
</span><del>- CELLIAX_P_LOG, p->call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
</del><ins>+ SKYPIAX_P_LOG, p->call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
</ins><span class="cx"> if (call_incoming_timeout.tv_sec > p->ringtime.tv_sec) {
</span><del>- ERRORA("Ringing stopped and I have not answered. Why?\n", CELLIAX_P_LOG);
- DEBUGA_AT
</del><ins>+ ERRORA("Ringing stopped and I have not answered. Why?\n", SKYPIAX_P_LOG);
+ DEBUGA_SKYPE
</ins><span class="cx"> ("CALLFLOW_CALL_INCOMING call_incoming_time.tv_sec=%ld, call_incoming_timeout.tv_sec=%ld\n",
</span><del>- CELLIAX_P_LOG, p->call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
</del><ins>+ SKYPIAX_P_LOG, p->call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
</ins><span class="cx"> if (p->owner) {
</span><span class="cx"> celliax_queue_control(p->owner, AST_CONTROL_HANGUP);
</span><span class="cx"> p->owner->hangupcause = AST_CAUSE_FAILURE;
</span><span class="lines">@@ -3921,14 +4410,14 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> p->line_array.elemcount = la_counter;
</span><del>- //NOTICA (" OUTSIDE this celliax_serial_device %s \n", CELLIAX_P_LOG, p->controldevice_name);
</del><ins>+ //NOTICA (" OUTSIDE this celliax_serial_device %s \n", SKYPIAX_P_LOG, p->controldevice_name);
</ins><span class="cx"> if (look_for_ack)
</span><span class="cx"> return at_ack;
</span><span class="cx"> else
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int celliax_serial_write_AT(struct celliax_pvt *p, const char *data)
</del><ins>+int celliax_serial_write_AT(private_t * tech_pvt, const char *data)
</ins><span class="cx"> {
</span><span class="cx"> int howmany;
</span><span class="cx"> int i;
</span><span class="lines">@@ -3941,65 +4430,65 @@
</span><span class="cx"> res = write(p->controldevfd, &data[i], 1);
</span><span class="cx">
</span><span class="cx"> if (res != 1) {
</span><del>- DEBUGA_AT("Error sending (%.1s): %d (%s)\n", CELLIAX_P_LOG, &data[i], res,
</del><ins>+ DEBUGA_SKYPE("Error sending (%.1s): %d (%s)\n", SKYPIAX_P_LOG, &data[i], res,
</ins><span class="cx"> strerror(errno));
</span><span class="cx"> usleep(100000);
</span><span class="cx"> for (count = 0; count < 10; count++) {
</span><span class="cx"> res = write(p->controldevfd, &data[i], 1);
</span><span class="cx"> if (res == 1) {
</span><del>- DEBUGA_AT("Successfully RE-sent (%.1s): %d %d (%s)\n", CELLIAX_P_LOG, &data[i],
</del><ins>+ DEBUGA_SKYPE("Successfully RE-sent (%.1s): %d %d (%s)\n", SKYPIAX_P_LOG, &data[i],
</ins><span class="cx"> count, res, strerror(errno));
</span><span class="cx"> break;
</span><span class="cx"> } else
</span><del>- DEBUGA_AT("Error RE-sending (%.1s): %d %d (%s)\n", CELLIAX_P_LOG, &data[i],
</del><ins>+ DEBUGA_SKYPE("Error RE-sending (%.1s): %d %d (%s)\n", SKYPIAX_P_LOG, &data[i],
</ins><span class="cx"> count, res, strerror(errno));
</span><span class="cx"> usleep(100000);
</span><span class="cx">
</span><span class="cx"> }
</span><span class="cx"> if (res != 1) {
</span><del>- ERRORA("Error RE-sending (%.1s): %d %d (%s)\n", CELLIAX_P_LOG, &data[i], count,
</del><ins>+ ERRORA("Error RE-sending (%.1s): %d %d (%s)\n", SKYPIAX_P_LOG, &data[i], count,
</ins><span class="cx"> res, strerror(errno));
</span><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT("sent data... (%.1s)\n", CELLIAX_P_LOG, &data[i]);
</del><ins>+ DEBUGA_SKYPE("sent data... (%.1s)\n", SKYPIAX_P_LOG, &data[i]);
</ins><span class="cx"> usleep(1000); /* release the cpu */
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> res = write(p->controldevfd, "\r", 1);
</span><span class="cx">
</span><span class="cx"> if (res != 1) {
</span><del>- DEBUGA_AT("Error sending (carriage return): %d (%s)\n", CELLIAX_P_LOG, res,
</del><ins>+ DEBUGA_SKYPE("Error sending (carriage return): %d (%s)\n", SKYPIAX_P_LOG, res,
</ins><span class="cx"> strerror(errno));
</span><span class="cx"> usleep(100000);
</span><span class="cx"> for (count = 0; count < 10; count++) {
</span><span class="cx"> res = write(p->controldevfd, "\r", 1);
</span><span class="cx">
</span><span class="cx"> if (res == 1) {
</span><del>- DEBUGA_AT("Successfully RE-sent carriage return: %d %d (%s)\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("Successfully RE-sent carriage return: %d %d (%s)\n", SKYPIAX_P_LOG,
</ins><span class="cx"> count, res, strerror(errno));
</span><span class="cx"> break;
</span><span class="cx"> } else
</span><del>- DEBUGA_AT("Error RE-sending (carriage return): %d %d (%s)\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("Error RE-sending (carriage return): %d %d (%s)\n", SKYPIAX_P_LOG,
</ins><span class="cx"> count, res, strerror(errno));
</span><span class="cx"> usleep(100000);
</span><span class="cx">
</span><span class="cx"> }
</span><span class="cx"> if (res != 1) {
</span><del>- ERRORA("Error RE-sending (carriage return): %d %d (%s)\n", CELLIAX_P_LOG, count,
</del><ins>+ ERRORA("Error RE-sending (carriage return): %d %d (%s)\n", SKYPIAX_P_LOG, count,
</ins><span class="cx"> res, strerror(errno));
</span><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT("sent (carriage return)\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_SKYPE("sent (carriage return)\n", SKYPIAX_P_LOG);
</ins><span class="cx"> usleep(1000); /* release the cpu */
</span><span class="cx">
</span><span class="cx"> return howmany;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int celliax_serial_write_AT_nocr(struct celliax_pvt *p, const char *data)
</del><ins>+int celliax_serial_write_AT_nocr(private_t * tech_pvt, const char *data)
</ins><span class="cx"> {
</span><span class="cx"> int howmany;
</span><span class="cx"> int i;
</span><span class="lines">@@ -4012,7 +4501,7 @@
</span><span class="cx"> res = write(p->controldevfd, &data[i], 1);
</span><span class="cx">
</span><span class="cx"> if (res != 1) {
</span><del>- DEBUGA_AT("Error sending (%.1s): %d (%s)\n", CELLIAX_P_LOG, &data[i], res,
</del><ins>+ DEBUGA_SKYPE("Error sending (%.1s): %d (%s)\n", SKYPIAX_P_LOG, &data[i], res,
</ins><span class="cx"> strerror(errno));
</span><span class="cx"> usleep(100000);
</span><span class="cx"> for (count = 0; count < 10; count++) {
</span><span class="lines">@@ -4020,19 +4509,19 @@
</span><span class="cx"> if (res == 1)
</span><span class="cx"> break;
</span><span class="cx"> else
</span><del>- DEBUGA_AT("Error RE-sending (%.1s): %d %d (%s)\n", CELLIAX_P_LOG, &data[i],
</del><ins>+ DEBUGA_SKYPE("Error RE-sending (%.1s): %d %d (%s)\n", SKYPIAX_P_LOG, &data[i],
</ins><span class="cx"> count, res, strerror(errno));
</span><span class="cx"> usleep(100000);
</span><span class="cx">
</span><span class="cx"> }
</span><span class="cx"> if (res != 1) {
</span><del>- ERRORA("Error RE-sending (%.1s): %d %d (%s)\n", CELLIAX_P_LOG, &data[i], count,
</del><ins>+ ERRORA("Error RE-sending (%.1s): %d %d (%s)\n", SKYPIAX_P_LOG, &data[i], count,
</ins><span class="cx"> res, strerror(errno));
</span><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT("sent data... (%.1s)\n", CELLIAX_P_LOG, &data[i]);
</del><ins>+ DEBUGA_SKYPE("sent data... (%.1s)\n", SKYPIAX_P_LOG, &data[i]);
</ins><span class="cx"> usleep(1000); /* release the cpu */
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -4041,17 +4530,17 @@
</span><span class="cx"> return howmany;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int celliax_serial_write_AT_noack(struct celliax_pvt *p, const char *data)
</del><ins>+int celliax_serial_write_AT_noack(private_t * tech_pvt, const char *data)
</ins><span class="cx"> {
</span><span class="cx">
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT("celliax_serial_write_AT_noack: %s\n", CELLIAX_P_LOG, data);
</del><ins>+ DEBUGA_SKYPE("celliax_serial_write_AT_noack: %s\n", SKYPIAX_P_LOG, data);
</ins><span class="cx">
</span><span class="cx"> PUSHA_UNLOCKA(&p->controldev_lock);
</span><span class="cx"> LOKKA(&p->controldev_lock);
</span><span class="cx"> if (celliax_serial_write_AT(p, data) != strlen(data)) {
</span><span class="cx">
</span><del>- ERRORA("Error sending data... (%s)\n", CELLIAX_P_LOG, strerror(errno));
</del><ins>+ ERRORA("Error sending data... (%s)\n", SKYPIAX_P_LOG, strerror(errno));
</ins><span class="cx"> UNLOCKA(&p->controldev_lock);
</span><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="lines">@@ -4061,16 +4550,16 @@
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int celliax_serial_write_AT_ack(struct celliax_pvt *p, const char *data)
</del><ins>+int celliax_serial_write_AT_ack(private_t * tech_pvt, const char *data)
</ins><span class="cx"> {
</span><span class="cx"> int at_result = AT_ERROR;
</span><span class="cx">
</span><span class="cx"> PUSHA_UNLOCKA(&p->controldev_lock);
</span><span class="cx"> LOKKA(&p->controldev_lock);
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT("sending: %s\n", CELLIAX_P_LOG, data);
</del><ins>+ DEBUGA_SKYPE("sending: %s\n", SKYPIAX_P_LOG, data);
</ins><span class="cx"> if (celliax_serial_write_AT(p, data) != strlen(data)) {
</span><del>- ERRORA("Error sending data... (%s) \n", CELLIAX_P_LOG, strerror(errno));
</del><ins>+ ERRORA("Error sending data... (%s) \n", SKYPIAX_P_LOG, strerror(errno));
</ins><span class="cx"> UNLOCKA(&p->controldev_lock);
</span><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="lines">@@ -4083,16 +4572,16 @@
</span><span class="cx">
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int celliax_serial_write_AT_ack_nocr_longtime(struct celliax_pvt *p, const char *data)
</del><ins>+int celliax_serial_write_AT_ack_nocr_longtime(private_t * tech_pvt, const char *data)
</ins><span class="cx"> {
</span><span class="cx"> int at_result = AT_ERROR;
</span><span class="cx">
</span><span class="cx"> PUSHA_UNLOCKA(&p->controldev_lock);
</span><span class="cx"> LOKKA(&p->controldev_lock);
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT("sending: %s\n", CELLIAX_P_LOG, data);
</del><ins>+ DEBUGA_SKYPE("sending: %s\n", SKYPIAX_P_LOG, data);
</ins><span class="cx"> if (celliax_serial_write_AT_nocr(p, data) != strlen(data)) {
</span><del>- ERRORA("Error sending data... (%s) \n", CELLIAX_P_LOG, strerror(errno));
</del><ins>+ ERRORA("Error sending data... (%s) \n", SKYPIAX_P_LOG, strerror(errno));
</ins><span class="cx"> UNLOCKA(&p->controldev_lock);
</span><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="lines">@@ -4105,7 +4594,7 @@
</span><span class="cx">
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int celliax_serial_write_AT_expect1(struct celliax_pvt *p, const char *data,
</del><ins>+int celliax_serial_write_AT_expect1(private_t * tech_pvt, const char *data,
</ins><span class="cx"> const char *expected_string, int expect_crlf,
</span><span class="cx"> int seconds)
</span><span class="cx"> {
</span><span class="lines">@@ -4114,9 +4603,9 @@
</span><span class="cx"> PUSHA_UNLOCKA(&p->controldev_lock);
</span><span class="cx"> LOKKA(&p->controldev_lock);
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT("sending: %s, expecting: %s\n", CELLIAX_P_LOG, data, expected_string);
</del><ins>+ DEBUGA_SKYPE("sending: %s, expecting: %s\n", SKYPIAX_P_LOG, data, expected_string);
</ins><span class="cx"> if (celliax_serial_write_AT(p, data) != strlen(data)) {
</span><del>- ERRORA("Error sending data... (%s) \n", CELLIAX_P_LOG, strerror(errno));
</del><ins>+ ERRORA("Error sending data... (%s) \n", SKYPIAX_P_LOG, strerror(errno));
</ins><span class="cx"> UNLOCKA(&p->controldev_lock);
</span><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="lines">@@ -4129,7 +4618,7 @@
</span><span class="cx">
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int celliax_serial_AT_expect(struct celliax_pvt *p, const char *expected_string,
</del><ins>+int celliax_serial_AT_expect(private_t * tech_pvt, const char *expected_string,
</ins><span class="cx"> int expect_crlf, int seconds)
</span><span class="cx"> {
</span><span class="cx"> int at_result = AT_ERROR;
</span><span class="lines">@@ -4137,7 +4626,7 @@
</span><span class="cx"> PUSHA_UNLOCKA(&p->controldev_lock);
</span><span class="cx"> LOKKA(&p->controldev_lock);
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_AT("expecting: %s\n", CELLIAX_P_LOG, expected_string);
</del><ins>+ DEBUGA_SKYPE("expecting: %s\n", SKYPIAX_P_LOG, expected_string);
</ins><span class="cx">
</span><span class="cx"> at_result = celliax_serial_read_AT(p, 1, 500000, seconds, expected_string, expect_crlf); // 20.5 sec timeout, used for querying the SIM and sending SMSs
</span><span class="cx"> UNLOCKA(&p->controldev_lock);
</span><span class="lines">@@ -4147,43 +4636,43 @@
</span><span class="cx">
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int celliax_serial_answer_AT(struct celliax_pvt *p)
</del><ins>+int celliax_serial_answer_AT(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx"> int res;
</span><span class="cx">
</span><span class="cx"> res = celliax_serial_write_AT_expect(p, p->at_answer, p->at_answer_expect);
</span><span class="cx"> if (res) {
</span><del>- DEBUGA_AT
</del><ins>+ DEBUGA_SKYPE
</ins><span class="cx"> ("at_answer command failed, command used: %s, expecting: %s, trying with AT+CKPD=\"S\"\n",
</span><del>- CELLIAX_P_LOG, p->at_answer, p->at_answer_expect);
</del><ins>+ SKYPIAX_P_LOG, p->at_answer, p->at_answer_expect);
</ins><span class="cx">
</span><span class="cx"> res = celliax_serial_write_AT_ack(p, "AT+CKPD=\"S\"");
</span><span class="cx"> if (res) {
</span><span class="cx"> ERRORA("at_answer command failed, command used: 'AT+CKPD=\"S\"', giving up\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> //p->interface_state = AST_STATE_UP;
</span><span class="cx"> //p->phone_callflow = CALLFLOW_CALL_ACTIVE;
</span><del>- DEBUGA_AT("AT: call answered\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_SKYPE("AT: call answered\n", SKYPIAX_P_LOG);
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int celliax_serial_hangup_AT(struct celliax_pvt *p)
</del><ins>+int celliax_serial_hangup_AT(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx"> int res;
</span><span class="cx">
</span><span class="cx"> if (p->interface_state != AST_STATE_DOWN) {
</span><span class="cx"> res = celliax_serial_write_AT_expect(p, p->at_hangup, p->at_hangup_expect);
</span><span class="cx"> if (res) {
</span><del>- DEBUGA_AT
</del><ins>+ DEBUGA_SKYPE
</ins><span class="cx"> ("at_hangup command failed, command used: %s, trying to use AT+CKPD=\"EEE\"\n",
</span><del>- CELLIAX_P_LOG, p->at_hangup);
</del><ins>+ SKYPIAX_P_LOG, p->at_hangup);
</ins><span class="cx"> res = celliax_serial_write_AT_ack(p, "AT+CKPD=\"EEE\"");
</span><span class="cx"> if (res) {
</span><span class="cx"> ERRORA("at_hangup command failed, command used: 'AT+CKPD=\"EEE\"'\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -4193,13 +4682,13 @@
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int celliax_serial_config_AT(struct celliax_pvt *p)
</del><ins>+int celliax_serial_config_AT(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx"> int res;
</span><span class="cx">
</span><span class="cx"> /* initial_pause? */
</span><span class="cx"> if (p->at_initial_pause) {
</span><del>- DEBUGA_AT("sleeping for %d usec\n", CELLIAX_P_LOG, p->at_initial_pause);
</del><ins>+ DEBUGA_SKYPE("sleeping for %d usec\n", SKYPIAX_P_LOG, p->at_initial_pause);
</ins><span class="cx"> usleep(p->at_initial_pause);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -4209,7 +4698,7 @@
</span><span class="cx"> if (strlen(p->at_preinit_1)) {
</span><span class="cx"> res = celliax_serial_write_AT_expect(p, p->at_preinit_1, p->at_preinit_1_expect);
</span><span class="cx"> if (res) {
</span><del>- DEBUGA_AT("%s does not get %s from the phone. Continuing.\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("%s does not get %s from the phone. Continuing.\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->at_preinit_1, p->at_preinit_1_expect);
</span><span class="cx"> }
</span><span class="cx"> } else {
</span><span class="lines">@@ -4219,7 +4708,7 @@
</span><span class="cx"> if (strlen(p->at_preinit_2)) {
</span><span class="cx"> res = celliax_serial_write_AT_expect(p, p->at_preinit_2, p->at_preinit_2_expect);
</span><span class="cx"> if (res) {
</span><del>- DEBUGA_AT("%s does not get %s from the phone. Continuing.\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("%s does not get %s from the phone. Continuing.\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->at_preinit_2, p->at_preinit_2_expect);
</span><span class="cx"> }
</span><span class="cx"> } else {
</span><span class="lines">@@ -4229,7 +4718,7 @@
</span><span class="cx"> if (strlen(p->at_preinit_3)) {
</span><span class="cx"> res = celliax_serial_write_AT_expect(p, p->at_preinit_3, p->at_preinit_3_expect);
</span><span class="cx"> if (res) {
</span><del>- DEBUGA_AT("%s does not get %s from the phone. Continuing.\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("%s does not get %s from the phone. Continuing.\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->at_preinit_3, p->at_preinit_3_expect);
</span><span class="cx"> }
</span><span class="cx"> } else {
</span><span class="lines">@@ -4239,7 +4728,7 @@
</span><span class="cx"> if (strlen(p->at_preinit_4)) {
</span><span class="cx"> res = celliax_serial_write_AT_expect(p, p->at_preinit_4, p->at_preinit_4_expect);
</span><span class="cx"> if (res) {
</span><del>- DEBUGA_AT("%s does not get %s from the phone. Continuing.\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("%s does not get %s from the phone. Continuing.\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->at_preinit_4, p->at_preinit_4_expect);
</span><span class="cx"> }
</span><span class="cx"> } else {
</span><span class="lines">@@ -4249,7 +4738,7 @@
</span><span class="cx"> if (strlen(p->at_preinit_5)) {
</span><span class="cx"> res = celliax_serial_write_AT_expect(p, p->at_preinit_5, p->at_preinit_5_expect);
</span><span class="cx"> if (res) {
</span><del>- DEBUGA_AT("%s does not get %s from the phone. Continuing.\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("%s does not get %s from the phone. Continuing.\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->at_preinit_5, p->at_preinit_5_expect);
</span><span class="cx"> }
</span><span class="cx"> } else {
</span><span class="lines">@@ -4261,21 +4750,21 @@
</span><span class="cx">
</span><span class="cx"> /* after_preinit_pause? */
</span><span class="cx"> if (p->at_after_preinit_pause) {
</span><del>- DEBUGA_AT("sleeping for %d usec\n", CELLIAX_P_LOG, p->at_after_preinit_pause);
</del><ins>+ DEBUGA_SKYPE("sleeping for %d usec\n", SKYPIAX_P_LOG, p->at_after_preinit_pause);
</ins><span class="cx"> usleep(p->at_after_preinit_pause);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /* phone, brother, art you alive? */
</span><span class="cx"> res = celliax_serial_write_AT_ack(p, "AT");
</span><span class="cx"> if (res) {
</span><del>- ERRORA("no response to AT\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("no response to AT\n", SKYPIAX_P_LOG);
</ins><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="cx"> /* for motorola, bring it back to "normal" mode if it happens to be in another mode */
</span><span class="cx"> res = celliax_serial_write_AT_ack(p, "AT+mode=0");
</span><span class="cx"> if (res) {
</span><del>- DEBUGA_AT("AT+mode=0 does not get OK from the phone. If it is NOT Motorola,"
- " no problem.\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_SKYPE("AT+mode=0 does not get OK from the phone. If it is NOT Motorola,"
+ " no problem.\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> usleep(50000);
</span><span class="cx"> /* for motorola end */
</span><span class="lines">@@ -4283,19 +4772,19 @@
</span><span class="cx"> /* reset AT configuration to phone default */
</span><span class="cx"> res = celliax_serial_write_AT_ack(p, "ATZ");
</span><span class="cx"> if (res) {
</span><del>- DEBUGA_AT("ATZ failed\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_SKYPE("ATZ failed\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /* disable AT command echo */
</span><span class="cx"> res = celliax_serial_write_AT_ack(p, "ATE0");
</span><span class="cx"> if (res) {
</span><del>- DEBUGA_AT("ATE0 failed\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_SKYPE("ATE0 failed\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /* disable extended error reporting */
</span><span class="cx"> res = celliax_serial_write_AT_ack(p, "AT+CMEE=0");
</span><span class="cx"> if (res) {
</span><del>- DEBUGA_AT("AT+CMEE failed\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_SKYPE("AT+CMEE failed\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /* various phone manufacturer identifier */
</span><span class="lines">@@ -4306,25 +4795,25 @@
</span><span class="cx"> sprintf(at_command, "ATI%d", i);
</span><span class="cx"> res = celliax_serial_write_AT_ack(p, at_command);
</span><span class="cx"> if (res) {
</span><del>- DEBUGA_AT("ATI%d command failed, continue\n", CELLIAX_P_LOG, i);
</del><ins>+ DEBUGA_SKYPE("ATI%d command failed, continue\n", SKYPIAX_P_LOG, i);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /* phone manufacturer */
</span><span class="cx"> res = celliax_serial_write_AT_ack(p, "AT+CGMI");
</span><span class="cx"> if (res) {
</span><del>- DEBUGA_AT("AT+CGMI failed\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_SKYPE("AT+CGMI failed\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /* phone model */
</span><span class="cx"> res = celliax_serial_write_AT_ack(p, "AT+CGMM");
</span><span class="cx"> if (res) {
</span><del>- DEBUGA_AT("AT+CGMM failed\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_SKYPE("AT+CGMM failed\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> res = celliax_serial_write_AT_ack(p, "AT+CGSN");
</span><span class="cx"> if (res) {
</span><del>- DEBUGA_AT("AT+CGSN failed\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_SKYPE("AT+CGSN failed\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /* this take a lot of time to complete on devices with slow serial link (eg.: 9600bps) */
</span><span class="lines">@@ -4332,35 +4821,35 @@
</span><span class="cx"> /* ask for the list of supported AT commands, useful to implement new models and debugging */
</span><span class="cx"> res = celliax_serial_write_AT_ack(p, "AT+CLAC");
</span><span class="cx"> if (res) {
</span><del>- DEBUGA_AT("AT+CLAC failed, continue\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_SKYPE("AT+CLAC failed, continue\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> /* signal incoming SMS with a +CMTI unsolicited msg */
</span><span class="cx"> res = celliax_serial_write_AT_ack(p, "AT+CNMI=3,1,0,0,0");
</span><span class="cx"> if (res) {
</span><del>- DEBUGA_AT("AT+CNMI=3,1,0,0,0 failed, continue\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_SKYPE("AT+CNMI=3,1,0,0,0 failed, continue\n", SKYPIAX_P_LOG);
</ins><span class="cx"> p->sms_cnmi_not_supported = 1;
</span><span class="cx"> p->celliax_serial_sync_period = 30;
</span><span class="cx"> }
</span><span class="cx"> /* what is the Message Center address (number) to which the SMS has to be sent? */
</span><span class="cx"> res = celliax_serial_write_AT_ack(p, "AT+CSCA?");
</span><span class="cx"> if (res) {
</span><del>- DEBUGA_AT("AT+CSCA? failed, continue\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_SKYPE("AT+CSCA? failed, continue\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> /* what is the Message Format of SMSs? */
</span><span class="cx"> res = celliax_serial_write_AT_ack(p, "AT+CMGF?");
</span><span class="cx"> if (res) {
</span><del>- DEBUGA_AT("AT+CMGF? failed, continue\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_SKYPE("AT+CMGF? failed, continue\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> res = celliax_serial_write_AT_ack(p, "AT+CMGF=1"); //TODO: support phones that only accept pdu mode
</span><span class="cx"> if (res) {
</span><del>- ERRORA("Error setting SMS sending mode to TEXT on the cellphone\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("Error setting SMS sending mode to TEXT on the cellphone\n", SKYPIAX_P_LOG);
</ins><span class="cx"> return RESULT_FAILURE;
</span><span class="cx"> }
</span><span class="cx"> /* what is the Charset of SMSs? */
</span><span class="cx"> res = celliax_serial_write_AT_ack(p, "AT+CSCS?");
</span><span class="cx"> if (res) {
</span><del>- DEBUGA_AT("AT+CSCS? failed, continue\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_SKYPE("AT+CSCS? failed, continue\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> p->no_ucs2 = 0;
</span><span class="lines">@@ -4368,7 +4857,7 @@
</span><span class="cx"> if (res) {
</span><span class="cx"> WARNINGA
</span><span class="cx"> ("AT+CSCS=\"UCS2\" (set TE messages to ucs2) do not got OK from the phone, let's try with 'GSM'\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx"> p->no_ucs2 = 1;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -4376,48 +4865,48 @@
</span><span class="cx"> res = celliax_serial_write_AT_ack(p, "AT+CSCS=\"GSM\"");
</span><span class="cx"> if (res) {
</span><span class="cx"> WARNINGA("AT+CSCS=\"GSM\" (set TE messages to GSM) do not got OK from the phone\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> //res = celliax_serial_write_AT_ack(p, "AT+CSMP=17,167,0,16"); //"flash", class 0 sms 7 bit
</span><span class="cx"> res = celliax_serial_write_AT_ack(p, "AT+CSMP=17,167,0,0"); //normal, 7 bit message
</span><span class="cx"> if (res) {
</span><del>- WARNINGA("AT+CSMP do not got OK from the phone, continuing\n", CELLIAX_P_LOG);
</del><ins>+ WARNINGA("AT+CSMP do not got OK from the phone, continuing\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> } else {
</span><span class="cx"> //res = celliax_serial_write_AT_ack(p, "AT+CSMP=17,167,0,20"); //"flash", class 0 sms 16 bit unicode
</span><span class="cx"> res = celliax_serial_write_AT_ack(p, "AT+CSMP=17,167,0,8"); //unicode, 16 bit message
</span><span class="cx"> if (res) {
</span><del>- WARNINGA("AT+CSMP do not got OK from the phone, continuing\n", CELLIAX_P_LOG);
</del><ins>+ WARNINGA("AT+CSMP do not got OK from the phone, continuing\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /* is the unsolicited reporting of mobile equipment event supported? */
</span><span class="cx"> res = celliax_serial_write_AT_ack(p, "AT+CMER=?");
</span><span class="cx"> if (res) {
</span><del>- DEBUGA_AT("AT+CMER=? failed, continue\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_SKYPE("AT+CMER=? failed, continue\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> /* request unsolicited reporting of mobile equipment indicators' events, to be screened by categories reported by +CIND=? */
</span><span class="cx"> res = celliax_serial_write_AT_ack(p, "AT+CMER=3,0,0,1");
</span><span class="cx"> if (res) {
</span><del>- DEBUGA_AT("AT+CMER=? failed, continue\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_SKYPE("AT+CMER=? failed, continue\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /* is the solicited reporting of mobile equipment indications supported? */
</span><span class="cx">
</span><span class="cx"> res = celliax_serial_write_AT_ack(p, "AT+CIND=?");
</span><span class="cx"> if (res) {
</span><del>- DEBUGA_AT("AT+CIND=? failed, continue\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_SKYPE("AT+CIND=? failed, continue\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /* is the unsolicited reporting of call monitoring supported? sony-ericsson specific */
</span><span class="cx"> res = celliax_serial_write_AT_ack(p, "AT*ECAM=?");
</span><span class="cx"> if (res) {
</span><del>- DEBUGA_AT("AT*ECAM=? failed, continue\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_SKYPE("AT*ECAM=? failed, continue\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> /* enable the unsolicited reporting of call monitoring. sony-ericsson specific */
</span><span class="cx"> res = celliax_serial_write_AT_ack(p, "AT*ECAM=1");
</span><span class="cx"> if (res) {
</span><del>- DEBUGA_AT("AT*ECAM=1 failed, continue\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_SKYPE("AT*ECAM=1 failed, continue\n", SKYPIAX_P_LOG);
</ins><span class="cx"> p->at_has_ecam = 0;
</span><span class="cx"> } else {
</span><span class="cx"> p->at_has_ecam = 1;
</span><span class="lines">@@ -4426,7 +4915,7 @@
</span><span class="cx"> /* disable unsolicited signaling of call list */
</span><span class="cx"> res = celliax_serial_write_AT_ack(p, "AT+CLCC=0");
</span><span class="cx"> if (res) {
</span><del>- DEBUGA_AT("AT+CLCC=0 failed, continue\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_SKYPE("AT+CLCC=0 failed, continue\n", SKYPIAX_P_LOG);
</ins><span class="cx"> p->at_has_clcc = 0;
</span><span class="cx"> } else {
</span><span class="cx"> p->at_has_clcc = 1;
</span><span class="lines">@@ -4435,15 +4924,15 @@
</span><span class="cx"> /* give unsolicited caller id when incoming call */
</span><span class="cx"> res = celliax_serial_write_AT_ack(p, "AT+CLIP=1");
</span><span class="cx"> if (res) {
</span><del>- DEBUGA_AT("AT+CLIP failed, continue\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_SKYPE("AT+CLIP failed, continue\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> /* for motorola */
</span><span class="cx"> res = celliax_serial_write_AT_ack(p, "AT+MCST=1"); /* motorola call control codes
</span><span class="cx"> (to know when call is disconnected (they
</span><span class="cx"> don't give you "no carrier") */
</span><span class="cx"> if (res) {
</span><del>- DEBUGA_AT("AT+MCST=1 does not get OK from the phone. If it is NOT Motorola,"
- " no problem.\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_SKYPE("AT+MCST=1 does not get OK from the phone. If it is NOT Motorola,"
+ " no problem.\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> /* for motorola end */
</span><span class="cx">
</span><span class="lines">@@ -4453,7 +4942,7 @@
</span><span class="cx"> if (strlen(p->at_postinit_1)) {
</span><span class="cx"> res = celliax_serial_write_AT_expect(p, p->at_postinit_1, p->at_postinit_1_expect);
</span><span class="cx"> if (res) {
</span><del>- DEBUGA_AT("%s does not get %s from the phone. Continuing.\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("%s does not get %s from the phone. Continuing.\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->at_postinit_1, p->at_postinit_1_expect);
</span><span class="cx"> }
</span><span class="cx"> } else {
</span><span class="lines">@@ -4463,7 +4952,7 @@
</span><span class="cx"> if (strlen(p->at_postinit_2)) {
</span><span class="cx"> res = celliax_serial_write_AT_expect(p, p->at_postinit_2, p->at_postinit_2_expect);
</span><span class="cx"> if (res) {
</span><del>- DEBUGA_AT("%s does not get %s from the phone. Continuing.\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("%s does not get %s from the phone. Continuing.\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->at_postinit_2, p->at_postinit_2_expect);
</span><span class="cx"> }
</span><span class="cx"> } else {
</span><span class="lines">@@ -4473,7 +4962,7 @@
</span><span class="cx"> if (strlen(p->at_postinit_3)) {
</span><span class="cx"> res = celliax_serial_write_AT_expect(p, p->at_postinit_3, p->at_postinit_3_expect);
</span><span class="cx"> if (res) {
</span><del>- DEBUGA_AT("%s does not get %s from the phone. Continuing.\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("%s does not get %s from the phone. Continuing.\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->at_postinit_3, p->at_postinit_3_expect);
</span><span class="cx"> }
</span><span class="cx"> } else {
</span><span class="lines">@@ -4483,7 +4972,7 @@
</span><span class="cx"> if (strlen(p->at_postinit_4)) {
</span><span class="cx"> res = celliax_serial_write_AT_expect(p, p->at_postinit_4, p->at_postinit_4_expect);
</span><span class="cx"> if (res) {
</span><del>- DEBUGA_AT("%s does not get %s from the phone. Continuing.\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("%s does not get %s from the phone. Continuing.\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->at_postinit_4, p->at_postinit_4_expect);
</span><span class="cx"> }
</span><span class="cx"> } else {
</span><span class="lines">@@ -4493,7 +4982,7 @@
</span><span class="cx"> if (strlen(p->at_postinit_5)) {
</span><span class="cx"> res = celliax_serial_write_AT_expect(p, p->at_postinit_5, p->at_postinit_5_expect);
</span><span class="cx"> if (res) {
</span><del>- DEBUGA_AT("%s does not get %s from the phone. Continuing.\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("%s does not get %s from the phone. Continuing.\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->at_postinit_5, p->at_postinit_5_expect);
</span><span class="cx"> }
</span><span class="cx"> } else {
</span><span class="lines">@@ -4506,13 +4995,13 @@
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int celliax_serial_call_AT(struct celliax_pvt *p, char *dstr)
</del><ins>+int celliax_serial_call_AT(private_t * tech_pvt, char *dstr)
</ins><span class="cx"> {
</span><span class="cx"> int res;
</span><span class="cx"> char at_command[256];
</span><span class="cx">
</span><span class="cx"> if (option_debug)
</span><del>- DEBUGA_PBX("Dialing %s\n", CELLIAX_P_LOG, dstr);
</del><ins>+ DEBUGA_PBX("Dialing %s\n", SKYPIAX_P_LOG, dstr);
</ins><span class="cx"> memset(at_command, 0, sizeof(at_command));
</span><span class="cx"> p->phone_callflow = CALLFLOW_CALL_DIALING;
</span><span class="cx"> p->interface_state = AST_STATE_DIALING;
</span><span class="lines">@@ -4520,14 +5009,14 @@
</span><span class="cx"> size_t fixdstr = strspn(dstr, AST_DIGIT_ANYDIG);
</span><span class="cx"> if (fixdstr == 0) {
</span><span class="cx"> ERRORA("dial command failed because of invalid dial number. dial string was: %s\n",
</span><del>- CELLIAX_P_LOG, dstr);
</del><ins>+ SKYPIAX_P_LOG, dstr);
</ins><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="cx"> dstr[fixdstr] = '\0';
</span><span class="cx"> sprintf(at_command, "%s%s%s", p->at_dial_pre_number, dstr, p->at_dial_post_number);
</span><span class="cx"> res = celliax_serial_write_AT_expect(p, at_command, p->at_dial_expect);
</span><span class="cx"> if (res) {
</span><del>- ERRORA("dial command failed, dial string was: %s\n", CELLIAX_P_LOG, at_command);
</del><ins>+ ERRORA("dial command failed, dial string was: %s\n", SKYPIAX_P_LOG, at_command);
</ins><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="cx"> // jet - early audio
</span><span class="lines">@@ -4540,7 +5029,7 @@
</span><span class="cx">
</span><span class="cx"> int celliax_console_at(int fd, int argc, char *argv[])
</span><span class="cx"> {
</span><del>- struct celliax_pvt *p = celliax_console_find_desc(celliax_console_active);
</del><ins>+ private_t * tech_pvt = celliax_console_find_desc(celliax_console_active);
</ins><span class="cx"> char at_cmd[1024];
</span><span class="cx"> int i, a, c;
</span><span class="cx">
</span><span class="lines">@@ -4649,7 +5138,7 @@
</span><span class="cx"> return RESULT_SUCCESS; //never reached
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int ucs2_to_utf8(struct celliax_pvt *p, char *ucs2_in, char *utf8_out,
</del><ins>+int ucs2_to_utf8(private_t * tech_pvt, char *ucs2_in, char *utf8_out,
</ins><span class="cx"> size_t outbytesleft)
</span><span class="cx"> {
</span><span class="cx"> char converted[16000];
</span><span class="lines">@@ -4665,7 +5154,7 @@
</span><span class="cx">
</span><span class="cx"> memset(converted, '\0', sizeof(converted));
</span><span class="cx">
</span><del>- DEBUGA_AT("ucs2_in=%s\n", CELLIAX_P_LOG, ucs2_in);
</del><ins>+ DEBUGA_SKYPE("ucs2_in=%s\n", SKYPIAX_P_LOG, ucs2_in);
</ins><span class="cx"> /* cicopet */
</span><span class="cx"> for (c = 0; c < strlen(ucs2_in); c++) {
</span><span class="cx"> sprintf(stringa, "0x%c%c", ucs2_in[c], ucs2_in[c + 1]);
</span><span class="lines">@@ -4680,29 +5169,29 @@
</span><span class="cx">
</span><span class="cx"> iconv_format = iconv_open("UTF8", "UCS-2BE");
</span><span class="cx"> if (iconv_format == (iconv_t) - 1) {
</span><del>- ERRORA("error: %s\n", CELLIAX_P_LOG, strerror(errno));
</del><ins>+ ERRORA("error: %s\n", SKYPIAX_P_LOG, strerror(errno));
</ins><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> inbytesleft = i;
</span><span class="cx"> iconv_res = iconv(iconv_format, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
</span><span class="cx"> if (iconv_res == (size_t) - 1) {
</span><del>- DEBUGA_AT("ciao in=%s, inleft=%d, out=%s, outleft=%d, converted=%s, utf8_out=%s\n",
- CELLIAX_P_LOG, inbuf, inbytesleft, outbuf, outbytesleft, converted,
</del><ins>+ DEBUGA_SKYPE("ciao in=%s, inleft=%d, out=%s, outleft=%d, converted=%s, utf8_out=%s\n",
+ SKYPIAX_P_LOG, inbuf, inbytesleft, outbuf, outbytesleft, converted,
</ins><span class="cx"> utf8_out);
</span><del>- DEBUGA_AT("error: %s %d\n", CELLIAX_P_LOG, strerror(errno), errno);
</del><ins>+ DEBUGA_SKYPE("error: %s %d\n", SKYPIAX_P_LOG, strerror(errno), errno);
</ins><span class="cx"> return -1;
</span><span class="cx"> }
</span><del>- DEBUGA_AT
</del><ins>+ DEBUGA_SKYPE
</ins><span class="cx"> ("iconv_res=%d, in=%s, inleft=%d, out=%s, outleft=%d, converted=%s, utf8_out=%s\n",
</span><del>- CELLIAX_P_LOG, iconv_res, inbuf, inbytesleft, outbuf, outbytesleft, converted,
</del><ins>+ SKYPIAX_P_LOG, iconv_res, inbuf, inbytesleft, outbuf, outbytesleft, converted,
</ins><span class="cx"> utf8_out);
</span><span class="cx"> iconv_close(iconv_format);
</span><span class="cx">
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int utf_to_ucs2(struct celliax_pvt *p, char *utf_in, size_t inbytesleft, char *ucs2_out,
</del><ins>+int utf_to_ucs2(private_t * tech_pvt, char *utf_in, size_t inbytesleft, char *ucs2_out,
</ins><span class="cx"> size_t outbytesleft)
</span><span class="cx"> {
</span><span class="cx"> /* cicopet */
</span><span class="lines">@@ -4722,21 +5211,21 @@
</span><span class="cx">
</span><span class="cx"> iconv_format = iconv_open("UCS-2BE", "UTF8");
</span><span class="cx"> if (iconv_format == (iconv_t) - 1) {
</span><del>- ERRORA("error: %s\n", CELLIAX_P_LOG, strerror(errno));
</del><ins>+ ERRORA("error: %s\n", SKYPIAX_P_LOG, strerror(errno));
</ins><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="cx"> outbytesleft = 16000;
</span><span class="cx">
</span><del>- DEBUGA_AT("in=%s, inleft=%d, out=%s, outleft=%d, utf_in=%s, converted=%s\n",
- CELLIAX_P_LOG, inbuf, inbytesleft, outbuf, outbytesleft, utf_in, converted);
</del><ins>+ DEBUGA_SKYPE("in=%s, inleft=%d, out=%s, outleft=%d, utf_in=%s, converted=%s\n",
+ SKYPIAX_P_LOG, inbuf, inbytesleft, outbuf, outbytesleft, utf_in, converted);
</ins><span class="cx"> iconv_res = iconv(iconv_format, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
</span><span class="cx"> if (iconv_res == (size_t) - 1) {
</span><del>- ERRORA("error: %s %d\n", CELLIAX_P_LOG, strerror(errno), errno);
</del><ins>+ ERRORA("error: %s %d\n", SKYPIAX_P_LOG, strerror(errno), errno);
</ins><span class="cx"> return -1;
</span><span class="cx"> }
</span><del>- DEBUGA_AT
</del><ins>+ DEBUGA_SKYPE
</ins><span class="cx"> ("iconv_res=%d, in=%s, inleft=%d, out=%s, outleft=%d, utf_in=%s, converted=%s\n",
</span><del>- CELLIAX_P_LOG, iconv_res, inbuf, inbytesleft, outbuf, outbytesleft, utf_in,
</del><ins>+ SKYPIAX_P_LOG, iconv_res, inbuf, inbytesleft, outbuf, outbytesleft, utf_in,
</ins><span class="cx"> converted);
</span><span class="cx"> iconv_close(iconv_format);
</span><span class="cx">
</span><span class="lines">@@ -4744,11 +5233,11 @@
</span><span class="cx"> memset(stringa, '\0', sizeof(stringa));
</span><span class="cx"> memset(stringa2, '\0', sizeof(stringa2));
</span><span class="cx"> sprintf(stringa, "%02X", converted[i]);
</span><del>- DEBUGA_AT("character is |%02X|\n", CELLIAX_P_LOG, converted[i]);
</del><ins>+ DEBUGA_SKYPE("character is |%02X|\n", SKYPIAX_P_LOG, converted[i]);
</ins><span class="cx"> stringa2[0] = stringa[strlen(stringa) - 2];
</span><span class="cx"> stringa2[1] = stringa[strlen(stringa) - 1];
</span><span class="cx"> strncat(ucs2_out, stringa2, ((outbytesleft - strlen(ucs2_out)) - 1)); //add the received line to the buffer
</span><del>- DEBUGA_AT("stringa=%s, stringa2=%s, ucs2_out=%s\n", CELLIAX_P_LOG, stringa, stringa2,
</del><ins>+ DEBUGA_SKYPE("stringa=%s, stringa2=%s, ucs2_out=%s\n", SKYPIAX_P_LOG, stringa, stringa2,
</ins><span class="cx"> ucs2_out);
</span><span class="cx"> }
</span><span class="cx"> return 0;
</span><span class="lines">@@ -4758,7 +5247,7 @@
</span><span class="cx"> {
</span><span class="cx"> char *idest = data;
</span><span class="cx"> char rdest[256];
</span><del>- struct celliax_pvt *p = NULL;
</del><ins>+ private_t * tech_pvt = NULL;
</ins><span class="cx"> char *device;
</span><span class="cx"> char *dest;
</span><span class="cx"> char *text;
</span><span class="lines">@@ -4814,8 +5303,8 @@
</span><span class="cx"> if (strncmp(device, p->name, length) == 0) {
</span><span class="cx"> /* this is the requested interface! */
</span><span class="cx"> if (option_debug)
</span><del>- DEBUGA_AT("FOUND! interfacename:%s, destinationnumber:%s, text:%s, p->name=%s\n",
- CELLIAX_P_LOG, device, dest, text, p->name);
</del><ins>+ DEBUGA_SKYPE("FOUND! interfacename:%s, destinationnumber:%s, text:%s, p->name=%s\n",
+ SKYPIAX_P_LOG, device, dest, text, p->name);
</ins><span class="cx"> found = 1;
</span><span class="cx"> break;
</span><span class="cx">
</span><span class="lines">@@ -4833,7 +5322,7 @@
</span><span class="cx">
</span><span class="cx"> if (p->controldevprotocol != PROTOCOL_AT) {
</span><span class="cx"> ERRORA("CelliaxSendsms supports only AT command cellphones at the moment :-( !\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx"> return RESULT_FAILURE;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -4854,7 +5343,7 @@
</span><span class="cx"> if (err) {
</span><span class="cx"> ERRORA
</span><span class="cx"> ("AT+CSCS=\"UCS2\" (set TE messages to ucs2) do not got OK from the phone\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> memset(dest2, '\0', sizeof(dest2));
</span><span class="lines">@@ -4865,26 +5354,26 @@
</span><span class="cx"> //TODO would be better to lock controldev here
</span><span class="cx"> err = celliax_serial_write_AT_noack(p, smscommand);
</span><span class="cx"> if (err) {
</span><del>- ERRORA("Error sending SMS\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("Error sending SMS\n", SKYPIAX_P_LOG);
</ins><span class="cx"> failed = 1;
</span><span class="cx"> goto uscita;
</span><span class="cx"> }
</span><span class="cx"> err = celliax_serial_AT_expect(p, "> ", 0, 1); // wait 1.5s for the prompt, no crlf
</span><span class="cx"> #if 1
</span><span class="cx"> if (err) {
</span><del>- DEBUGA_AT
</del><ins>+ DEBUGA_SKYPE
</ins><span class="cx"> ("Error or timeout getting prompt '> ' for sending sms directly to the remote party. BTW, seems that we cannot do that with Motorola c350, so we'll write to cellphone memory, then send from memory\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> err = celliax_serial_write_AT_ack(p, "ATE1"); //motorola (at least c350) do not echo the '>' prompt when in ATE0... go figure!!!!
</span><span class="cx"> if (err) {
</span><del>- ERRORA("Error activating echo from modem\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("Error activating echo from modem\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> p->at_cmgw[0] = '\0';
</span><span class="cx"> sprintf(smscommand, "AT+CMGW=\"%s\"", dest); //TODO: support phones that only accept pdu mode
</span><span class="cx"> err = celliax_serial_write_AT_noack(p, smscommand);
</span><span class="cx"> if (err) {
</span><del>- ERRORA("Error writing SMS destination to the cellphone memory\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("Error writing SMS destination to the cellphone memory\n", SKYPIAX_P_LOG);
</ins><span class="cx"> failed = 1;
</span><span class="cx"> goto uscita;
</span><span class="cx"> }
</span><span class="lines">@@ -4892,7 +5381,7 @@
</span><span class="cx"> if (err) {
</span><span class="cx"> ERRORA
</span><span class="cx"> ("Error or timeout getting prompt '> ' for writing sms text in cellphone memory\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx"> failed = 1;
</span><span class="cx"> goto uscita;
</span><span class="cx"> }
</span><span class="lines">@@ -4908,13 +5397,13 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> smscommand[strlen(smscommand)] = 0x1A;
</span><del>- DEBUGA_AT("smscommand len is: %d, text is:|||%s|||\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_SKYPE("smscommand len is: %d, text is:|||%s|||\n", SKYPIAX_P_LOG,
</ins><span class="cx"> strlen(smscommand), smscommand);
</span><span class="cx">
</span><span class="cx"> err = celliax_serial_write_AT_ack_nocr_longtime(p, smscommand);
</span><span class="cx"> //TODO would be better to unlock controldev here
</span><span class="cx"> if (err) {
</span><del>- ERRORA("Error writing SMS text to the cellphone memory\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("Error writing SMS text to the cellphone memory\n", SKYPIAX_P_LOG);
</ins><span class="cx"> //return RESULT_FAILURE;
</span><span class="cx"> failed = 1;
</span><span class="cx"> goto uscita;
</span><span class="lines">@@ -4923,7 +5412,7 @@
</span><span class="cx"> sprintf(smscommand, "AT+CMSS=%s", p->at_cmgw);
</span><span class="cx"> err = celliax_serial_write_AT_expect_longtime(p, smscommand, "OK");
</span><span class="cx"> if (err) {
</span><del>- ERRORA("Error sending SMS from the cellphone memory\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("Error sending SMS from the cellphone memory\n", SKYPIAX_P_LOG);
</ins><span class="cx"> //return RESULT_FAILURE;
</span><span class="cx"> failed = 1;
</span><span class="cx"> goto uscita;
</span><span class="lines">@@ -4931,7 +5420,7 @@
</span><span class="cx">
</span><span class="cx"> err = celliax_serial_write_AT_ack(p, "ATE0"); //motorola (at least c350) do not echo the '>' prompt when in ATE0... go figure!!!!
</span><span class="cx"> if (err) {
</span><del>- ERRORA("Error de-activating echo from modem\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("Error de-activating echo from modem\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> uscita:
</span><span class="lines">@@ -4943,14 +5432,14 @@
</span><span class="cx"> sprintf(smscommand, "AT+CMGR=%s", p->at_cmgw);
</span><span class="cx"> err = celliax_serial_write_AT_ack(p, smscommand);
</span><span class="cx"> if (err) {
</span><del>- ERRORA("Error reading SMS back from the cellphone memory\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("Error reading SMS back from the cellphone memory\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /* let's delete from cellphone memory what we've sent */
</span><span class="cx"> sprintf(smscommand, "AT+CMGD=%s", p->at_cmgw);
</span><span class="cx"> err = celliax_serial_write_AT_ack(p, smscommand);
</span><span class="cx"> if (err) {
</span><del>- ERRORA("Error deleting SMS from the cellphone memory\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("Error deleting SMS from the cellphone memory\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> p->at_cmgw[0] = '\0';
</span><span class="lines">@@ -4979,7 +5468,7 @@
</span><span class="cx"> {
</span><span class="cx"> //TODO: all the realtime stuff has to be re-made
</span><span class="cx"> struct ast_config *cfg;
</span><del>- struct celliax_pvt *p = NULL;
</del><ins>+ private_t * tech_pvt = NULL;
</ins><span class="cx"> #ifdef ASTERISK_VERSION_1_6_0
</span><span class="cx"> struct ast_flags config_flags = { 0 };
</span><span class="cx"> #endif /* ASTERISK_VERSION_1_6_0 */
</span><span class="lines">@@ -4995,7 +5484,7 @@
</span><span class="cx"> /* Loading config failed. */
</span><span class="cx"> WARNINGA
</span><span class="cx"> ("Loading directoriax.conf config file failed. It's not necessary, continuing.\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx"> return NULL;
</span><span class="cx"> }
</span><span class="cx"> return cfg;
</span><span class="lines">@@ -5076,7 +5565,7 @@
</span><span class="cx">
</span><span class="cx"> struct ast_variable *v;
</span><span class="cx"> char *start, *pos, *stringp, *space, *options = NULL, *conv = NULL;
</span><del>- struct celliax_pvt *p = celliax_console_find_desc(celliax_console_active);
</del><ins>+ private_t * tech_pvt = celliax_console_find_desc(celliax_console_active);
</ins><span class="cx"> char *context = "default";
</span><span class="cx"> char *s;
</span><span class="cx"> char *var, *value;
</span><span class="lines">@@ -5134,18 +5623,18 @@
</span><span class="cx"> #endif /* CELLIAX_LIBCSV */
</span><span class="cx">
</span><span class="cx"> if (option_debug)
</span><del>- NOTICA("celliax_cellphonenumber is: %s\n", CELLIAX_P_LOG, argv[2]);
</del><ins>+ NOTICA("celliax_cellphonenumber is: %s\n", SKYPIAX_P_LOG, argv[2]);
</ins><span class="cx">
</span><span class="cx"> #ifdef CELLIAX_LIBCSV
</span><span class="cx"> if (tocsv) {
</span><span class="cx"> if (option_debug)
</span><del>- NOTICA("filename is: %s\n", CELLIAX_P_LOG, argv[3]);
</del><ins>+ NOTICA("filename is: %s\n", SKYPIAX_P_LOG, argv[3]);
</ins><span class="cx"> //ast_cli(fd, "\n\nnot yet implemented :P \n");
</span><span class="cx"> //return RESULT_SUCCESS;
</span><span class="cx"> }
</span><span class="cx"> if (tovcf) {
</span><span class="cx"> if (option_debug)
</span><del>- NOTICA("filename is: %s\n", CELLIAX_P_LOG, argv[3]);
</del><ins>+ NOTICA("filename is: %s\n", SKYPIAX_P_LOG, argv[3]);
</ins><span class="cx"> ast_cli(fd, "\n\nnot yet implemented :P \n");
</span><span class="cx"> return RESULT_SUCCESS;
</span><span class="cx"> }
</span><span class="lines">@@ -5160,18 +5649,18 @@
</span><span class="cx"> /* which phonebook to use, use the SIM */
</span><span class="cx"> res = celliax_serial_write_AT_ack(p, "AT+CPBS=SM");
</span><span class="cx"> if (res) {
</span><del>- WARNINGA("AT+CPBS=SM failed, continue\n", CELLIAX_P_LOG);
</del><ins>+ WARNINGA("AT+CPBS=SM failed, continue\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> /* which phonebook to use, trying to use phone, not SIM */
</span><span class="cx"> res = celliax_serial_write_AT_ack(p, "AT+CPBS=ME");
</span><span class="cx"> if (res) {
</span><del>- WARNINGA("AT+CPBS=ME failed, continue\n", CELLIAX_P_LOG);
</del><ins>+ WARNINGA("AT+CPBS=ME failed, continue\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> /* retrieve the fields lenght in the selected phonebook */
</span><span class="cx"> p->phonebook_querying = 1;
</span><span class="cx"> res = celliax_serial_write_AT_ack(p, "AT+CPBR=?");
</span><span class="cx"> if (res) {
</span><del>- WARNINGA("AT+CPBR=? failed, continue\n", CELLIAX_P_LOG);
</del><ins>+ WARNINGA("AT+CPBR=? failed, continue\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> p->phonebook_querying = 0;
</span><span class="cx">
</span><span class="lines">@@ -5199,8 +5688,8 @@
</span><span class="cx"> memset(entry_text, 0, sizeof(entry_text));
</span><span class="cx"> memset(final_entry_text, 0, sizeof(final_entry_text));
</span><span class="cx">
</span><del>- DEBUGA_AT("v->name=%s\n", CELLIAX_P_LOG, v->name);
- DEBUGA_AT("v->value=%s\n", CELLIAX_P_LOG, v->value);
</del><ins>+ DEBUGA_SKYPE("v->name=%s\n", SKYPIAX_P_LOG, v->name);
+ DEBUGA_SKYPE("v->value=%s\n", SKYPIAX_P_LOG, v->value);
</ins><span class="cx">
</span><span class="cx"> stringp = start;
</span><span class="cx"> strsep(&stringp, ",");
</span><span class="lines">@@ -5213,19 +5702,19 @@
</span><span class="cx"> }
</span><span class="cx"> if (pos) {
</span><span class="cx"> conv = celliax_dir_convert(pos);
</span><del>- DEBUGA_AT("<pos=>%s<conv=>%s<\n", CELLIAX_P_LOG, pos, conv);
</del><ins>+ DEBUGA_SKYPE("<pos=>%s<conv=>%s<\n", SKYPIAX_P_LOG, pos, conv);
</ins><span class="cx">
</span><span class="cx"> options = strdup(v->value);
</span><span class="cx"> strsep(&options, ",");
</span><span class="cx"> strsep(&options, ",");
</span><span class="cx"> strsep(&options, ",");
</span><span class="cx"> strsep(&options, ",");
</span><del>- DEBUGA_AT("options=%s\n", CELLIAX_P_LOG, options);
</del><ins>+ DEBUGA_SKYPE("options=%s\n", SKYPIAX_P_LOG, options);
</ins><span class="cx">
</span><span class="cx"> while ((s = strsep(&options, "|"))) {
</span><span class="cx"> value = s;
</span><span class="cx"> if ((var = strsep(&value, "=")) && value) {
</span><del>- DEBUGA_AT("var=%s value=%s\n", CELLIAX_P_LOG, var, value);
</del><ins>+ DEBUGA_SKYPE("var=%s value=%s\n", SKYPIAX_P_LOG, var, value);
</ins><span class="cx"> if (!strcmp(var, "phonebook_direct_calling_ext"))
</span><span class="cx"> strncpy(phonebook_direct_calling_ext, value, 6);
</span><span class="cx"> }
</span><span class="lines">@@ -5238,7 +5727,7 @@
</span><span class="cx"> if (res == (p->phonebook_number_lenght + 1)
</span><span class="cx"> || res > (p->phonebook_number_lenght + 1)) {
</span><span class="cx"> ERRORA("entry_number truncated, was: '%s%s%d%s%s', now is: '%s'\n",
</span><del>- CELLIAX_P_LOG, argv[2], "p", p->celliax_dir_prefix, "p",
</del><ins>+ SKYPIAX_P_LOG, argv[2], "p", p->celliax_dir_prefix, "p",
</ins><span class="cx"> phonebook_direct_calling_ext, entry_number);
</span><span class="cx"> //FIXME: abort ???
</span><span class="cx">
</span><span class="lines">@@ -5253,10 +5742,10 @@
</span><span class="cx"> || res > (sizeof(write_entry_command) - 1)) {
</span><span class="cx"> WARNINGA
</span><span class="cx"> ("write_entry_command truncated, was supposed: 'AT+CPBW=,\"%s\",,\"%s\"', now is: '%s'\n",
</span><del>- CELLIAX_P_LOG, entry_number, final_entry_text, write_entry_command);
</del><ins>+ SKYPIAX_P_LOG, entry_number, final_entry_text, write_entry_command);
</ins><span class="cx"> }
</span><span class="cx"> //if (option_debug)
</span><del>- NOTICA("%s\n", CELLIAX_P_LOG, write_entry_command);
</del><ins>+ NOTICA("%s\n", SKYPIAX_P_LOG, write_entry_command);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> if (conv)
</span><span class="lines">@@ -5296,8 +5785,8 @@
</span><span class="cx"> memset(entry_text, 0, sizeof(entry_text));
</span><span class="cx"> memset(final_entry_text, 0, sizeof(final_entry_text));
</span><span class="cx">
</span><del>- DEBUGA_AT("v->name=%s\n", CELLIAX_P_LOG, v->name);
- DEBUGA_AT("v->value=%s\n", CELLIAX_P_LOG, v->value);
</del><ins>+ DEBUGA_SKYPE("v->name=%s\n", SKYPIAX_P_LOG, v->name);
+ DEBUGA_SKYPE("v->value=%s\n", SKYPIAX_P_LOG, v->value);
</ins><span class="cx">
</span><span class="cx"> stringp = start;
</span><span class="cx"> strsep(&stringp, ",");
</span><span class="lines">@@ -5310,19 +5799,19 @@
</span><span class="cx"> }
</span><span class="cx"> if (pos) {
</span><span class="cx"> conv = celliax_dir_convert(pos);
</span><del>- DEBUGA_AT("<pos=>%s<conv=>%s<\n", CELLIAX_P_LOG, pos, conv);
</del><ins>+ DEBUGA_SKYPE("<pos=>%s<conv=>%s<\n", SKYPIAX_P_LOG, pos, conv);
</ins><span class="cx">
</span><span class="cx"> options = strdup(v->value);
</span><span class="cx"> strsep(&options, ",");
</span><span class="cx"> strsep(&options, ",");
</span><span class="cx"> strsep(&options, ",");
</span><span class="cx"> strsep(&options, ",");
</span><del>- DEBUGA_AT("options=%s\n", CELLIAX_P_LOG, options);
</del><ins>+ DEBUGA_SKYPE("options=%s\n", SKYPIAX_P_LOG, options);
</ins><span class="cx">
</span><span class="cx"> while ((s = strsep(&options, "|"))) {
</span><span class="cx"> value = s;
</span><span class="cx"> if ((var = strsep(&value, "=")) && value) {
</span><del>- DEBUGA_AT("var=%s value=%s\n", CELLIAX_P_LOG, var, value);
</del><ins>+ DEBUGA_SKYPE("var=%s value=%s\n", SKYPIAX_P_LOG, var, value);
</ins><span class="cx"> if (!strcmp(var, "phonebook_direct_calling_ext"))
</span><span class="cx"> strncpy(phonebook_direct_calling_ext, value, 6);
</span><span class="cx"> }
</span><span class="lines">@@ -5335,7 +5824,7 @@
</span><span class="cx"> if (res == (sizeof(entry_number) - 1)
</span><span class="cx"> || res > (sizeof(entry_number) - 1)) {
</span><span class="cx"> ERRORA("entry_number truncated, was: '%s%s%d%s%s', now is: '%s'\n",
</span><del>- CELLIAX_P_LOG, argv[2], "p", p->celliax_dir_prefix, "p",
</del><ins>+ SKYPIAX_P_LOG, argv[2], "p", p->celliax_dir_prefix, "p",
</ins><span class="cx"> phonebook_direct_calling_ext, entry_number);
</span><span class="cx"> //FIXME: abort ???
</span><span class="cx">
</span><span class="lines">@@ -5353,19 +5842,19 @@
</span><span class="cx"> write_entry_command[a] = ',';
</span><span class="cx"> a++;
</span><span class="cx"> }
</span><del>- //NOTICA("i=%d a=%d\n", CELLIAX_P_LOG, i, a);
</del><ins>+ //NOTICA("i=%d a=%d\n", SKYPIAX_P_LOG, i, a);
</ins><span class="cx">
</span><span class="cx"> write_entry_command[a] = '"';
</span><span class="cx"> a++;
</span><del>- //NOTICA("i=%d a=%d\n", CELLIAX_P_LOG, i, a);
</del><ins>+ //NOTICA("i=%d a=%d\n", SKYPIAX_P_LOG, i, a);
</ins><span class="cx"> for (i = 0; i < strlen(final_entry_text); i++) {
</span><span class="cx"> write_entry_command[a] = final_entry_text[i];
</span><span class="cx"> a++;
</span><span class="cx"> }
</span><del>- //NOTICA("i=%d a=%d\n", CELLIAX_P_LOG, i, a);
</del><ins>+ //NOTICA("i=%d a=%d\n", SKYPIAX_P_LOG, i, a);
</ins><span class="cx"> write_entry_command[a] = '"';
</span><span class="cx"> a++;
</span><del>- //NOTICA("i=%d a=%d\n", CELLIAX_P_LOG, i, a);
</del><ins>+ //NOTICA("i=%d a=%d\n", SKYPIAX_P_LOG, i, a);
</ins><span class="cx"> for (i = 0; i < (p->csv_business_phone_pos - p->csv_complete_name_pos); i++) {
</span><span class="cx"> if (p->csv_separator_is_semicolon)
</span><span class="cx"> write_entry_command[a] = ';';
</span><span class="lines">@@ -5374,22 +5863,22 @@
</span><span class="cx"> a++;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- //NOTICA("i=%d a=%d\n", CELLIAX_P_LOG, i, a);
</del><ins>+ //NOTICA("i=%d a=%d\n", SKYPIAX_P_LOG, i, a);
</ins><span class="cx">
</span><span class="cx"> write_entry_command[a] = '"';
</span><span class="cx"> a++;
</span><del>- //NOTICA("i=%d a=%d\n", CELLIAX_P_LOG, i, a);
</del><ins>+ //NOTICA("i=%d a=%d\n", SKYPIAX_P_LOG, i, a);
</ins><span class="cx"> for (i = 0; i < strlen(entry_number); i++) {
</span><span class="cx"> write_entry_command[a] = entry_number[i];
</span><span class="cx"> a++;
</span><span class="cx"> }
</span><del>- //NOTICA("i=%d a=%d\n", CELLIAX_P_LOG, i, a);
</del><ins>+ //NOTICA("i=%d a=%d\n", SKYPIAX_P_LOG, i, a);
</ins><span class="cx"> write_entry_command[a] = '"';
</span><span class="cx"> a++;
</span><del>- //NOTICA("i=%d a=%d\n", CELLIAX_P_LOG, i, a);
</del><ins>+ //NOTICA("i=%d a=%d\n", SKYPIAX_P_LOG, i, a);
</ins><span class="cx">
</span><span class="cx"> if (option_debug)
</span><del>- NOTICA("%s\n", CELLIAX_P_LOG, write_entry_command);
</del><ins>+ NOTICA("%s\n", SKYPIAX_P_LOG, write_entry_command);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> if (conv)
</span><span class="lines">@@ -5415,7 +5904,7 @@
</span><span class="cx">
</span><span class="cx"> void celliax_cb1(char *s, size_t len, void *data)
</span><span class="cx"> {
</span><del>- struct celliax_pvt *p = data;
</del><ins>+ private_t * tech_pvt = data;
</ins><span class="cx"> char field_content[256];
</span><span class="cx">
</span><span class="cx"> p->csv_fields++;
</span><span class="lines">@@ -5441,7 +5930,7 @@
</span><span class="cx">
</span><span class="cx"> void celliax_cb2(char c, void *data)
</span><span class="cx"> {
</span><del>- struct celliax_pvt *p = data;
</del><ins>+ private_t * tech_pvt = data;
</ins><span class="cx">
</span><span class="cx"> p->csv_rows++;
</span><span class="cx"> p->csv_fields = 0;
</span><span class="lines">@@ -5453,7 +5942,7 @@
</span><span class="cx"> if (option_debug)
</span><span class="cx"> NOTICA
</span><span class="cx"> ("ROW %d ENDED, complete_name=%s, email=%s, home_phone=%s, mobile_phone=%s, business_phone=%s\n",
</span><del>- CELLIAX_P_LOG, p->csv_rows,
</del><ins>+ SKYPIAX_P_LOG, p->csv_rows,
</ins><span class="cx"> strlen(p->csv_complete_name) ? p->csv_complete_name : "N/A",
</span><span class="cx"> strlen(p->csv_email) ? p->csv_email : "N/A",
</span><span class="cx"> strlen(p->csv_home_phone) ? p->csv_home_phone : "N/A",
</span><span class="lines">@@ -5519,7 +6008,7 @@
</span><span class="cx"> int celliax_console_celliax_dir_import(int fd, int argc, char *argv[])
</span><span class="cx"> {
</span><span class="cx"> int res;
</span><del>- struct celliax_pvt *p = celliax_console_find_desc(celliax_console_active);
</del><ins>+ private_t * tech_pvt = celliax_console_find_desc(celliax_console_active);
</ins><span class="cx"> char list_command[64];
</span><span class="cx"> char fn[256];
</span><span class="cx"> char date[256] = "";
</span><span class="lines">@@ -5591,7 +6080,7 @@
</span><span class="cx"> #ifdef CELLIAX_LIBCSV
</span><span class="cx"> if (fromvcf) {
</span><span class="cx"> if (option_debug)
</span><del>- NOTICA("filename is: %s\n", CELLIAX_P_LOG, argv[3]);
</del><ins>+ NOTICA("filename is: %s\n", SKYPIAX_P_LOG, argv[3]);
</ins><span class="cx"> ast_cli(fd, "\n\nnot yet implemented :P \n");
</span><span class="cx"> return RESULT_SUCCESS;
</span><span class="cx"> }
</span><span class="lines">@@ -5605,7 +6094,7 @@
</span><span class="cx"> snprintf(fn, sizeof(fn), "%s/%s", ast_config_AST_CONFIG_DIR, configfile);
</span><span class="cx"> }
</span><span class="cx"> if (option_debug)
</span><del>- NOTICA("Opening '%s'\n", CELLIAX_P_LOG, fn);
</del><ins>+ NOTICA("Opening '%s'\n", SKYPIAX_P_LOG, fn);
</ins><span class="cx"> time(&t);
</span><span class="cx"> ast_copy_string(date, ctime(&t), sizeof(date));
</span><span class="cx">
</span><span class="lines">@@ -5617,14 +6106,14 @@
</span><span class="cx"> if (p->phonebook_writing_fp) {
</span><span class="cx"> if (add_to_celliax_dir_conf) {
</span><span class="cx"> if (option_debug)
</span><del>- NOTICA("Opened '%s' for appending \n", CELLIAX_P_LOG, fn);
</del><ins>+ NOTICA("Opened '%s' for appending \n", SKYPIAX_P_LOG, fn);
</ins><span class="cx"> fprintf(p->phonebook_writing_fp, ";!\n");
</span><span class="cx"> fprintf(p->phonebook_writing_fp, ";! Update Date: %s", date);
</span><span class="cx"> fprintf(p->phonebook_writing_fp, ";! Updated by: %s, %d\n", __FILE__, __LINE__);
</span><span class="cx"> fprintf(p->phonebook_writing_fp, ";!\n");
</span><span class="cx"> } else {
</span><span class="cx"> if (option_debug)
</span><del>- NOTICA("Opened '%s' for writing \n", CELLIAX_P_LOG, fn);
</del><ins>+ NOTICA("Opened '%s' for writing \n", SKYPIAX_P_LOG, fn);
</ins><span class="cx"> fprintf(p->phonebook_writing_fp, ";!\n");
</span><span class="cx"> fprintf(p->phonebook_writing_fp, ";! Automatically generated configuration file\n");
</span><span class="cx"> fprintf(p->phonebook_writing_fp, ";! Filename: %s (%s)\n", configfile, fn);
</span><span class="lines">@@ -5639,7 +6128,7 @@
</span><span class="cx"> //FIXME: if add_to_celliax_dir_conf parse the "old" config file, so to have the correct next entry id-exten
</span><span class="cx"> if (fromcsv) {
</span><span class="cx"> if (option_debug)
</span><del>- NOTICA("filename is: %s\n", CELLIAX_P_LOG, argv[3]);
</del><ins>+ NOTICA("filename is: %s\n", SKYPIAX_P_LOG, argv[3]);
</ins><span class="cx">
</span><span class="cx"> /************************/
</span><span class="cx"> FILE *fp;
</span><span class="lines">@@ -5653,12 +6142,12 @@
</span><span class="cx">
</span><span class="cx"> if (p->csv_separator_is_semicolon) {
</span><span class="cx"> if (csv_init(&csvp, options | CSV_USE_SEMICOLON_SEPARATOR) != 0) {
</span><del>- ERRORA("Failed to initialize csv parser\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("Failed to initialize csv parser\n", SKYPIAX_P_LOG);
</ins><span class="cx"> return RESULT_SUCCESS;
</span><span class="cx"> }
</span><span class="cx"> } else {
</span><span class="cx"> if (csv_init(&csvp, options) != 0) {
</span><del>- ERRORA("Failed to initialize csv parser\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("Failed to initialize csv parser\n", SKYPIAX_P_LOG);
</ins><span class="cx"> return RESULT_SUCCESS;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -5666,12 +6155,12 @@
</span><span class="cx">
</span><span class="cx"> fp = fopen(argv[3], "rb");
</span><span class="cx"> if (!fp) {
</span><del>- ERRORA("Failed to open %s: %s\n", CELLIAX_P_LOG, argv[3], strerror(errno));
</del><ins>+ ERRORA("Failed to open %s: %s\n", SKYPIAX_P_LOG, argv[3], strerror(errno));
</ins><span class="cx"> return RESULT_SUCCESS;
</span><span class="cx"> }
</span><span class="cx"> while ((bytes_read = fread(buf, 1, 1024, fp)) > 0) {
</span><span class="cx"> if (csv_parse(csvp, buf, bytes_read, celliax_cb1, celliax_cb2, p) != bytes_read) {
</span><del>- ERRORA("Error while parsing file: %s\n", CELLIAX_P_LOG,
</del><ins>+ ERRORA("Error while parsing file: %s\n", SKYPIAX_P_LOG,
</ins><span class="cx"> csv_strerror(csv_error(csvp)));
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -5679,14 +6168,14 @@
</span><span class="cx"> csv_fini(csvp, celliax_cb1, celliax_cb2, p);
</span><span class="cx">
</span><span class="cx"> if (ferror(fp)) {
</span><del>- ERRORA("Error while reading file %s\n", CELLIAX_P_LOG, argv[3]);
</del><ins>+ ERRORA("Error while reading file %s\n", SKYPIAX_P_LOG, argv[3]);
</ins><span class="cx"> fclose(fp);
</span><span class="cx"> return RESULT_SUCCESS;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> fclose(fp);
</span><span class="cx"> if (option_debug)
</span><del>- NOTICA("%s: %d fields, %d rows\n", CELLIAX_P_LOG, argv[3], p->csv_fields,
</del><ins>+ NOTICA("%s: %d fields, %d rows\n", SKYPIAX_P_LOG, argv[3], p->csv_fields,
</ins><span class="cx"> p->csv_rows);
</span><span class="cx">
</span><span class="cx"> csv_free(csvp);
</span><span class="lines">@@ -5706,30 +6195,30 @@
</span><span class="cx"> /* which phonebook to use, use the SIM */
</span><span class="cx"> res = celliax_serial_write_AT_ack(p, "AT+CPBS=SM");
</span><span class="cx"> if (res) {
</span><del>- WARNINGA("AT+CPBS=SM failed, continue\n", CELLIAX_P_LOG);
</del><ins>+ WARNINGA("AT+CPBS=SM failed, continue\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> /* which phonebook to use, trying to use combined phone+SIM */
</span><span class="cx"> res = celliax_serial_write_AT_ack(p, "AT+CPBS=MT");
</span><span class="cx"> if (res) {
</span><del>- WARNINGA("AT+CPBS=MT failed, continue\n", CELLIAX_P_LOG);
</del><ins>+ WARNINGA("AT+CPBS=MT failed, continue\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> /* How many entries in phonebook */
</span><span class="cx"> p->phonebook_querying = 1;
</span><span class="cx"> res = celliax_serial_write_AT_ack(p, "AT+CPBR=?");
</span><span class="cx"> if (res) {
</span><del>- WARNINGA("AT+CPBR=? failed, continue\n", CELLIAX_P_LOG);
</del><ins>+ WARNINGA("AT+CPBR=? failed, continue\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> p->phonebook_querying = 0;
</span><span class="cx"> /* list entries in phonebook, give the SIM the time to answer */
</span><span class="cx"> WARNINGA
</span><span class="cx"> ("About to querying the cellphone phonebook, if the SIM do not answer may stuck here for 20 seconds... Don't worry.\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx"> sprintf(list_command, "AT+CPBR=%d,%d", p->phonebook_first_entry,
</span><span class="cx"> p->phonebook_last_entry);
</span><span class="cx"> p->phonebook_listing = 1;
</span><span class="cx"> res = celliax_serial_write_AT_expect_longtime(p, list_command, "OK");
</span><span class="cx"> if (res) {
</span><del>- WARNINGA("AT+CPBR=%d,%d failed, continue\n", CELLIAX_P_LOG,
</del><ins>+ WARNINGA("AT+CPBR=%d,%d failed, continue\n", SKYPIAX_P_LOG,
</ins><span class="cx"> p->phonebook_first_entry, p->phonebook_last_entry);
</span><span class="cx"> }
</span><span class="cx"> p->phonebook_listing = 0;
</span><span class="lines">@@ -5743,7 +6232,7 @@
</span><span class="cx">
</span><span class="cx"> } else {
</span><span class="cx"> ast_cli(fd, "\n\nfailed to open the directoriax.conf configuration file: %s\n", fn);
</span><del>- ERRORA("failed to open the directoriax.conf configuration file: %s\n", CELLIAX_P_LOG,
</del><ins>+ ERRORA("failed to open the directoriax.conf configuration file: %s\n", SKYPIAX_P_LOG,
</ins><span class="cx"> fn);
</span><span class="cx"> return RESULT_FAILURE;
</span><span class="cx"> }
</span><span class="lines">@@ -5758,7 +6247,7 @@
</span><span class="cx">
</span><span class="cx"> #ifdef CELLIAX_FBUS2
</span><span class="cx">
</span><del>-int celliax_serial_getstatus_FBUS2(struct celliax_pvt *p)
</del><ins>+int celliax_serial_getstatus_FBUS2(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx"> unsigned char MsgBuffer[7];
</span><span class="cx"> int res;
</span><span class="lines">@@ -5776,12 +6265,12 @@
</span><span class="cx"> MsgBuffer[6] = celliax_serial_get_seqnum_FBUS2(p);
</span><span class="cx">
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_FBUS2("asking model, outseqnum %.2X \n", CELLIAX_P_LOG, MsgBuffer[6]);
</del><ins>+ DEBUGA_FBUS2("asking model, outseqnum %.2X \n", SKYPIAX_P_LOG, MsgBuffer[6]);
</ins><span class="cx"> celliax_serial_write_FBUS2(p, MsgBuffer, 7, FBUS2_TYPE_MODEL_ASK);
</span><span class="cx"> usleep(1000);
</span><span class="cx"> res = celliax_serial_read_FBUS2(p); //we don't have no monitor neither do_controldev_thread
</span><span class="cx"> if (res == -1) {
</span><del>- ERRORA("failed celliax_serial_read_FBUS2\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("failed celliax_serial_read_FBUS2\n", SKYPIAX_P_LOG);
</ins><span class="cx"> UNLOCKA(&p->controldev_lock);
</span><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="lines">@@ -5790,12 +6279,12 @@
</span><span class="cx"> res = celliax_serial_read_FBUS2(p);
</span><span class="cx"> how_many_reads++;
</span><span class="cx"> if (res == -1) {
</span><del>- ERRORA("failed celliax_serial_read_FBUS2\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("failed celliax_serial_read_FBUS2\n", SKYPIAX_P_LOG);
</ins><span class="cx"> UNLOCKA(&p->controldev_lock);
</span><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="cx"> if (how_many_reads > 10) {
</span><del>- ERRORA("no expected results in %d celliax_serial_read_FBUS2\n", CELLIAX_P_LOG,
</del><ins>+ ERRORA("no expected results in %d celliax_serial_read_FBUS2\n", SKYPIAX_P_LOG,
</ins><span class="cx"> how_many_reads);
</span><span class="cx"> UNLOCKA(&p->controldev_lock);
</span><span class="cx"> return -1;
</span><span class="lines">@@ -5807,7 +6296,7 @@
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int celliax_serial_sync_FBUS2(struct celliax_pvt *p)
</del><ins>+int celliax_serial_sync_FBUS2(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx"> unsigned char initc = 0x55; /* FBUS2 initialization char */
</span><span class="cx"> int c, rt;
</span><span class="lines">@@ -5818,7 +6307,7 @@
</span><span class="cx"> usleep(10000);
</span><span class="cx"> rt = write(p->controldevfd, &initc, 1);
</span><span class="cx"> if (rt != 1) {
</span><del>- ERRORA("serial error: %s", CELLIAX_P_LOG, strerror(errno));
</del><ins>+ ERRORA("serial error: %s", SKYPIAX_P_LOG, strerror(errno));
</ins><span class="cx"> UNLOCKA(&p->controldev_lock);
</span><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="lines">@@ -5829,7 +6318,7 @@
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int celliax_serial_answer_FBUS2(struct celliax_pvt *p)
</del><ins>+int celliax_serial_answer_FBUS2(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx"> unsigned char MsgBuffer[6];
</span><span class="cx">
</span><span class="lines">@@ -5842,16 +6331,16 @@
</span><span class="cx"> MsgBuffer[4] = FBUS2_IS_LAST_FRAME;
</span><span class="cx"> MsgBuffer[5] = celliax_serial_get_seqnum_FBUS2(p);
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_FBUS2("celliax_serial_answer_FBUS2, outseqnum %.2X \n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_FBUS2("celliax_serial_answer_FBUS2, outseqnum %.2X \n", SKYPIAX_P_LOG,
</ins><span class="cx"> MsgBuffer[5]);
</span><span class="cx"> celliax_serial_write_FBUS2(p, MsgBuffer, 6, FBUS2_TYPE_SECURITY);
</span><del>- DEBUGA_FBUS2("FBUS2: sent commands to answer the call\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_FBUS2("FBUS2: sent commands to answer the call\n", SKYPIAX_P_LOG);
</ins><span class="cx"> p->interface_state = AST_STATE_UP; //FIXME
</span><span class="cx">
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int celliax_serial_call_FBUS2(struct celliax_pvt *p, char *dstr)
</del><ins>+int celliax_serial_call_FBUS2(private_t * tech_pvt, char *dstr)
</ins><span class="cx"> {
</span><span class="cx"> unsigned char MsgBufferNum[255];
</span><span class="cx"> int i;
</span><span class="lines">@@ -5869,18 +6358,18 @@
</span><span class="cx"> MsgBufferNum[4 + strlen(dstr) + 1] = FBUS2_IS_LAST_FRAME;
</span><span class="cx"> MsgBufferNum[4 + strlen(dstr) + 2] = celliax_serial_get_seqnum_FBUS2(p);
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_FBUS2("celliax_serial_call_FBUS2, outseqnum %.2X \n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_FBUS2("celliax_serial_call_FBUS2, outseqnum %.2X \n", SKYPIAX_P_LOG,
</ins><span class="cx"> MsgBufferNum[4 + strlen(dstr) + 2]);
</span><span class="cx"> celliax_serial_write_FBUS2(p, MsgBufferNum, 5 + strlen(dstr) + 2, FBUS2_TYPE_SECURITY);
</span><span class="cx">
</span><span class="cx"> p->phone_callflow = CALLFLOW_CALL_DIALING;
</span><span class="cx"> p->interface_state = AST_STATE_DIALING;
</span><span class="cx"> if (option_debug)
</span><del>- DEBUGA_FBUS2("FBUS2: sent commands to call\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_FBUS2("FBUS2: sent commands to call\n", SKYPIAX_P_LOG);
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int celliax_serial_hangup_FBUS2(struct celliax_pvt *p)
</del><ins>+int celliax_serial_hangup_FBUS2(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx"> unsigned char MsgBuffer[6];
</span><span class="cx">
</span><span class="lines">@@ -5895,11 +6384,11 @@
</span><span class="cx"> MsgBuffer[5] = celliax_serial_get_seqnum_FBUS2(p);
</span><span class="cx">
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_FBUS2("celliax_serial_hangup_FBUS2, outseqnum %.2X \n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_FBUS2("celliax_serial_hangup_FBUS2, outseqnum %.2X \n", SKYPIAX_P_LOG,
</ins><span class="cx"> MsgBuffer[5]);
</span><span class="cx"> celliax_serial_write_FBUS2(p, MsgBuffer, 6, FBUS2_TYPE_SECURITY);
</span><span class="cx">
</span><del>- DEBUGA_FBUS2("FBUS2: sent commands to hangup the call\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_FBUS2("FBUS2: sent commands to hangup the call\n", SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> }
</span><span class="cx"> p->interface_state = AST_STATE_DOWN; //FIXME
</span><span class="lines">@@ -5907,7 +6396,7 @@
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int celliax_serial_config_FBUS2(struct celliax_pvt *p)
</del><ins>+int celliax_serial_config_FBUS2(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx"> unsigned char MsgBuffer[6];
</span><span class="cx"> int res;
</span><span class="lines">@@ -5922,11 +6411,11 @@
</span><span class="cx">
</span><span class="cx"> if (option_debug > 1)
</span><span class="cx"> DEBUGA_FBUS2("activating security commands for getting IMEI, outseqnum %.2X \n",
</span><del>- CELLIAX_P_LOG, MsgBuffer[5]);
</del><ins>+ SKYPIAX_P_LOG, MsgBuffer[5]);
</ins><span class="cx"> celliax_serial_write_FBUS2(p, MsgBuffer, 6, FBUS2_TYPE_SECURITY);
</span><span class="cx"> res = celliax_serial_read_FBUS2(p); //we don't have no monitor neither do_controldev_thread
</span><span class="cx"> if (res == -1) {
</span><del>- ERRORA("failed celliax_serial_read_FBUS2\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("failed celliax_serial_read_FBUS2\n", SKYPIAX_P_LOG);
</ins><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="cx"> while (res != MsgBuffer[5] && res != FBUS2_SECURIY_EXTENDED_COMMAND_ON) {
</span><span class="lines">@@ -5934,11 +6423,11 @@
</span><span class="cx"> res = celliax_serial_read_FBUS2(p);
</span><span class="cx"> how_many_reads++;
</span><span class="cx"> if (res == -1) {
</span><del>- ERRORA("failed celliax_serial_read_FBUS2\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("failed celliax_serial_read_FBUS2\n", SKYPIAX_P_LOG);
</ins><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="cx"> if (how_many_reads > 10) {
</span><del>- ERRORA("no expected results in %d celliax_serial_read_FBUS2\n", CELLIAX_P_LOG,
</del><ins>+ ERRORA("no expected results in %d celliax_serial_read_FBUS2\n", SKYPIAX_P_LOG,
</ins><span class="cx"> how_many_reads);
</span><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="lines">@@ -5951,12 +6440,12 @@
</span><span class="cx"> MsgBuffer[4] = FBUS2_IS_LAST_FRAME;
</span><span class="cx"> MsgBuffer[5] = celliax_serial_get_seqnum_FBUS2(p);
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_FBUS2("celliax_serial_get_IMEI_init_FBUS2, outseqnum %.2X \n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_FBUS2("celliax_serial_get_IMEI_init_FBUS2, outseqnum %.2X \n", SKYPIAX_P_LOG,
</ins><span class="cx"> MsgBuffer[5]);
</span><span class="cx"> celliax_serial_write_FBUS2(p, MsgBuffer, 6, FBUS2_TYPE_SECURITY);
</span><span class="cx"> res = celliax_serial_read_FBUS2(p); //we don't have no monitor neither do_controldev_thread
</span><span class="cx"> if (res == -1) {
</span><del>- ERRORA("failed celliax_serial_read_FBUS2\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("failed celliax_serial_read_FBUS2\n", SKYPIAX_P_LOG);
</ins><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="cx"> how_many_reads = 0;
</span><span class="lines">@@ -5965,11 +6454,11 @@
</span><span class="cx"> res = celliax_serial_read_FBUS2(p);
</span><span class="cx"> how_many_reads++;
</span><span class="cx"> if (res == -1) {
</span><del>- ERRORA("failed celliax_serial_read_FBUS2\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("failed celliax_serial_read_FBUS2\n", SKYPIAX_P_LOG);
</ins><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="cx"> if (how_many_reads > 10) {
</span><del>- ERRORA("no expected results in %d celliax_serial_read_FBUS2\n", CELLIAX_P_LOG,
</del><ins>+ ERRORA("no expected results in %d celliax_serial_read_FBUS2\n", SKYPIAX_P_LOG,
</ins><span class="cx"> how_many_reads);
</span><span class="cx"> //FIXME return -1;
</span><span class="cx"> return 0;
</span><span class="lines">@@ -5977,15 +6466,15 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_FBUS2("xxxxx GOT IMEI xxxxx res=%d %.2X \n", CELLIAX_P_LOG, res, res);
</del><ins>+ DEBUGA_FBUS2("xxxxx GOT IMEI xxxxx res=%d %.2X \n", SKYPIAX_P_LOG, res, res);
</ins><span class="cx">
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int celliax_serial_get_seqnum_FBUS2(struct celliax_pvt *p)
</del><ins>+int celliax_serial_get_seqnum_FBUS2(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx"> if (p->seqnumfbus > FBUS2_SEQNUM_MAX || p->seqnumfbus < FBUS2_SEQNUM_MIN) {
</span><del>- ERRORA("p->seqnumfbus: %2.X\n", CELLIAX_P_LOG, p->seqnumfbus);
</del><ins>+ ERRORA("p->seqnumfbus: %2.X\n", SKYPIAX_P_LOG, p->seqnumfbus);
</ins><span class="cx"> p->seqnumfbus = FBUS2_SEQNUM_MIN;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -5995,11 +6484,11 @@
</span><span class="cx"> p->seqnumfbus++;
</span><span class="cx"> }
</span><span class="cx"> if (option_debug > 10)
</span><del>- DEBUGA_FBUS2("sqnum: %2.X\n", CELLIAX_P_LOG, p->seqnumfbus);
</del><ins>+ DEBUGA_FBUS2("sqnum: %2.X\n", SKYPIAX_P_LOG, p->seqnumfbus);
</ins><span class="cx"> return p->seqnumfbus;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int celliax_serial_security_command_FBUS2(struct celliax_pvt *p)
</del><ins>+int celliax_serial_security_command_FBUS2(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx"> unsigned char MsgBuffer[6];
</span><span class="cx">
</span><span class="lines">@@ -6011,7 +6500,7 @@
</span><span class="cx"> MsgBuffer[5] = celliax_serial_get_seqnum_FBUS2(p);
</span><span class="cx">
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_FBUS2("activating security commands, outseqnum %.2X \n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_FBUS2("activating security commands, outseqnum %.2X \n", SKYPIAX_P_LOG,
</ins><span class="cx"> MsgBuffer[5]);
</span><span class="cx"> celliax_serial_write_FBUS2(p, MsgBuffer, 6, FBUS2_TYPE_SECURITY);
</span><span class="cx"> return 0;
</span><span class="lines">@@ -6028,7 +6517,7 @@
</span><span class="cx"> * \return the number of chars written on the serial,
</span><span class="cx"> * that can be different from len (or negative) in case of errors.
</span><span class="cx"> */
</span><del>-int celliax_serial_send_FBUS2(struct celliax_pvt *p, int len, unsigned char *mesg_ptr)
</del><ins>+int celliax_serial_send_FBUS2(private_t * tech_pvt, int len, unsigned char *mesg_ptr)
</ins><span class="cx"> {
</span><span class="cx"> int ret;
</span><span class="cx"> size_t actual = 0;
</span><span class="lines">@@ -6041,7 +6530,7 @@
</span><span class="cx"> continue;
</span><span class="cx"> if (ret < 0) {
</span><span class="cx"> if (actual != len)
</span><del>- ERRORA("celliax_serial_write error: %s", CELLIAX_P_LOG, strerror(errno));
</del><ins>+ ERRORA("celliax_serial_write error: %s", SKYPIAX_P_LOG, strerror(errno));
</ins><span class="cx"> UNLOCKA(&p->controldev_lock);
</span><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="lines">@@ -6065,7 +6554,7 @@
</span><span class="cx"> if (debug_buf_pos > ((char *) &debug_buf + 1000))
</span><span class="cx"> break;
</span><span class="cx"> }
</span><del>- DEBUGA_FBUS2("%s was sent down the wire\n", CELLIAX_P_LOG, debug_buf);
</del><ins>+ DEBUGA_FBUS2("%s was sent down the wire\n", SKYPIAX_P_LOG, debug_buf);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return 0;
</span><span class="lines">@@ -6083,13 +6572,13 @@
</span><span class="cx"> *
</span><span class="cx"> * \return 0 on error, 1 otherwise
</span><span class="cx"> */
</span><del>-int celliax_serial_list_acknowledge_FBUS2(struct celliax_pvt *p, int seqnum)
</del><ins>+int celliax_serial_list_acknowledge_FBUS2(private_t * tech_pvt, int seqnum)
</ins><span class="cx"> {
</span><span class="cx"> struct fbus2_msg *ptr;
</span><span class="cx">
</span><span class="cx"> ptr = p->fbus2_outgoing_list;
</span><span class="cx"> if (ptr == NULL) {
</span><del>- ERRORA("fbus2_outgoing_list is NULL ?\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("fbus2_outgoing_list is NULL ?\n", SKYPIAX_P_LOG);
</ins><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="cx"> PUSHA_UNLOCKA(&p->fbus2_outgoing_list_lock);
</span><span class="lines">@@ -6100,9 +6589,9 @@
</span><span class="cx"> if (ptr->seqnum == seqnum) {
</span><span class="cx"> ptr->acknowledged = 1;
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_FBUS2("Acknowledgment to %.2X\n", CELLIAX_P_LOG, seqnum);
</del><ins>+ DEBUGA_FBUS2("Acknowledgment to %.2X\n", SKYPIAX_P_LOG, seqnum);
</ins><span class="cx">
</span><del>- DEBUGA_FBUS2("PREFREE OUTGOING list:\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_FBUS2("PREFREE OUTGOING list:\n", SKYPIAX_P_LOG);
</ins><span class="cx"> celliax_serial_list_print_FBUS2(p, p->fbus2_outgoing_list);
</span><span class="cx"> if (ptr->previous) {
</span><span class="cx"> if (ptr->next) {
</span><span class="lines">@@ -6121,13 +6610,13 @@
</span><span class="cx">
</span><span class="cx"> if ((NULL == ptr->next) && (NULL == ptr->previous)) { /* bug catched by Wojciech Andralojc */
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_FBUS2("FREEING LAST\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_FBUS2("FREEING LAST\n", SKYPIAX_P_LOG);
</ins><span class="cx"> p->fbus2_outgoing_list = NULL;
</span><span class="cx"> p->fbus2_outgoing_list = celliax_serial_list_init_FBUS2(p);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> free(ptr);
</span><del>- DEBUGA_FBUS2("POSTFREE OUTGOING list:\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_FBUS2("POSTFREE OUTGOING list:\n", SKYPIAX_P_LOG);
</ins><span class="cx"> celliax_serial_list_print_FBUS2(p, p->fbus2_outgoing_list);
</span><span class="cx">
</span><span class="cx"> break;
</span><span class="lines">@@ -6137,7 +6626,7 @@
</span><span class="cx"> } else {
</span><span class="cx"> ERRORA
</span><span class="cx"> ("The phone sent us an acknowledgement referring to a msg with a seqnum that is not in our sent list: %.2X\n",
</span><del>- CELLIAX_P_LOG, seqnum);
</del><ins>+ SKYPIAX_P_LOG, seqnum);
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -6157,7 +6646,7 @@
</span><span class="cx"> *
</span><span class="cx"> * \return 0 on error, 1 otherwise
</span><span class="cx"> */
</span><del>-int celliax_serial_send_if_time_FBUS2(struct celliax_pvt *p)
</del><ins>+int celliax_serial_send_if_time_FBUS2(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx"> struct fbus2_msg *ptr;
</span><span class="cx"> struct timeval tv;
</span><span class="lines">@@ -6166,11 +6655,11 @@
</span><span class="cx"> gettimeofday(&tv, &tz);
</span><span class="cx"> ptr = p->fbus2_outgoing_list;
</span><span class="cx"> if (ptr == NULL) {
</span><del>- ERRORA("fbus2_outgoing_list is NULL ?\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("fbus2_outgoing_list is NULL ?\n", SKYPIAX_P_LOG);
</ins><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="cx"> while (ptr->next != NULL) {
</span><del>- WARNINGA("fbus2_outgoing_list->next is not null ?\n", CELLIAX_P_LOG);
</del><ins>+ WARNINGA("fbus2_outgoing_list->next is not null ?\n", SKYPIAX_P_LOG);
</ins><span class="cx"> ptr = ptr->next; //FIXME what to do?
</span><span class="cx"> }
</span><span class="cx"> while (ptr->sent == 0 && ptr->acknowledged == 0) {
</span><span class="lines">@@ -6201,13 +6690,13 @@
</span><span class="cx"> if ((tv.tv_sec * 1000 + tv.tv_usec / 1000) > ((ptr->tv_sec * 1000 + ptr->tv_usec / 1000) + 1000)) { //retest, maybe has been changed?
</span><span class="cx">
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_FBUS2("RESEND %.2X, passed %ld ms, sent %d times\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_FBUS2("RESEND %.2X, passed %ld ms, sent %d times\n", SKYPIAX_P_LOG,
</ins><span class="cx"> ptr->seqnum,
</span><span class="cx"> ((tv.tv_sec * 1000 + tv.tv_usec / 1000) -
</span><span class="cx"> (ptr->tv_sec * 1000 + ptr->tv_usec / 1000)),
</span><span class="cx"> ptr->how_many_sent);
</span><span class="cx"> if (ptr->how_many_sent > 9) {
</span><del>- ERRORA("RESEND %.2X, passed %ld ms, sent %d times\n", CELLIAX_P_LOG,
</del><ins>+ ERRORA("RESEND %.2X, passed %ld ms, sent %d times\n", SKYPIAX_P_LOG,
</ins><span class="cx"> ptr->seqnum,
</span><span class="cx"> ((tv.tv_sec * 1000 + tv.tv_usec / 1000) -
</span><span class="cx"> (ptr->tv_sec * 1000 + ptr->tv_usec / 1000)), ptr->how_many_sent);
</span><span class="lines">@@ -6219,7 +6708,7 @@
</span><span class="cx"> celliax_serial_send_FBUS2(p, ptr->len, ptr->buffer);
</span><span class="cx"> if (ptr->buffer[3] == FBUS2_ACK_BYTE) {
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_FBUS2("RESEND ACK, passed %ld ms, sent %d times\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_FBUS2("RESEND ACK, passed %ld ms, sent %d times\n", SKYPIAX_P_LOG,
</ins><span class="cx"> ((tv.tv_sec * 1000 + tv.tv_usec / 1000) -
</span><span class="cx"> (ptr->tv_sec * 1000 + ptr->tv_usec / 1000)),
</span><span class="cx"> ptr->how_many_sent);
</span><span class="lines">@@ -6231,9 +6720,9 @@
</span><span class="cx"> ptr->sent = 1;
</span><span class="cx"> ptr->how_many_sent++;
</span><span class="cx"> if (option_debug > 1) {
</span><del>- DEBUGA_FBUS2("OUTGOING list:\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_FBUS2("OUTGOING list:\n", SKYPIAX_P_LOG);
</ins><span class="cx"> celliax_serial_list_print_FBUS2(p, p->fbus2_outgoing_list);
</span><del>- DEBUGA_FBUS2("OUTGOING list END\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_FBUS2("OUTGOING list END\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> }
</span><span class="lines">@@ -6251,11 +6740,11 @@
</span><span class="cx"> if (ptr->sent == 0 && ptr->acknowledged == 0 && ptr->msg > 0) { //retest, maybe has been changed?
</span><span class="cx">
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_FBUS2("SENDING 1st TIME %.2X\n", CELLIAX_P_LOG, ptr->seqnum);
</del><ins>+ DEBUGA_FBUS2("SENDING 1st TIME %.2X\n", SKYPIAX_P_LOG, ptr->seqnum);
</ins><span class="cx"> celliax_serial_send_FBUS2(p, ptr->len, ptr->buffer);
</span><span class="cx"> if (ptr->buffer[3] == FBUS2_ACK_BYTE) {
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_FBUS2("SENDING 1st TIME ACK\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_FBUS2("SENDING 1st TIME ACK\n", SKYPIAX_P_LOG);
</ins><span class="cx"> ptr->acknowledged = 1;
</span><span class="cx"> ptr->msg = FBUS2_OUTGOING_ACK;
</span><span class="cx"> }
</span><span class="lines">@@ -6264,9 +6753,9 @@
</span><span class="cx"> ptr->sent = 1;
</span><span class="cx"> ptr->how_many_sent++;
</span><span class="cx"> if (option_debug > 1) {
</span><del>- DEBUGA_FBUS2("OUTGOING list:\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_FBUS2("OUTGOING list:\n", SKYPIAX_P_LOG);
</ins><span class="cx"> celliax_serial_list_print_FBUS2(p, p->fbus2_outgoing_list);
</span><del>- DEBUGA_FBUS2("OUTGOING list END\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_FBUS2("OUTGOING list END\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> }
</span><span class="lines">@@ -6278,7 +6767,7 @@
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int celliax_serial_write_FBUS2(struct celliax_pvt *p, unsigned char *MsgBuffer,
</del><ins>+int celliax_serial_write_FBUS2(private_t * tech_pvt, unsigned char *MsgBuffer,
</ins><span class="cx"> int MsgLength, unsigned char MsgType)
</span><span class="cx"> {
</span><span class="cx"> unsigned char buffer2[FBUS2_MAX_TRANSMIT_LENGTH + 10];
</span><span class="lines">@@ -6325,9 +6814,9 @@
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> if (buffer2[3] == FBUS2_ACK_BYTE) {
</span><del>- DEBUGA_FBUS2("%s to be written, ACK\n", CELLIAX_P_LOG, debug_buf);
</del><ins>+ DEBUGA_FBUS2("%s to be written, ACK\n", SKYPIAX_P_LOG, debug_buf);
</ins><span class="cx"> } else {
</span><del>- DEBUGA_FBUS2("%s to be written\n", CELLIAX_P_LOG, debug_buf);
</del><ins>+ DEBUGA_FBUS2("%s to be written\n", SKYPIAX_P_LOG, debug_buf);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -6343,12 +6832,12 @@
</span><span class="cx"> }
</span><span class="cx"> p->fbus2_outgoing_list->seqnum = MsgBuffer[MsgLength - 1];
</span><span class="cx"> if (option_debug > 1) {
</span><del>- DEBUGA_FBUS2("OUTGOING LIST seqnum is %2.X\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_FBUS2("OUTGOING LIST seqnum is %2.X\n", SKYPIAX_P_LOG,
</ins><span class="cx"> MsgBuffer[MsgLength - 1]);
</span><span class="cx">
</span><del>- DEBUGA_FBUS2("OUTGOING list:\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_FBUS2("OUTGOING list:\n", SKYPIAX_P_LOG);
</ins><span class="cx"> celliax_serial_list_print_FBUS2(p, p->fbus2_outgoing_list);
</span><del>- DEBUGA_FBUS2("OUTGOING list END\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_FBUS2("OUTGOING list END\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> } else {
</span><span class="cx"> usleep(100);
</span><span class="lines">@@ -6358,7 +6847,7 @@
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int celliax_serial_send_ack_FBUS2(struct celliax_pvt *p, unsigned char MsgType,
</del><ins>+int celliax_serial_send_ack_FBUS2(private_t * tech_pvt, unsigned char MsgType,
</ins><span class="cx"> unsigned char MsgSequence)
</span><span class="cx"> {
</span><span class="cx"> unsigned char buffer2[2];
</span><span class="lines">@@ -6367,13 +6856,13 @@
</span><span class="cx"> buffer2[1] = (MsgSequence - FBUS2_SEQNUM_MIN);
</span><span class="cx">
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_FBUS2("SENDING ACK to %2.X, seqack %2.X \n", CELLIAX_P_LOG, MsgSequence,
</del><ins>+ DEBUGA_FBUS2("SENDING ACK to %2.X, seqack %2.X \n", SKYPIAX_P_LOG, MsgSequence,
</ins><span class="cx"> (MsgSequence - FBUS2_SEQNUM_MIN));
</span><span class="cx"> /* Sending to phone */
</span><span class="cx"> return celliax_serial_write_FBUS2(p, buffer2, 2, FBUS2_ACK_BYTE);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-struct fbus2_msg *celliax_serial_list_init_FBUS2(struct celliax_pvt *p)
</del><ins>+struct fbus2_msg *celliax_serial_list_init_FBUS2(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx"> struct fbus2_msg *list;
</span><span class="cx"> list = p->fbus2_outgoing_list;
</span><span class="lines">@@ -6414,7 +6903,7 @@
</span><span class="cx"> return list;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int celliax_serial_list_print_FBUS2(struct celliax_pvt *p, struct fbus2_msg *list)
</del><ins>+int celliax_serial_list_print_FBUS2(private_t * tech_pvt, struct fbus2_msg *list)
</ins><span class="cx"> {
</span><span class="cx"> struct fbus2_msg *ptr;
</span><span class="cx"> ptr = list;
</span><span class="lines">@@ -6422,14 +6911,14 @@
</span><span class="cx"> if (option_debug > 3)
</span><span class="cx"> DEBUGA_FBUS2
</span><span class="cx"> ("PTR msg is: %d, seqnum is %.2X, tv_sec is %d, tv_usec is %d, acknowledged is: %d,"
</span><del>- " sent is:%d, how_many_sent is: %d\n", CELLIAX_P_LOG, ptr->msg, ptr->seqnum,
</del><ins>+ " sent is:%d, how_many_sent is: %d\n", SKYPIAX_P_LOG, ptr->msg, ptr->seqnum,
</ins><span class="cx"> ptr->tv_sec, ptr->tv_usec, ptr->acknowledged, ptr->sent, ptr->how_many_sent);
</span><span class="cx"> ptr = ptr->previous;
</span><span class="cx"> }
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int celliax_serial_read_FBUS2(struct celliax_pvt *p)
</del><ins>+int celliax_serial_read_FBUS2(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx"> int read_count;
</span><span class="cx"> int select_err;
</span><span class="lines">@@ -6456,7 +6945,7 @@
</span><span class="cx"> if (read_count == 0) {
</span><span class="cx"> ERRORA
</span><span class="cx"> ("read 0 bytes!!! Nenormalno! Marking this celliax_serial_device %s as dead, andif it is owned by a channel, hanging up. Maybe the phone is stuck, switched off, power down or battery exhausted\n",
</span><del>- CELLIAX_P_LOG, p->controldevice_name);
</del><ins>+ SKYPIAX_P_LOG, p->controldevice_name);
</ins><span class="cx"> p->controldev_dead = 1;
</span><span class="cx"> close(p->controldevfd);
</span><span class="cx"> UNLOCKA(&p->controldev_lock);
</span><span class="lines">@@ -6478,7 +6967,7 @@
</span><span class="cx"> if (debug_buf_pos > (char *) (&debug_buf + 1000))
</span><span class="cx"> break;
</span><span class="cx"> }
</span><del>- DEBUGA_FBUS2("%s READ AT seconds=%ld usec=%6ld read_count=%d\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_FBUS2("%s READ AT seconds=%ld usec=%6ld read_count=%d\n", SKYPIAX_P_LOG,
</ins><span class="cx"> debug_buf, p->fbus2_list_tv.tv_sec, p->fbus2_list_tv.tv_usec,
</span><span class="cx"> read_count);
</span><span class="cx"> }
</span><span class="lines">@@ -6518,12 +7007,12 @@
</span><span class="cx"> case FBUS2_ACK_BYTE:
</span><span class="cx"> /* this is an ACKnowledgement frame sent to us in reply to an item we sent, take note we were ACKnowledged, no need to resend the item */
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_FBUS2("INCOMING ACK, seqack %.2X \n", CELLIAX_P_LOG, seqnum);
</del><ins>+ DEBUGA_FBUS2("INCOMING ACK, seqack %.2X \n", SKYPIAX_P_LOG, seqnum);
</ins><span class="cx"> if (seqnum == 0x80) { /* reset */
</span><span class="cx"> seqnum = 0x00;
</span><span class="cx"> DEBUGA_FBUS2
</span><span class="cx"> ("seqack was 0x80, interpreting as 0x00, first acknowledgement (session begin?) of our first sent item 0x40\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> /* an ACK frame has the same seqnum as the item it acknowledge, minus 0x40, so here we obtain the seqnum of the item that has been ACKnowledged */
</span><span class="cx"> fbus_mesg = seqnum + FBUS2_SEQNUM_MIN;
</span><span class="lines">@@ -6535,7 +7024,7 @@
</span><span class="cx"> /****************************************************************/
</span><span class="cx"> case FBUS2_TYPE_CALL_DIVERT:
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_FBUS2("CALL DIVERT SIGNALING seqnum %.2X \n", CELLIAX_P_LOG, seqnum);
</del><ins>+ DEBUGA_FBUS2("CALL DIVERT SIGNALING seqnum %.2X \n", SKYPIAX_P_LOG, seqnum);
</ins><span class="cx"> fbus_mesg = FBUS2_TYPE_CALL_DIVERT;
</span><span class="cx"> /* this signal us that we have some settings in line divert, let's use it as activation of the line when we call */
</span><span class="cx"> if (p->interface_state == AST_STATE_DIALING) {
</span><span class="lines">@@ -6546,7 +7035,7 @@
</span><span class="cx"> if (option_debug)
</span><span class="cx"> DEBUGA_FBUS2
</span><span class="cx"> ("call is active, I know it's not yet true, but 3310 do not give us remote answer signaling\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> /* this frame has been categorized, bail out from the loop */
</span><span class="cx"> known = 1;
</span><span class="lines">@@ -6575,7 +7064,7 @@
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> model[c] = '\0';
</span><del>- DEBUGA_FBUS2("FBUS2 PHONE MODEL is: %s, inseqnum %.2X \n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_FBUS2("FBUS2 PHONE MODEL is: %s, inseqnum %.2X \n", SKYPIAX_P_LOG,
</ins><span class="cx"> model, seqnum);
</span><span class="cx"> }
</span><span class="cx"> known = 1;
</span><span class="lines">@@ -6595,11 +7084,11 @@
</span><span class="cx">
</span><span class="cx"> /* set the channel state to UP, we've answered */
</span><span class="cx"> if (ast_setstate(p->owner, AST_STATE_UP)) {
</span><del>- ERRORA("ast_setstate failed, BAD\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("ast_setstate failed, BAD\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_FBUS2("ANSWERED CALL, inseqnum %.2X \n", CELLIAX_P_LOG, seqnum);
</del><ins>+ DEBUGA_FBUS2("ANSWERED CALL, inseqnum %.2X \n", SKYPIAX_P_LOG, seqnum);
</ins><span class="cx"> known = 1;
</span><span class="cx"> break;
</span><span class="cx"> /* this sub-subkind of frames tell us that we released the call */
</span><span class="lines">@@ -6607,7 +7096,7 @@
</span><span class="cx"> p->interface_state = AST_STATE_DOWN;
</span><span class="cx"> p->phone_callflow = CALLFLOW_CALL_IDLE;
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_FBUS2("RELEASED CALL, inseqnum %.2X \n", CELLIAX_P_LOG, seqnum);
</del><ins>+ DEBUGA_FBUS2("RELEASED CALL, inseqnum %.2X \n", SKYPIAX_P_LOG, seqnum);
</ins><span class="cx"> fbus_mesg = CALLFLOW_CALL_RELEASED;
</span><span class="cx"> known = 1;
</span><span class="cx"> break;
</span><span class="lines">@@ -6617,14 +7106,14 @@
</span><span class="cx"> case FBUS2_SECURIY_EXTENDED_COMMANDS:
</span><span class="cx"> if (option_debug > 1)
</span><span class="cx"> DEBUGA_FBUS2("SECURITY EXTENDED COMMANDS ON, inseqnum %.2X \n",
</span><del>- CELLIAX_P_LOG, seqnum);
</del><ins>+ SKYPIAX_P_LOG, seqnum);
</ins><span class="cx"> fbus_mesg = FBUS2_SECURIY_EXTENDED_COMMAND_ON;
</span><span class="cx"> known = 1;
</span><span class="cx"> break;
</span><span class="cx"> /* this subkind of frames is an answer to "get IMEI" action */
</span><span class="cx"> case FBUS2_SECURIY_IMEI_COMMANDS:
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_FBUS2("CALLFLOW_GOT_IMEI, inseqnum %.2X \n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_FBUS2("CALLFLOW_GOT_IMEI, inseqnum %.2X \n", SKYPIAX_P_LOG,
</ins><span class="cx"> seqnum);
</span><span class="cx"> fbus_mesg = CALLFLOW_GOT_IMEI;
</span><span class="cx"> known = 1;
</span><span class="lines">@@ -6638,7 +7127,7 @@
</span><span class="cx"> /* this subkind of frames is about an INCOMING SMS */
</span><span class="cx"> case FBUS2_SMS_INCOMING:
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_FBUS2("SMS, inseqnum %.2X \n", CELLIAX_P_LOG, seqnum);
</del><ins>+ DEBUGA_FBUS2("SMS, inseqnum %.2X \n", SKYPIAX_P_LOG, seqnum);
</ins><span class="cx"> known = 1;
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="lines">@@ -6653,7 +7142,7 @@
</span><span class="cx"> p->interface_state = AST_STATE_DOWN;
</span><span class="cx"> p->phone_callflow = CALLFLOW_CALL_IDLE;
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_FBUS2("REMOTE PARTY HANG UP, inseqnum %.2X \n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_FBUS2("REMOTE PARTY HANG UP, inseqnum %.2X \n", SKYPIAX_P_LOG,
</ins><span class="cx"> seqnum);
</span><span class="cx"> fbus_mesg = CALLFLOW_INCOMING_HANGUP;
</span><span class="cx"> known = 1;
</span><span class="lines">@@ -6661,7 +7150,7 @@
</span><span class="cx"> /* this subkind of frame is about the remote CALLID (not signaled by 3310) */
</span><span class="cx"> case FBUS2_CALL_CALLID:
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_FBUS2("CALLID, inseqnum %.2X \n", CELLIAX_P_LOG, seqnum);
</del><ins>+ DEBUGA_FBUS2("CALLID, inseqnum %.2X \n", SKYPIAX_P_LOG, seqnum);
</ins><span class="cx"> memset(p->callid_name, 0, sizeof(p->callid_name));
</span><span class="cx"> memset(p->callid_number, 0, sizeof(p->callid_number));
</span><span class="cx"> for (a = 0; a < p->array[12]; a++) {
</span><span class="lines">@@ -6672,7 +7161,7 @@
</span><span class="cx"> }
</span><span class="cx"> if (option_debug > 1)
</span><span class="cx"> DEBUGA_FBUS2("CALLFLOW_INCOMING_CALLID: name is %s, number is %s\n",
</span><del>- CELLIAX_P_LOG,
</del><ins>+ SKYPIAX_P_LOG,
</ins><span class="cx"> p->callid_name[0] != 1 ? p->callid_name : "not available",
</span><span class="cx"> p->callid_number[0] ? p->callid_number : "not available");
</span><span class="cx"> fbus_mesg = CALLFLOW_INCOMING_CALLID;
</span><span class="lines">@@ -6689,7 +7178,7 @@
</span><span class="cx"> /* this subkind of frames is NETWORK STATUS REGISTERED */
</span><span class="cx"> case FBUS2_NETWORK_STATUS_REGISTERED:
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_FBUS2("NETWORK STATUS REGISTERED, inseqnum %.2X \n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_FBUS2("NETWORK STATUS REGISTERED, inseqnum %.2X \n", SKYPIAX_P_LOG,
</ins><span class="cx"> seqnum);
</span><span class="cx"> if (p->callid_name[0] == 0 && p->owner
</span><span class="cx"> && p->interface_state != AST_STATE_DOWN) {
</span><span class="lines">@@ -6703,7 +7192,7 @@
</span><span class="cx"> " callid_name[0]=1 (also if no callid was transmitted by remote"
</span><span class="cx"> " party), we use this lack of CALLID as a sign of 3310nness."
</span><span class="cx"> " Outside a call, or when CALLID has been signaled, NETWORK STATUS"
</span><del>- " REGISTERED is ignored.\n", CELLIAX_P_LOG);
</del><ins>+ " REGISTERED is ignored.\n", SKYPIAX_P_LOG);
</ins><span class="cx"> fbus_mesg = CALLFLOW_INCOMING_HANGUP;
</span><span class="cx"> }
</span><span class="cx"> known = 1;
</span><span class="lines">@@ -6720,7 +7209,7 @@
</span><span class="cx"> p->phone_callflow = CALLFLOW_CALL_IDLE;
</span><span class="cx"> if (option_debug > 1)
</span><span class="cx"> DEBUGA_FBUS2("STATUS call in progress OFF, inseqnum %.2X \n",
</span><del>- CELLIAX_P_LOG, seqnum);
</del><ins>+ SKYPIAX_P_LOG, seqnum);
</ins><span class="cx"> fbus_mesg = CALLFLOW_INCOMING_HANGUP;
</span><span class="cx"> known = 1;
</span><span class="cx"> break;
</span><span class="lines">@@ -6728,7 +7217,7 @@
</span><span class="cx"> case FBUS2_CALL_STATUS_ON:
</span><span class="cx"> if (option_debug > 1)
</span><span class="cx"> DEBUGA_FBUS2("STATUS call in progress ON, inseqnum %.2X \n",
</span><del>- CELLIAX_P_LOG, seqnum);
</del><ins>+ SKYPIAX_P_LOG, seqnum);
</ins><span class="cx"> known = 1;
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="lines">@@ -6738,7 +7227,7 @@
</span><span class="cx">
</span><span class="cx"> /* categorization of frame is ended, if it has not been recognized, whine */
</span><span class="cx"> if (!known) {
</span><del>- WARNINGA("FBUS2 MSG UNKNOWN, inseqnum %.2X\n", CELLIAX_P_LOG, seqnum);
</del><ins>+ WARNINGA("FBUS2 MSG UNKNOWN, inseqnum %.2X\n", SKYPIAX_P_LOG, seqnum);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /* let's print our frame */
</span><span class="lines">@@ -6754,7 +7243,7 @@
</span><span class="cx"> if (debug_buf_pos > (char *) (&debug_buf + 1000))
</span><span class="cx"> break;
</span><span class="cx"> }
</span><del>- DEBUGA_FBUS2("%s is the RECEIVED FRAME inseqnum %.2X\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_FBUS2("%s is the RECEIVED FRAME inseqnum %.2X\n", SKYPIAX_P_LOG,
</ins><span class="cx"> debug_buf, seqnum);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -6774,7 +7263,7 @@
</span><span class="cx"> if (errno != EINTR) {
</span><span class="cx"> ERRORA
</span><span class="cx"> ("select returned -1 on %s, marking controldev as dead, errno was: %d, error was: %s\n",
</span><del>- CELLIAX_P_LOG, p->controldevice_name, errno, strerror(errno));
</del><ins>+ SKYPIAX_P_LOG, p->controldevice_name, errno, strerror(errno));
</ins><span class="cx"> p->controldev_dead = 1;
</span><span class="cx"> close(p->controldevfd);
</span><span class="cx"> if (p->owner)
</span><span class="lines">@@ -6782,20 +7271,20 @@
</span><span class="cx"> return -1;
</span><span class="cx"> } else {
</span><span class="cx"> WARNINGA("select returned -1 on %s, errno was: %d, EINTR, error was: %s\n",
</span><del>- CELLIAX_P_LOG, p->controldevice_name, errno, strerror(errno));
</del><ins>+ SKYPIAX_P_LOG, p->controldevice_name, errno, strerror(errno));
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> /* OK, reading done, let's browse the list of pending frames to be sent, and act on it */
</span><span class="cx"> if (celliax_serial_send_if_time_FBUS2(p)) {
</span><del>- ERRORA("celliax_serial_send_if_time_FBUS2 failed!\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("celliax_serial_send_if_time_FBUS2 failed!\n", SKYPIAX_P_LOG);
</ins><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (fbus_mesg == CALLFLOW_INCOMING_HANGUP) {
</span><span class="cx"> if (p->owner) {
</span><span class="cx"> celliax_queue_control(p->owner, AST_CONTROL_HANGUP);
</span><del>- DEBUGA_FBUS2("phone call ended\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_FBUS2("phone call ended\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -6806,29 +7295,29 @@
</span><span class="cx">
</span><span class="cx"> #ifdef CELLIAX_CVM
</span><span class="cx">
</span><del>-int celliax_serial_sync_CVM_BUSMAIL(struct celliax_pvt *p)
</del><ins>+int celliax_serial_sync_CVM_BUSMAIL(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx"> usleep(1000); /* 1msec */
</span><span class="cx"> time(&p->celliax_serial_synced_timestamp);
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int celliax_serial_answer_CVM_BUSMAIL(struct celliax_pvt *p)
</del><ins>+int celliax_serial_answer_CVM_BUSMAIL(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx"> if (AST_STATE_RING == p->interface_state) {
</span><del>- DEBUGA_CVM("Sending commands to answer an incomming call...\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_CVM("Sending commands to answer an incomming call...\n", SKYPIAX_P_LOG);
</ins><span class="cx"> celliax_serial_send_info_frame_CVM_BUSMAIL(p, API_PP_CONNECT_REQ, 0, NULL);
</span><span class="cx">
</span><span class="cx"> } else {
</span><span class="cx"> DEBUGA_CVM
</span><span class="cx"> ("SKIPPING Sending commands to answer an incomming call, because: !AST_STATE_RING\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int celliax_serial_call_CVM_BUSMAIL(struct celliax_pvt *p, char *dstr)
</del><ins>+int celliax_serial_call_CVM_BUSMAIL(private_t * tech_pvt, char *dstr)
</ins><span class="cx"> {
</span><span class="cx"> unsigned char bCallType = 0x01; /* INTERNAL */
</span><span class="cx">
</span><span class="lines">@@ -6855,11 +7344,11 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (option_debug)
</span><del>- NOTICA("CVM_BUSMAIL: sent commands to call\n", CELLIAX_P_LOG);
</del><ins>+ NOTICA("CVM_BUSMAIL: sent commands to call\n", SKYPIAX_P_LOG);
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int celliax_serial_hangup_CVM_BUSMAIL(struct celliax_pvt *p)
</del><ins>+int celliax_serial_hangup_CVM_BUSMAIL(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx"> unsigned char bReason = 0x0; /* Normal hang-up */
</span><span class="cx">
</span><span class="lines">@@ -6867,17 +7356,17 @@
</span><span class="cx"> celliax_serial_send_info_frame_CVM_BUSMAIL(p, API_PP_RELEASE_REQ, sizeof(bReason),
</span><span class="cx"> &bReason);
</span><span class="cx">
</span><del>- DEBUGA_CVM("CVM_BUSMAIL: sent commands to hangup the call\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_CVM("CVM_BUSMAIL: sent commands to hangup the call\n", SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> } else {
</span><span class="cx"> DEBUGA_CVM("CVM_BUSMAIL: sent commands to hangup skipped because: AST_STATE_DOWN\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int celliax_serial_config_CVM_BUSMAIL(struct celliax_pvt *p)
</del><ins>+int celliax_serial_config_CVM_BUSMAIL(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx"> int res;
</span><span class="cx"> int how_many_reads = 0;
</span><span class="lines">@@ -6891,7 +7380,7 @@
</span><span class="cx"> CVM_LOKKA(&p->controldev_lock);
</span><span class="cx">
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_CVM("Try to init communication with CVM...\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_CVM("Try to init communication with CVM...\n", SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> /* CVM after reset sends SABM CTRL frame, let's assume that CVM already sent it, that's the reply... */
</span><span class="cx"> celliax_serial_send_ctrl_frame_CVM_BUSMAIL(p,
</span><span class="lines">@@ -6910,12 +7399,12 @@
</span><span class="cx">
</span><span class="cx"> res = celliax_serial_read_CVM_BUSMAIL(p); //we don't have no monitor neither do_controldev_thread
</span><span class="cx">
</span><del>- DEBUGA_CVM("celliax_serial_read_CVM_BUSMAIL res= %X, expected %X\n", CELLIAX_P_LOG, res,
</del><ins>+ DEBUGA_CVM("celliax_serial_read_CVM_BUSMAIL res= %X, expected %X\n", SKYPIAX_P_LOG, res,
</ins><span class="cx"> (BUSMAIL_HEADER_CTRL_FRAME | BUSMAIL_HEADER_CTRL_UN_FRAME |
</span><span class="cx"> BUSMAIL_HEADER_SABM));
</span><span class="cx">
</span><span class="cx"> if (res == -1) {
</span><del>- ERRORA("failed celliax_serial_read_CVM_BUSMAIL\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("failed celliax_serial_read_CVM_BUSMAIL\n", SKYPIAX_P_LOG);
</ins><span class="cx"> CVM_UNLOCKA(&p->controldev_lock);
</span><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="lines">@@ -6931,25 +7420,25 @@
</span><span class="cx"> how_many_reads++;
</span><span class="cx">
</span><span class="cx"> if (res == -1) {
</span><del>- ERRORA("failed celliax_serial_read_CVM_BUSMAIL\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("failed celliax_serial_read_CVM_BUSMAIL\n", SKYPIAX_P_LOG);
</ins><span class="cx"> CVM_UNLOCKA(&p->controldev_lock);
</span><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (how_many_reads > 10) {
</span><del>- ERRORA("no expected results in %d celliax_serial_read_CVM_BUSMAIL\n", CELLIAX_P_LOG,
</del><ins>+ ERRORA("no expected results in %d celliax_serial_read_CVM_BUSMAIL\n", SKYPIAX_P_LOG,
</ins><span class="cx"> how_many_reads);
</span><span class="cx">
</span><del>- ERRORA("Unable to initialize cmmunication with CVM...\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("Unable to initialize cmmunication with CVM...\n", SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> CVM_UNLOCKA(&p->controldev_lock);
</span><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- DEBUGA_CVM("Communication with CVM initialized successfully...\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_CVM("Communication with CVM initialized successfully...\n", SKYPIAX_P_LOG);
</ins><span class="cx">
</span><del>- DEBUGA_CVM("Attempt to lock to FP...\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_CVM("Attempt to lock to FP...\n", SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> /* Try to connect to FP, try to lock to FP, maybe we registered with it in the past... */
</span><span class="cx"> /* CVM can hold up to 2 subscriptions in its EEPROM, celliax.conf contains number we should try */
</span><span class="lines">@@ -6963,7 +7452,7 @@
</span><span class="cx"> res = celliax_serial_read_CVM_BUSMAIL(p); //we don't have no monitor neither do_controldev_thread
</span><span class="cx">
</span><span class="cx"> if (res == -1) {
</span><del>- ERRORA("failed celliax_serial_read_CVM_BUSMAIL\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("failed celliax_serial_read_CVM_BUSMAIL\n", SKYPIAX_P_LOG);
</ins><span class="cx"> CVM_UNLOCKA(&p->controldev_lock);
</span><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="lines">@@ -6975,7 +7464,7 @@
</span><span class="cx"> /*
</span><span class="cx"> if (0 == (how_many_reads % 10))
</span><span class="cx"> {
</span><del>- DEBUGA_CVM("Attempt to lock to FP... %d\n", CELLIAX_P_LOG, how_many_reads/10 );
</del><ins>+ DEBUGA_CVM("Attempt to lock to FP... %d\n", SKYPIAX_P_LOG, how_many_reads/10 );
</ins><span class="cx"> celliax_serial_send_info_frame_CVM_BUSMAIL(p, API_PP_LOCK_REQ, sizeof(SubcriptionNo) ,&SubcriptionNo);
</span><span class="cx"> }
</span><span class="cx"> */
</span><span class="lines">@@ -6986,24 +7475,24 @@
</span><span class="cx"> how_many_reads++;
</span><span class="cx">
</span><span class="cx"> if (res == -1) {
</span><del>- ERRORA("failed celliax_serial_read_CVM_BUSMAIL\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("failed celliax_serial_read_CVM_BUSMAIL\n", SKYPIAX_P_LOG);
</ins><span class="cx"> CVM_UNLOCKA(&p->controldev_lock);
</span><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (how_many_reads > 50) {
</span><del>- ERRORA("no expected results in %d celliax_serial_read_CVM_BUSMAIL\n", CELLIAX_P_LOG,
</del><ins>+ ERRORA("no expected results in %d celliax_serial_read_CVM_BUSMAIL\n", SKYPIAX_P_LOG,
</ins><span class="cx"> how_many_reads);
</span><span class="cx">
</span><del>- ERRORA("Unable to lock to FP...\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("Unable to lock to FP...\n", SKYPIAX_P_LOG);
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (CVM_LOCKED_TO_FP == p->cvm_lock_state) {
</span><del>- DEBUGA_CVM("CVM locked to FP successfully...\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_CVM("CVM locked to FP successfully...\n", SKYPIAX_P_LOG);
</ins><span class="cx"> } else {
</span><del>- DEBUGA_CVM("Lock to FP failed, Attempt to register to FP...\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_CVM("Lock to FP failed, Attempt to register to FP...\n", SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> RegistartionData[0] = SubcriptionNo;
</span><span class="cx"> RegistartionData[1] = 0xFF;
</span><span class="lines">@@ -7034,7 +7523,7 @@
</span><span class="cx"> res = celliax_serial_read_CVM_BUSMAIL(p); //we don't have no monitor neither do_controldev_thread
</span><span class="cx">
</span><span class="cx"> if (res == -1) {
</span><del>- ERRORA("failed celliax_serial_read_CVM_BUSMAIL\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("failed celliax_serial_read_CVM_BUSMAIL\n", SKYPIAX_P_LOG);
</ins><span class="cx"> CVM_UNLOCKA(&p->controldev_lock);
</span><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="lines">@@ -7044,7 +7533,7 @@
</span><span class="cx"> while (CVM_UNKNOWN_REGISTER_STATE == p->cvm_register_state) {
</span><span class="cx">
</span><span class="cx"> if (0 == (how_many_reads % 50)) {
</span><del>- DEBUGA_CVM("Attempt to register to FP... %d\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_CVM("Attempt to register to FP... %d\n", SKYPIAX_P_LOG,
</ins><span class="cx"> how_many_reads / 10);
</span><span class="cx"> celliax_serial_send_info_frame_CVM_BUSMAIL(p, API_PP_ACCESS_RIGHTS_REQ,
</span><span class="cx"> sizeof(RegistartionData),
</span><span class="lines">@@ -7057,16 +7546,16 @@
</span><span class="cx"> how_many_reads++;
</span><span class="cx">
</span><span class="cx"> if (res == -1) {
</span><del>- ERRORA("failed celliax_serial_read_CVM_BUSMAIL\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("failed celliax_serial_read_CVM_BUSMAIL\n", SKYPIAX_P_LOG);
</ins><span class="cx"> CVM_UNLOCKA(&p->controldev_lock);
</span><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (how_many_reads > 300) {
</span><span class="cx"> ERRORA("no expected results in %d celliax_serial_read_CVM_BUSMAIL\n",
</span><del>- CELLIAX_P_LOG, how_many_reads);
</del><ins>+ SKYPIAX_P_LOG, how_many_reads);
</ins><span class="cx">
</span><del>- ERRORA("Unable to communication with CVM...\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("Unable to communication with CVM...\n", SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> CVM_UNLOCKA(&p->controldev_lock);
</span><span class="cx"> return -1;
</span><span class="lines">@@ -7074,14 +7563,14 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (CVM_REGISTERED_TO_FP != p->cvm_register_state) {
</span><del>- ERRORA("Unable to register to FP...\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("Unable to register to FP...\n", SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> CVM_UNLOCKA(&p->controldev_lock);
</span><span class="cx"> return -1;
</span><span class="cx">
</span><span class="cx"> } else {
</span><del>- DEBUGA_CVM("CVM registered to FP successfully...\n", CELLIAX_P_LOG);
- DEBUGA_CVM("Attempt to lock to FP...\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_CVM("CVM registered to FP successfully...\n", SKYPIAX_P_LOG);
+ DEBUGA_CVM("Attempt to lock to FP...\n", SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> /* Try to connect to FP, try to lock to FP, maybe we registered with it in the past... */
</span><span class="cx"> /* CVM can hold up to 2 subscriptions in its EEPROM, celliax.conf contains number we should try */
</span><span class="lines">@@ -7095,7 +7584,7 @@
</span><span class="cx"> res = celliax_serial_read_CVM_BUSMAIL(p); //we don't have no monitor neither do_controldev_thread
</span><span class="cx">
</span><span class="cx"> if (res == -1) {
</span><del>- ERRORA("failed celliax_serial_read_CVM_BUSMAIL\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("failed celliax_serial_read_CVM_BUSMAIL\n", SKYPIAX_P_LOG);
</ins><span class="cx"> CVM_UNLOCKA(&p->controldev_lock);
</span><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="lines">@@ -7105,7 +7594,7 @@
</span><span class="cx"> while (CVM_UNKNOWN_LOCK_STATE == p->cvm_lock_state) {
</span><span class="cx">
</span><span class="cx"> if (0 == (how_many_reads % 10)) {
</span><del>- DEBUGA_CVM("Attempt to lock to FP... %d\n", CELLIAX_P_LOG, how_many_reads / 10);
</del><ins>+ DEBUGA_CVM("Attempt to lock to FP... %d\n", SKYPIAX_P_LOG, how_many_reads / 10);
</ins><span class="cx"> celliax_serial_send_info_frame_CVM_BUSMAIL(p, API_PP_ACCESS_RIGHTS_REQ,
</span><span class="cx"> sizeof(RegistartionData),
</span><span class="cx"> RegistartionData);
</span><span class="lines">@@ -7116,16 +7605,16 @@
</span><span class="cx"> how_many_reads++;
</span><span class="cx">
</span><span class="cx"> if (res == -1) {
</span><del>- ERRORA("failed celliax_serial_read_CVM_BUSMAIL\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("failed celliax_serial_read_CVM_BUSMAIL\n", SKYPIAX_P_LOG);
</ins><span class="cx"> CVM_UNLOCKA(&p->controldev_lock);
</span><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (how_many_reads > 100) {
</span><span class="cx"> ERRORA("no expected results in %d celliax_serial_read_CVM_BUSMAIL\n",
</span><del>- CELLIAX_P_LOG, how_many_reads);
</del><ins>+ SKYPIAX_P_LOG, how_many_reads);
</ins><span class="cx">
</span><del>- ERRORA("Unable to communication with CVM...\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("Unable to communication with CVM...\n", SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> CVM_UNLOCKA(&p->controldev_lock);
</span><span class="cx"> return -1;
</span><span class="lines">@@ -7133,12 +7622,12 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (CVM_LOCKED_TO_FP != p->cvm_lock_state) {
</span><del>- ERRORA("Unable to lock to FP...\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("Unable to lock to FP...\n", SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> CVM_UNLOCKA(&p->controldev_lock);
</span><span class="cx"> return -1;
</span><span class="cx"> } else {
</span><del>- DEBUGA_CVM("CVM locked to FP successfully...\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_CVM("CVM locked to FP successfully...\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -7151,7 +7640,7 @@
</span><span class="cx">
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int celliax_serial_read_CVM_BUSMAIL(struct celliax_pvt *p)
</del><ins>+int celliax_serial_read_CVM_BUSMAIL(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx"> int read_count;
</span><span class="cx"> int select_err;
</span><span class="lines">@@ -7190,7 +7679,7 @@
</span><span class="cx"> if (read_count == 0) {
</span><span class="cx"> ERRORA
</span><span class="cx"> ("read 0 bytes!!! Nenormalno! Marking this celliax_serial_device %s as dead, andif it is owned by a channel, hanging up. Maybe the CVM is stuck, switched off or power down.\n",
</span><del>- CELLIAX_P_LOG, p->controldevice_name);
</del><ins>+ SKYPIAX_P_LOG, p->controldevice_name);
</ins><span class="cx">
</span><span class="cx"> p->controldev_dead = 1;
</span><span class="cx"> close(p->controldevfd);
</span><span class="lines">@@ -7213,7 +7702,7 @@
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- DEBUGA_CVM("%s READ AT seconds=%ld usec=%6ld read_count=%d\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_CVM("%s READ AT seconds=%ld usec=%6ld read_count=%d\n", SKYPIAX_P_LOG,
</ins><span class="cx"> debug_buf, p->cvm_busmail_list_tv.tv_sec,
</span><span class="cx"> p->cvm_busmail_list_tv.tv_usec, read_count);
</span><span class="cx"> }
</span><span class="lines">@@ -7255,7 +7744,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> DEBUGA_CVM("%s was received, Starting to categorize this frame\n",
</span><del>- CELLIAX_P_LOG, debug_buf);
</del><ins>+ SKYPIAX_P_LOG, debug_buf);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> int known = 0;
</span><span class="lines">@@ -7272,11 +7761,11 @@
</span><span class="cx">
</span><span class="cx"> if (busmail_crc != MsgCrc) {
</span><span class="cx"> WARNINGA("BUSMAIL MSG CRC FAILED!, MsgCrc %.2X, calcd %.2X, dropping frame\n",
</span><del>- CELLIAX_P_LOG, MsgCrc, busmail_crc);
</del><ins>+ SKYPIAX_P_LOG, MsgCrc, busmail_crc);
</ins><span class="cx"> } else {
</span><span class="cx"> /* first step in categorizing frames, look at the general kind of frame, in p->array[BUSMAIL_OFFSET_HEADER] */
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_CVM("BUSMAIL MSG CRC, MsgCrc %.2X, calcd %.2X...\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_CVM("BUSMAIL MSG CRC, MsgCrc %.2X, calcd %.2X...\n", SKYPIAX_P_LOG,
</ins><span class="cx"> MsgCrc, busmail_crc);
</span><span class="cx">
</span><span class="cx"> MsgHeader = p->array[BUSMAIL_OFFSET_HEADER];
</span><span class="lines">@@ -7290,14 +7779,14 @@
</span><span class="cx">
</span><span class="cx"> if (option_debug > 1)
</span><span class="cx"> DEBUGA_CVM("BUSMAIL_HEADER_INFO_FRAME TxSeq %X, RxSeq %X\n",
</span><del>- CELLIAX_P_LOG, MsgTxSeqNo, MsgRxSeqNo);
</del><ins>+ SKYPIAX_P_LOG, MsgTxSeqNo, MsgRxSeqNo);
</ins><span class="cx">
</span><span class="cx"> if (((p->busmail_rxseq_cvm_last + 1) & 0x7) != MsgTxSeqNo) {
</span><span class="cx"> /* some CVM frames are missing, TxSeq of this frame is higher then expected */
</span><span class="cx"> /* reject, I expected p->busmail_rxseq_cvm_last + 1, resend it to me, please */
</span><span class="cx">
</span><span class="cx"> WARNINGA("CVM TxSeq %X, does not match expected value %X\n",
</span><del>- CELLIAX_P_LOG, MsgTxSeqNo,
</del><ins>+ SKYPIAX_P_LOG, MsgTxSeqNo,
</ins><span class="cx"> (p->busmail_rxseq_cvm_last + 1) & 0x7);
</span><span class="cx">
</span><span class="cx"> // celliax_serial_send_ctrl_frame_CVM_BUSMAIL(p, BUSMAIL_HEADER_CTRL_FRAME | BUSMAIL_HEADER_CTRL_SU_FRAME | BUSMAIL_HEADER_SUID_REJ);
</span><span class="lines">@@ -7306,7 +7795,7 @@
</span><span class="cx">
</span><span class="cx"> WARNINGA
</span><span class="cx"> ("It looks like our ACK to this frame was MIA :), lets ACK the frame one more time...\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> /* if the frame we received informs us that other side is waiting for ACK, let's ACK it */
</span><span class="cx"> /* even if it is unknown to us */
</span><span class="lines">@@ -7365,14 +7854,14 @@
</span><span class="cx"> if (option_debug > 1)
</span><span class="cx"> DEBUGA_CVM
</span><span class="cx"> ("BUSMAIL_HEADER_INFO_FRAME ProgId %X, TaskId %X, Primitive %X %X\n",
</span><del>- CELLIAX_P_LOG, MsgProgId, MsgTaskId, MsgPrimitiveMSB, MsgPrimitiveLSB);
</del><ins>+ SKYPIAX_P_LOG, MsgProgId, MsgTaskId, MsgPrimitiveMSB, MsgPrimitiveLSB);
</ins><span class="cx">
</span><span class="cx"> switch (MsgPrimitive) {
</span><span class="cx">
</span><span class="cx"> case API_PP_ACCESS_RIGHTS_REJ:
</span><span class="cx"> /* FP rejected our registration... */
</span><span class="cx"> WARNINGA("API_PP_ACCESS_RIGHTS_REJ, FP rejected our registration...\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> p->cvm_register_state = CVM_UNREGISTERED_TO_FP;
</span><span class="cx"> p->cvm_lock_state = CVM_UNKNOWN_LOCK_STATE;
</span><span class="lines">@@ -7384,7 +7873,7 @@
</span><span class="cx"> if (option_debug > 1)
</span><span class="cx"> DEBUGA_CVM
</span><span class="cx"> ("API_PP_ACCESS_RIGHTS_CFM, FP accepted our registration...\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> p->cvm_register_state = CVM_REGISTERED_TO_FP;
</span><span class="cx"> p->cvm_lock_state = CVM_UNKNOWN_LOCK_STATE;
</span><span class="lines">@@ -7394,7 +7883,7 @@
</span><span class="cx"> if (option_debug > 1)
</span><span class="cx"> DEBUGA_CVM
</span><span class="cx"> ("API_PP_ACCESS_RIGHTS_CFM, FP accepted our registration, Our handset no. is %d, CVM? %X\n",
</span><del>- CELLIAX_P_LOG, p->cvm_handset_no, p->cvm_fp_is_cvm);
</del><ins>+ SKYPIAX_P_LOG, p->cvm_handset_no, p->cvm_fp_is_cvm);
</ins><span class="cx">
</span><span class="cx"> known = 1;
</span><span class="cx"> break;
</span><span class="lines">@@ -7403,7 +7892,7 @@
</span><span class="cx"> /* CVM is connected to FP */
</span><span class="cx"> if (option_debug > 1)
</span><span class="cx"> DEBUGA_CVM("API_PP_LOCKED_IND, Connection to FP completed...\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> p->cvm_register_state = CVM_REGISTERED_TO_FP;
</span><span class="cx"> p->cvm_lock_state = CVM_LOCKED_TO_FP;
</span><span class="lines">@@ -7414,7 +7903,7 @@
</span><span class="cx"> /* CVM is unlocked with FP, Out of service */
</span><span class="cx"> WARNINGA
</span><span class="cx"> ("API_PP_UNLOCKED_IND, CVM is unlocked with FP, Out of service !!!\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> p->cvm_lock_state = CVM_UNLOCKED_TO_FP;
</span><span class="cx"> known = 1;
</span><span class="lines">@@ -7425,7 +7914,7 @@
</span><span class="cx"> if (option_debug > 1)
</span><span class="cx"> DEBUGA_CVM
</span><span class="cx"> ("API_PP_SETUP_ACK_IND, connection to FP established, FP is waiting for a numer to dial...\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> if (AST_STATE_DOWN == p->interface_state) {
</span><span class="cx"> p->interface_state = AST_STATE_DIALING;
</span><span class="lines">@@ -7438,7 +7927,7 @@
</span><span class="cx"> /* Outgoing call, Remote end is ringing */
</span><span class="cx"> if (option_debug > 1)
</span><span class="cx"> DEBUGA_CVM("API_PP_ALERT_IND, remote end is ringing...\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> if (AST_STATE_DIALING == p->interface_state) {
</span><span class="cx"> p->interface_state = AST_STATE_RINGING;
</span><span class="lines">@@ -7451,7 +7940,7 @@
</span><span class="cx"> /* Outgoing call, the remote end answered our call */
</span><span class="cx"> if (option_debug > 1)
</span><span class="cx"> DEBUGA_CVM("API_PP_CONNECT_IND, our call was answered...\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> if (AST_STATE_RINGING == p->interface_state) {
</span><span class="cx">
</span><span class="lines">@@ -7486,13 +7975,13 @@
</span><span class="cx"> if (option_debug > 1)
</span><span class="cx"> DEBUGA_CVM
</span><span class="cx"> ("API_PP_REJECT_IND, FP or ther PP rejected our connection...\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> if (AST_STATE_RING == p->interface_state && p->owner) {
</span><span class="cx"> /* Attempt to answer incoming call rejected by FP or PP */
</span><span class="cx"> if (option_debug > 1)
</span><span class="cx"> DEBUGA_CVM("Was it PAGE_ALL CALL, that we should not answered?\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> p->interface_state = AST_STATE_DOWN;
</span><span class="cx"> celliax_queue_control(p->owner, AST_CONTROL_HANGUP);
</span><span class="lines">@@ -7511,7 +8000,7 @@
</span><span class="cx"> /* Ringback, ignore it... */
</span><span class="cx"> if (option_debug > 1)
</span><span class="cx"> DEBUGA_CVM("API_PP_SIGNAL_ON_IND, Ringback, ignore it...\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> known = 1;
</span><span class="cx"> break;
</span><span class="lines">@@ -7520,7 +8009,7 @@
</span><span class="cx"> /* Ringback, ignore it... */
</span><span class="cx"> if (option_debug > 1)
</span><span class="cx"> DEBUGA_CVM("API_PP_SIGNAL_OFF_IND, Ringback, ignore it...\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> known = 1;
</span><span class="cx"> break;
</span><span class="lines">@@ -7530,14 +8019,14 @@
</span><span class="cx">
</span><span class="cx"> if (option_debug > 1)
</span><span class="cx"> DEBUGA_CVM("API_PP_SETUP_IND, somebody is calling us...\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> if (AST_STATE_DOWN == p->interface_state) {
</span><span class="cx">
</span><span class="cx"> if (API_PP_SETUP_IND_CALL_INT ==
</span><span class="cx"> p->array[BUSMAIL_OFFSET_MAIL_PARAMS +
</span><span class="cx"> API_PP_SETUP_IND_CALL_TYPE_OFFSET]) {
</span><del>- DEBUGA_CVM("INTERNAL CALL, receive it...\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_CVM("INTERNAL CALL, receive it...\n", SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> p->interface_state = AST_STATE_RING;
</span><span class="cx">
</span><span class="lines">@@ -7552,7 +8041,7 @@
</span><span class="cx">
</span><span class="cx"> } else {
</span><span class="cx"> DEBUGA_CVM("NOT an INTERNAL CALL, CALL TYPE %X, just ignore it...\n",
</span><del>- CELLIAX_P_LOG,
</del><ins>+ SKYPIAX_P_LOG,
</ins><span class="cx"> p->array[BUSMAIL_OFFSET_MAIL_PARAMS +
</span><span class="cx"> API_PP_SETUP_IND_CALL_TYPE_OFFSET]);
</span><span class="cx">
</span><span class="lines">@@ -7565,7 +8054,7 @@
</span><span class="cx"> } else {
</span><span class="cx"> WARNINGA
</span><span class="cx"> ("Ignore incoming call, Wrong interface state, current state %X\n",
</span><del>- CELLIAX_P_LOG, p->interface_state);
</del><ins>+ SKYPIAX_P_LOG, p->interface_state);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> known = 1;
</span><span class="lines">@@ -7576,7 +8065,7 @@
</span><span class="cx"> if (option_debug > 1)
</span><span class="cx"> DEBUGA_CVM
</span><span class="cx"> ("API_PP_ALERT_OFF_IND, Ringback, stop alerting about incoming call...\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> known = 1;
</span><span class="cx"> break;
</span><span class="lines">@@ -7586,10 +8075,10 @@
</span><span class="cx"> if (option_debug > 1)
</span><span class="cx"> DEBUGA_CVM
</span><span class="cx"> ("API_PP_ALERT_ON_IND, Ringback, start alerting about incoming call...\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx"> /*
</span><span class="cx"> if (AST_STATE_DOWN == p->interface_state) {
</span><del>- DEBUGA_CVM("Somebody is calling us, we see a PP_ALERT_ON_IND, receive it...\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_CVM("Somebody is calling us, we see a PP_ALERT_ON_IND, receive it...\n", SKYPIAX_P_LOG);
</ins><span class="cx"> p->interface_state = AST_STATE_RING;
</span><span class="cx"> }
</span><span class="cx"> */
</span><span class="lines">@@ -7601,7 +8090,7 @@
</span><span class="cx"> if (option_debug > 1)
</span><span class="cx"> DEBUGA_CVM
</span><span class="cx"> ("API_PP_CONNECT_CFM, Confirmation for request to answer incoming call...\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> if (AST_STATE_RING == p->interface_state && p->owner) {
</span><span class="cx">
</span><span class="lines">@@ -7632,7 +8121,7 @@
</span><span class="cx"> } else {
</span><span class="cx"> WARNINGA
</span><span class="cx"> ("Ignore connection cfm, Wrong interface state, current state %X\n",
</span><del>- CELLIAX_P_LOG, p->interface_state);
</del><ins>+ SKYPIAX_P_LOG, p->interface_state);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> known = 1;
</span><span class="lines">@@ -7643,7 +8132,7 @@
</span><span class="cx"> if (option_debug > 1)
</span><span class="cx"> DEBUGA_CVM
</span><span class="cx"> ("API_PP_RELEASE_CFM, Confirmation for request to hangup a call..\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> if (AST_STATE_UP == p->interface_state) {
</span><span class="cx"> /* let's close audio */
</span><span class="lines">@@ -7664,7 +8153,7 @@
</span><span class="cx"> /* FP releases connection to CVM... */
</span><span class="cx"> if (option_debug > 1)
</span><span class="cx"> DEBUGA_CVM("API_PP_RELEASE_IND, FP releases connection to CVM...\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> if (AST_STATE_UP == p->interface_state && p->owner) {
</span><span class="cx"> /* let's close audio */
</span><span class="lines">@@ -7676,7 +8165,7 @@
</span><span class="cx"> } else if (AST_STATE_RING == p->interface_state && p->owner) {
</span><span class="cx"> /* workaround for PAGE ALL CALL, FIXME!!!! */
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_CVM("WAS IT A PAGE ALL ???...\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_CVM("WAS IT A PAGE ALL ???...\n", SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> p->interface_state = AST_STATE_UP;
</span><span class="cx"> usleep(100000);
</span><span class="lines">@@ -7694,18 +8183,18 @@
</span><span class="cx">
</span><span class="cx"> case API_PP_READ_RSSI_CFM:
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_CVM("API_PP_READ_RSSI_CFM, RSSI readout...\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_CVM("API_PP_READ_RSSI_CFM, RSSI readout...\n", SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> p->cvm_rssi = p->array[BUSMAIL_OFFSET_MAIL_PARAMS + 0];
</span><span class="cx"> int rssi_percent = p->cvm_rssi * 100 / 0x3F;
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_CVM("RSSI is %X, %d%%...\n", CELLIAX_P_LOG, p->cvm_rssi,
</del><ins>+ DEBUGA_CVM("RSSI is %X, %d%%...\n", SKYPIAX_P_LOG, p->cvm_rssi,
</ins><span class="cx"> rssi_percent);
</span><span class="cx">
</span><span class="cx"> known = 1;
</span><span class="cx"> break;
</span><span class="cx"> default:
</span><del>- WARNINGA("UNKNOWN MsgPrimitive!!! %X\n", CELLIAX_P_LOG, MsgPrimitive);
</del><ins>+ WARNINGA("UNKNOWN MsgPrimitive!!! %X\n", SKYPIAX_P_LOG, MsgPrimitive);
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -7713,12 +8202,12 @@
</span><span class="cx">
</span><span class="cx"> case BUSMAIL_HEADER_CTRL_FRAME:
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_CVM("BUSMAIL_HEADER_CTRL_FRAME\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_CVM("BUSMAIL_HEADER_CTRL_FRAME\n", SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> switch (p->array[BUSMAIL_OFFSET_HEADER] & BUSMAIL_HEADER_SU_BIT_MASK) {
</span><span class="cx"> case BUSMAIL_HEADER_CTRL_SU_FRAME:
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_CVM("BUSMAIL_HEADER_CTRL_SU_FRAME\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_CVM("BUSMAIL_HEADER_CTRL_SU_FRAME\n", SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> switch (p->array[BUSMAIL_OFFSET_HEADER] & BUSMAIL_HEADER_SUID_MASK) {
</span><span class="cx"> case BUSMAIL_HEADER_SUID_REJ:
</span><span class="lines">@@ -7727,7 +8216,7 @@
</span><span class="cx"> ((p->array[BUSMAIL_OFFSET_HEADER] & BUSMAIL_HEADER_RXSEQ_MASK));
</span><span class="cx">
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_CVM("BUSMAIL_HEADER_SUID_REJ, RxSeq %X\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_CVM("BUSMAIL_HEADER_SUID_REJ, RxSeq %X\n", SKYPIAX_P_LOG,
</ins><span class="cx"> MsgRxSeqNo);
</span><span class="cx">
</span><span class="cx"> /* Even that it is CVM Reject packet, it still ACKs some packets */
</span><span class="lines">@@ -7741,7 +8230,7 @@
</span><span class="cx"> ((p->array[BUSMAIL_OFFSET_HEADER] & BUSMAIL_HEADER_RXSEQ_MASK));
</span><span class="cx">
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_CVM("BUSMAIL_HEADER_SUID_RNR, RxSeq %X\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_CVM("BUSMAIL_HEADER_SUID_RNR, RxSeq %X\n", SKYPIAX_P_LOG,
</ins><span class="cx"> MsgRxSeqNo);
</span><span class="cx">
</span><span class="cx"> known = 1;
</span><span class="lines">@@ -7752,7 +8241,7 @@
</span><span class="cx"> ((p->array[BUSMAIL_OFFSET_HEADER] & BUSMAIL_HEADER_RXSEQ_MASK));
</span><span class="cx">
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_CVM("BUSMAIL_HEADER_SUID_RR, RxSeq %X\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_CVM("BUSMAIL_HEADER_SUID_RR, RxSeq %X\n", SKYPIAX_P_LOG,
</ins><span class="cx"> MsgRxSeqNo);
</span><span class="cx">
</span><span class="cx"> /* CVM ACKed our frames with RR frame */
</span><span class="lines">@@ -7762,20 +8251,20 @@
</span><span class="cx"> break;
</span><span class="cx">
</span><span class="cx"> default:
</span><del>- WARNINGA("BUSMAIL_HEADER_SUID_UNKNOWN!!!\n", CELLIAX_P_LOG);
</del><ins>+ WARNINGA("BUSMAIL_HEADER_SUID_UNKNOWN!!!\n", SKYPIAX_P_LOG);
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> break;
</span><span class="cx">
</span><span class="cx"> case BUSMAIL_HEADER_CTRL_UN_FRAME:
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_CVM("BUSMAIL_HEADER_CTRL_UN_FRAME\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_CVM("BUSMAIL_HEADER_CTRL_UN_FRAME\n", SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> switch (p->array[BUSMAIL_OFFSET_HEADER] & BUSMAIL_HEADER_UNID_MASK) {
</span><span class="cx">
</span><span class="cx"> case BUSMAIL_HEADER_UNID_SABM:
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_CVM("BUSMAIL_HEADER_UNID_SABM\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_CVM("BUSMAIL_HEADER_UNID_SABM\n", SKYPIAX_P_LOG);
</ins><span class="cx"> /* reset seq counters */
</span><span class="cx"> p->busmail_txseq_celliax_last = 0xFF;
</span><span class="cx"> p->busmail_rxseq_cvm_last = 0xFF;
</span><span class="lines">@@ -7786,19 +8275,19 @@
</span><span class="cx"> break;
</span><span class="cx">
</span><span class="cx"> default:
</span><del>- WARNINGA("BUSMAIL_HEADER_UNID_UNKNOWN!!!\n", CELLIAX_P_LOG);
</del><ins>+ WARNINGA("BUSMAIL_HEADER_UNID_UNKNOWN!!!\n", SKYPIAX_P_LOG);
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> break;
</span><span class="cx">
</span><span class="cx"> default:
</span><del>- WARNINGA("BUSMAIL_HEADER_CTRL_UNKNOWN!!!\n", CELLIAX_P_LOG);
</del><ins>+ WARNINGA("BUSMAIL_HEADER_CTRL_UNKNOWN!!!\n", SKYPIAX_P_LOG);
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> break;
</span><span class="cx">
</span><span class="cx"> default:
</span><del>- WARNINGA("BUSMAIL_HEADER_UNKNOWN!!!\n", CELLIAX_P_LOG);
</del><ins>+ WARNINGA("BUSMAIL_HEADER_UNKNOWN!!!\n", SKYPIAX_P_LOG);
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -7806,7 +8295,7 @@
</span><span class="cx">
</span><span class="cx"> /* categorization of frame is ended, if it has not been recognized, whine */
</span><span class="cx"> if (!known) {
</span><del>- WARNINGA("BUSMAIL MSG UNKNOWN or REJECTED!\n", CELLIAX_P_LOG);
</del><ins>+ WARNINGA("BUSMAIL MSG UNKNOWN or REJECTED!\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> p->arraycounter++;
</span><span class="lines">@@ -7821,7 +8310,7 @@
</span><span class="cx"> if (errno != EINTR) {
</span><span class="cx"> ERRORA
</span><span class="cx"> ("select returned -1 on %s, marking controldev as dead, errno was: %d, error was: %s\n",
</span><del>- CELLIAX_P_LOG, p->controldevice_name, errno, strerror(errno));
</del><ins>+ SKYPIAX_P_LOG, p->controldevice_name, errno, strerror(errno));
</ins><span class="cx">
</span><span class="cx"> p->controldev_dead = 1;
</span><span class="cx"> close(p->controldevfd);
</span><span class="lines">@@ -7832,20 +8321,20 @@
</span><span class="cx">
</span><span class="cx"> } else {
</span><span class="cx"> WARNINGA("select returned -1 on %s, errno was: %d, EINTR, error was: %s\n",
</span><del>- CELLIAX_P_LOG, p->controldevice_name, errno, strerror(errno));
</del><ins>+ SKYPIAX_P_LOG, p->controldevice_name, errno, strerror(errno));
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> /* OK, reading done, let's browse the list of pending frames to be sent, and act on it */
</span><span class="cx"> if (celliax_serial_send_if_time_CVM_BUSMAIL(p)) {
</span><del>- ERRORA("celliax_serial_send_if_time_CVM_BUSMAIL failed!\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("celliax_serial_send_if_time_CVM_BUSMAIL failed!\n", SKYPIAX_P_LOG);
</ins><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return cvm_busmail_mesg; //FIXME breaks the convention of returning 0 on success
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int celliax_serial_getstatus_CVM_BUSMAIL(struct celliax_pvt *p)
</del><ins>+int celliax_serial_getstatus_CVM_BUSMAIL(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx"> int res;
</span><span class="cx"> int how_many_reads = 0;
</span><span class="lines">@@ -7854,7 +8343,7 @@
</span><span class="cx"> CVM_LOKKA(&p->controldev_lock);
</span><span class="cx">
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_CVM("Sending RR CTRL frame wit PF bit set\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_CVM("Sending RR CTRL frame wit PF bit set\n", SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> /* this ctrl frame can be used as low level keep alive */
</span><span class="cx"> celliax_serial_send_ctrl_frame_CVM_BUSMAIL(p,
</span><span class="lines">@@ -7868,7 +8357,7 @@
</span><span class="cx"> res = celliax_serial_read_CVM_BUSMAIL(p); //we don't have no monitor neither do_controldev_thread
</span><span class="cx">
</span><span class="cx"> if (res == -1) {
</span><del>- ERRORA("failed celliax_serial_read_CVM_BUSMAIL\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("failed celliax_serial_read_CVM_BUSMAIL\n", SKYPIAX_P_LOG);
</ins><span class="cx"> CVM_UNLOCKA(&p->controldev_lock);
</span><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="lines">@@ -7882,13 +8371,13 @@
</span><span class="cx"> how_many_reads++;
</span><span class="cx">
</span><span class="cx"> if (res == -1) {
</span><del>- ERRORA("failed celliax_serial_read_CVM_BUSMAIL\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("failed celliax_serial_read_CVM_BUSMAIL\n", SKYPIAX_P_LOG);
</ins><span class="cx"> CVM_UNLOCKA(&p->controldev_lock);
</span><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (how_many_reads > 10) {
</span><del>- ERRORA("no expected results in %d celliax_serial_read_CVM_BUSMAIL\n", CELLIAX_P_LOG,
</del><ins>+ ERRORA("no expected results in %d celliax_serial_read_CVM_BUSMAIL\n", SKYPIAX_P_LOG,
</ins><span class="cx"> how_many_reads);
</span><span class="cx"> CVM_UNLOCKA(&p->controldev_lock);
</span><span class="cx"> return -1;
</span><span class="lines">@@ -7915,7 +8404,7 @@
</span><span class="cx"> * \return the number of chars written on the serial,
</span><span class="cx"> * that can be different from len (or negative) in case of errors.
</span><span class="cx"> */
</span><del>-int celliax_serial_send_CVM_BUSMAIL(struct celliax_pvt *p, int len,
</del><ins>+int celliax_serial_send_CVM_BUSMAIL(private_t * tech_pvt, int len,
</ins><span class="cx"> unsigned char *mesg_ptr)
</span><span class="cx"> {
</span><span class="cx"> int ret;
</span><span class="lines">@@ -7929,7 +8418,7 @@
</span><span class="cx"> continue;
</span><span class="cx"> if (ret < 0) {
</span><span class="cx"> if (actual != len)
</span><del>- ERRORA("celliax_serial_write error: %s", CELLIAX_P_LOG, strerror(errno));
</del><ins>+ ERRORA("celliax_serial_write error: %s", SKYPIAX_P_LOG, strerror(errno));
</ins><span class="cx"> CVM_UNLOCKA(&p->controldev_lock);
</span><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="lines">@@ -7959,7 +8448,7 @@
</span><span class="cx"> if (debug_buf_pos > ((char *) &debug_buf + 1000))
</span><span class="cx"> break;
</span><span class="cx"> }
</span><del>- DEBUGA_CVM("%s was sent down the wire\n", CELLIAX_P_LOG, debug_buf);
</del><ins>+ DEBUGA_CVM("%s was sent down the wire\n", SKYPIAX_P_LOG, debug_buf);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return 0;
</span><span class="lines">@@ -7977,7 +8466,7 @@
</span><span class="cx"> *
</span><span class="cx"> * \return 0 on error, 1 otherwise
</span><span class="cx"> */
</span><del>-int celliax_serial_list_acknowledge_CVM_BUSMAIL(struct celliax_pvt *p,
</del><ins>+int celliax_serial_list_acknowledge_CVM_BUSMAIL(private_t * tech_pvt,
</ins><span class="cx"> unsigned char AckTxSeqNo)
</span><span class="cx"> {
</span><span class="cx"> struct cvm_busmail_msg *ptr = NULL;
</span><span class="lines">@@ -7989,14 +8478,14 @@
</span><span class="cx"> ptr = p->cvm_busmail_outgoing_list;
</span><span class="cx">
</span><span class="cx"> if (ptr == NULL) {
</span><del>- ERRORA("cvm_busmail_outgoing_list is NULL ?\n", CELLIAX_P_LOG);
</del><ins>+ ERRORA("cvm_busmail_outgoing_list is NULL ?\n", SKYPIAX_P_LOG);
</ins><span class="cx"> return -1;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> PUSHA_UNLOCKA(&p->cvm_busmail_outgoing_list_lock);
</span><span class="cx"> CVM_LOKKA(&p->cvm_busmail_outgoing_list_lock);
</span><span class="cx"> /*
</span><del>- DEBUGA_CVM("PREFREE OUTGOING list:\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_CVM("PREFREE OUTGOING list:\n", SKYPIAX_P_LOG);
</ins><span class="cx"> celliax_serial_list_print_CVM_BUSMAIL(p, p->cvm_busmail_outgoing_list);
</span><span class="cx"> */
</span><span class="cx"> while (ptr->next != NULL)
</span><span class="lines">@@ -8013,7 +8502,7 @@
</span><span class="cx">
</span><span class="cx"> /*
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_CVM("OUTGOING LIST TxSeq is %X, RxSeq is %X\n", CELLIAX_P_LOG, MsgTxSeqNo, MsgRxSeqNo);
</del><ins>+ DEBUGA_CVM("OUTGOING LIST TxSeq is %X, RxSeq is %X\n", SKYPIAX_P_LOG, MsgTxSeqNo, MsgRxSeqNo);
</ins><span class="cx"> */
</span><span class="cx"> unsigned char TxToAck = 0;
</span><span class="cx">
</span><span class="lines">@@ -8026,7 +8515,7 @@
</span><span class="cx"> if (MsgTxSeqNo <= TxToAck) {
</span><span class="cx">
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_CVM("Msg with TxSeq=%X ACKed with CvmRxSeq=%X\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_CVM("Msg with TxSeq=%X ACKed with CvmRxSeq=%X\n", SKYPIAX_P_LOG,
</ins><span class="cx"> MsgTxSeqNo, AckTxSeqNo);
</span><span class="cx">
</span><span class="cx"> old = ptr;
</span><span class="lines">@@ -8052,7 +8541,7 @@
</span><span class="cx">
</span><span class="cx"> if ((NULL == old->next) && (NULL == old->previous)) {
</span><span class="cx"> if (option_debug > 1) {
</span><del>- DEBUGA_CVM("FREEING LAST\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_CVM("FREEING LAST\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> p->cvm_busmail_outgoing_list = NULL;
</span><span class="lines">@@ -8061,7 +8550,7 @@
</span><span class="cx">
</span><span class="cx"> /*
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_CVM("FREEING TxSeq is %X, RxSeq is %X\n", CELLIAX_P_LOG, MsgTxSeqNo, MsgRxSeqNo);
</del><ins>+ DEBUGA_CVM("FREEING TxSeq is %X, RxSeq is %X\n", SKYPIAX_P_LOG, MsgTxSeqNo, MsgRxSeqNo);
</ins><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> free(old);
</span><span class="lines">@@ -8076,7 +8565,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /*
</span><del>- DEBUGA_CVM("POSTFREE OUTGOING list:\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_CVM("POSTFREE OUTGOING list:\n", SKYPIAX_P_LOG);
</ins><span class="cx"> celliax_serial_list_print_CVM_BUSMAIL(p, p->cvm_busmail_outgoing_list);
</span><span class="cx"> */
</span><span class="cx">
</span><span class="lines">@@ -8096,7 +8585,7 @@
</span><span class="cx"> *
</span><span class="cx"> * \return 0 on error, 1 otherwise
</span><span class="cx"> */
</span><del>-int celliax_serial_send_if_time_CVM_BUSMAIL(struct celliax_pvt *p)
</del><ins>+int celliax_serial_send_if_time_CVM_BUSMAIL(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx"> struct cvm_busmail_msg *ptr;
</span><span class="cx"> struct timeval tv;
</span><span class="lines">@@ -8106,8 +8595,8 @@
</span><span class="cx"> ptr = p->cvm_busmail_outgoing_list;
</span><span class="cx">
</span><span class="cx"> if (ptr == NULL) {
</span><del>-/* ERRORA("cvm_busmail_outgoing_list is NULL ?\n", CELLIAX_P_LOG); */
- WARNINGA("cvm_busmail_outgoing_list is NULL, nothing to send...\n", CELLIAX_P_LOG);
</del><ins>+/* ERRORA("cvm_busmail_outgoing_list is NULL ?\n", SKYPIAX_P_LOG); */
+ WARNINGA("cvm_busmail_outgoing_list is NULL, nothing to send...\n", SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> /* return -1; */
</span><span class="cx"> return 0;
</span><span class="lines">@@ -8115,7 +8604,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> while (ptr->next != NULL) {
</span><del>- WARNINGA("cvm_busmail_outgoing_list->next is not null ?\n", CELLIAX_P_LOG);
</del><ins>+ WARNINGA("cvm_busmail_outgoing_list->next is not null ?\n", SKYPIAX_P_LOG);
</ins><span class="cx"> ptr = ptr->next; //FIXME what to do?
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -8150,13 +8639,13 @@
</span><span class="cx"> if ((tv.tv_sec * 1000 + tv.tv_usec / 1000) > ((ptr->tv_sec * 1000 + ptr->tv_usec / 1000) + 1000)) { //retest, maybe has been changed?
</span><span class="cx">
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_CVM("RESEND TxSeq=%X, passed %ld ms, sent %d times\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_CVM("RESEND TxSeq=%X, passed %ld ms, sent %d times\n", SKYPIAX_P_LOG,
</ins><span class="cx"> ptr->txseqno,
</span><span class="cx"> ((tv.tv_sec * 1000 + tv.tv_usec / 1000) -
</span><span class="cx"> (ptr->tv_sec * 1000 + ptr->tv_usec / 1000)), ptr->how_many_sent);
</span><span class="cx">
</span><span class="cx"> if (ptr->how_many_sent > 9) {
</span><del>- ERRORA("RESEND TxSeq=%X, passed %ld ms, sent %d times\n", CELLIAX_P_LOG,
</del><ins>+ ERRORA("RESEND TxSeq=%X, passed %ld ms, sent %d times\n", SKYPIAX_P_LOG,
</ins><span class="cx"> ptr->txseqno,
</span><span class="cx"> ((tv.tv_sec * 1000 + tv.tv_usec / 1000) -
</span><span class="cx"> (ptr->tv_sec * 1000 + ptr->tv_usec / 1000)), ptr->how_many_sent);
</span><span class="lines">@@ -8174,9 +8663,9 @@
</span><span class="cx"> ptr->how_many_sent++;
</span><span class="cx"> /*
</span><span class="cx"> if (option_debug > 1) {
</span><del>- DEBUGA_CVM("OUTGOING list:\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_CVM("OUTGOING list:\n", SKYPIAX_P_LOG);
</ins><span class="cx"> celliax_serial_list_print_CVM_BUSMAIL(p, p->cvm_busmail_outgoing_list);
</span><del>- DEBUGA_CVM("OUTGOING list END\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_CVM("OUTGOING list END\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> */
</span><span class="cx"> }
</span><span class="lines">@@ -8195,7 +8684,7 @@
</span><span class="cx"> if (ptr->sent == 0 && ptr->acknowledged == 0 && ptr->valid == 1) { //retest, maybe has been changed?
</span><span class="cx">
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_CVM("SENDING 1st TIME TxSeq=%X\n", CELLIAX_P_LOG, ptr->txseqno);
</del><ins>+ DEBUGA_CVM("SENDING 1st TIME TxSeq=%X\n", SKYPIAX_P_LOG, ptr->txseqno);
</ins><span class="cx">
</span><span class="cx"> celliax_serial_send_CVM_BUSMAIL(p, ptr->busmail_msg_len, ptr->busmail_msg_buffer);
</span><span class="cx">
</span><span class="lines">@@ -8205,9 +8694,9 @@
</span><span class="cx"> ptr->how_many_sent++;
</span><span class="cx"> /*
</span><span class="cx"> if (option_debug > 1) {
</span><del>- DEBUGA_CVM("OUTGOING list:\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_CVM("OUTGOING list:\n", SKYPIAX_P_LOG);
</ins><span class="cx"> celliax_serial_list_print_CVM_BUSMAIL(p, p->cvm_busmail_outgoing_list);
</span><del>- DEBUGA_CVM("OUTGOING list END\n", CELLIAX_P_LOG);        
</del><ins>+ DEBUGA_CVM("OUTGOING list END\n", SKYPIAX_P_LOG);        
</ins><span class="cx"> }
</span><span class="cx"> */
</span><span class="cx"> }
</span><span class="lines">@@ -8219,7 +8708,7 @@
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int celliax_serial_write_CVM_BUSMAIL(struct celliax_pvt *p,
</del><ins>+int celliax_serial_write_CVM_BUSMAIL(private_t * tech_pvt,
</ins><span class="cx"> struct cvm_busmail_frame *busmail_frame)
</span><span class="cx"> {
</span><span class="cx"> unsigned char buffer2[BUSMAIL_MAX_FRAME_LENGTH];
</span><span class="lines">@@ -8249,7 +8738,7 @@
</span><span class="cx"> sizeof(busmail_frame->busmail_mail_task_id) + 2;
</span><span class="cx">
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_CVM("INFO frame to send\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_CVM("INFO frame to send\n", SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> buffer2[BUSMAIL_OFFSET_MAIL_PROGRAM_ID] = busmail_frame->busmail_mail_program_id;
</span><span class="cx"> buffer2[BUSMAIL_OFFSET_MAIL_TASK_ID] = busmail_frame->busmail_mail_task_id;
</span><span class="lines">@@ -8281,11 +8770,11 @@
</span><span class="cx"> len = BUSMAIL_OFFSET_MAIL + sizeof(busmail_frame->busmail_crc);
</span><span class="cx">
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_CVM("CTRL frame to send\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_CVM("CTRL frame to send\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /*
</span><del>- DEBUGA_CVM("Its len=%d\n", CELLIAX_P_LOG, len);
</del><ins>+ DEBUGA_CVM("Its len=%d\n", SKYPIAX_P_LOG, len);
</ins><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> busmail_frame->busmail_len[BUSMAIL_LEN_LSB] =
</span><span class="lines">@@ -8342,17 +8831,17 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_CVM("INFO: %s was prepared to send\n", CELLIAX_P_LOG, debug_buf);
</del><ins>+ DEBUGA_CVM("INFO: %s was prepared to send\n", SKYPIAX_P_LOG, debug_buf);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (option_debug > 1) {
</span><del>- DEBUGA_CVM("OUTGOING INFO Frame TxSeq is %X, RxSeq is %X\n", CELLIAX_P_LOG,
</del><ins>+ DEBUGA_CVM("OUTGOING INFO Frame TxSeq is %X, RxSeq is %X\n", SKYPIAX_P_LOG,
</ins><span class="cx"> (buffer2[BUSMAIL_OFFSET_HEADER] & BUSMAIL_HEADER_TXSEQ_MASK) >> 4,
</span><span class="cx"> buffer2[BUSMAIL_OFFSET_HEADER] & BUSMAIL_HEADER_RXSEQ_MASK);
</span><span class="cx"> /*
</span><del>- DEBUGA_CVM("OUTGOING list:\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_CVM("OUTGOING list:\n", SKYPIAX_P_LOG);
</ins><span class="cx"> celliax_serial_list_print_CVM_BUSMAIL(p, p->cvm_busmail_outgoing_list);
</span><del>- DEBUGA_CVM("OUTGOING list END\n", CELLIAX_P_LOG); */
</del><ins>+ DEBUGA_CVM("OUTGOING list END\n", SKYPIAX_P_LOG); */
</ins><span class="cx"> }
</span><span class="cx"> p->cvm_busmail_outgoing_list->txseqno =
</span><span class="cx"> (unsigned char) (buffer2[BUSMAIL_OFFSET_HEADER] & BUSMAIL_HEADER_TXSEQ_MASK) >> 4;
</span><span class="lines">@@ -8370,7 +8859,7 @@
</span><span class="cx"> (buffer2[BUSMAIL_OFFSET_HEADER] & BUSMAIL_HEADER_REJ_MASK)) {
</span><span class="cx">
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_CVM("CTRL REJ frame...\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_CVM("CTRL REJ frame...\n", SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> if (0xFF != p->busmail_rxseq_cvm_last) {
</span><span class="cx"> buffer2[BUSMAIL_OFFSET_HEADER] |=
</span><span class="lines">@@ -8379,7 +8868,7 @@
</span><span class="cx"> if (option_debug > 1)
</span><span class="cx"> DEBUGA_CVM
</span><span class="cx"> ("Skipping sending REJ, because we just cleared RxSeq counter, and probably it was a packet that is invalid now...\n",
</span><del>- CELLIAX_P_LOG);
</del><ins>+ SKYPIAX_P_LOG);
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -8407,7 +8896,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_CVM("CTRL: %s was prepared to send\n", CELLIAX_P_LOG, debug_buf);
</del><ins>+ DEBUGA_CVM("CTRL: %s was prepared to send\n", SKYPIAX_P_LOG, debug_buf);
</ins><span class="cx"> }
</span><span class="cx"> // usleep(100);
</span><span class="cx"> celliax_serial_send_CVM_BUSMAIL(p, len, buffer2);
</span><span class="lines">@@ -8416,7 +8905,7 @@
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int celliax_serial_send_ctrl_frame_CVM_BUSMAIL(struct celliax_pvt *p,
</del><ins>+int celliax_serial_send_ctrl_frame_CVM_BUSMAIL(private_t * tech_pvt,
</ins><span class="cx"> unsigned char FrameType)
</span><span class="cx"> {
</span><span class="cx"> /*FrameType parameter is really a busmail header with info neeeded to tell the frame type to send */
</span><span class="lines">@@ -8436,7 +8925,7 @@
</span><span class="cx"> break;
</span><span class="cx">
</span><span class="cx"> default:
</span><del>- WARNINGA("UNKNOWN CTRL TYPE specified, sending nothing!!!\n", CELLIAX_P_LOG);
</del><ins>+ WARNINGA("UNKNOWN CTRL TYPE specified, sending nothing!!!\n", SKYPIAX_P_LOG);
</ins><span class="cx"> return -1;
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="lines">@@ -8447,7 +8936,7 @@
</span><span class="cx"> return celliax_serial_write_CVM_BUSMAIL(p, &busmail_frame);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int celliax_serial_send_info_frame_CVM_BUSMAIL(struct celliax_pvt *p, int FrameType,
</del><ins>+int celliax_serial_send_info_frame_CVM_BUSMAIL(private_t * tech_pvt, int FrameType,
</ins><span class="cx"> unsigned char ParamsLen,
</span><span class="cx"> unsigned char *Params)
</span><span class="cx"> {
</span><span class="lines">@@ -8474,15 +8963,15 @@
</span><span class="cx"> return celliax_serial_write_CVM_BUSMAIL(p, &busmail_frame);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int celliax_serial_lists_free_CVM_BUSMAIL(struct celliax_pvt *p)
</del><ins>+int celliax_serial_lists_free_CVM_BUSMAIL(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx"> struct cvm_busmail_msg *ptr, *prev;
</span><span class="cx"> /*
</span><span class="cx"> if (option_debug > 1) {
</span><del>- DEBUGA_CVM("START FREEING OUTGOING\n", CELLIAX_P_LOG);
- DEBUGA_CVM("OUTGOING list:\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_CVM("START FREEING OUTGOING\n", SKYPIAX_P_LOG);
+ DEBUGA_CVM("OUTGOING list:\n", SKYPIAX_P_LOG);
</ins><span class="cx"> celliax_serial_list_print_CVM_BUSMAIL(p, p->cvm_busmail_outgoing_list);
</span><del>- DEBUGA_CVM("OUTGOING list END\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_CVM("OUTGOING list END\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx"> */
</span><span class="cx"> ptr = p->cvm_busmail_outgoing_list;
</span><span class="lines">@@ -8494,7 +8983,7 @@
</span><span class="cx"> while (ptr->previous != NULL) {
</span><span class="cx">
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_CVM("FREED \n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_CVM("FREED \n", SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> prev = ptr->previous;
</span><span class="cx"> free(ptr);
</span><span class="lines">@@ -8505,22 +8994,22 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (option_debug > 1)
</span><del>- DEBUGA_CVM("LAST FREED \n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_CVM("LAST FREED \n", SKYPIAX_P_LOG);
</ins><span class="cx">
</span><span class="cx"> p->cvm_busmail_outgoing_list = NULL;
</span><span class="cx"> p->cvm_busmail_outgoing_list = celliax_serial_list_init_CVM_BUSMAIL(p);
</span><span class="cx">
</span><span class="cx"> if (option_debug > 1) {
</span><del>- DEBUGA_CVM("OUTGOING list:\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_CVM("OUTGOING list:\n", SKYPIAX_P_LOG);
</ins><span class="cx"> celliax_serial_list_print_CVM_BUSMAIL(p, p->cvm_busmail_outgoing_list);
</span><del>- DEBUGA_CVM("OUTGOING list END\n", CELLIAX_P_LOG);
- DEBUGA_CVM("STARTING FREE INGOING\n", CELLIAX_P_LOG);
</del><ins>+ DEBUGA_CVM("OUTGOING list END\n", SKYPIAX_P_LOG);
+ DEBUGA_CVM("STARTING FREE INGOING\n", SKYPIAX_P_LOG);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-struct cvm_busmail_msg *celliax_serial_list_init_CVM_BUSMAIL(struct celliax_pvt *p)
</del><ins>+struct cvm_busmail_msg *celliax_serial_list_init_CVM_BUSMAIL(private_t * tech_pvt)
</ins><span class="cx"> {
</span><span class="cx"> struct cvm_busmail_msg *list;
</span><span class="cx"> list = p->cvm_busmail_outgoing_list;
</span><span class="lines">@@ -8563,7 +9052,7 @@
</span><span class="cx"> return list;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-int celliax_serial_list_print_CVM_BUSMAIL(struct celliax_pvt *p,
</del><ins>+int celliax_serial_list_print_CVM_BUSMAIL(private_t * tech_pvt,
</ins><span class="cx"> struct cvm_busmail_msg *list)
</span><span class="cx"> {
</span><span class="cx"> struct cvm_busmail_msg *ptr;
</span><span class="lines">@@ -8578,7 +9067,7 @@
</span><span class="cx"> if (option_debug > 3)
</span><span class="cx"> DEBUGA_CVM
</span><span class="cx"> ("PTR msg is: %d, seqnum is %.2X, tv_sec is %d, tv_usec is %d, acknowledged is: %d,"
</span><del>- " sent is:%d, how_many_sent is: %d\n", CELLIAX_P_LOG, ptr->valid,
</del><ins>+ " sent is:%d, how_many_sent is: %d\n", SKYPIAX_P_LOG, ptr->valid,
</ins><span class="cx"> /*ptr->seqnum */ 44,
</span><span class="cx"> ptr->tv_sec, ptr->tv_usec, ptr->acknowledged, ptr->sent, ptr->how_many_sent);
</span><span class="cx">
</span></span></pre></div>
<a id="freeswitchbranchesgmaruzzmod_celliaxmod_celliaxc"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/gmaruzz/mod_celliax/mod_celliax.c (14618 => 14619)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/gmaruzz/mod_celliax/mod_celliax.c        2009-08-24 14:16:19 UTC (rev 14618)
+++ freeswitch/branches/gmaruzz/mod_celliax/mod_celliax.c        2009-08-24 16:55:31 UTC (rev 14619)
</span><span class="lines">@@ -1085,7 +1085,7 @@
</span><span class="cx">                         char *context = "default";
</span><span class="cx">                         char *dialplan = "XML";
</span><span class="cx">                         char *destination = "5000";
</span><del>-                        char *tonegroup = NULL;
</del><ins>+                        char *controldevice_name = "/dev/ttyACM0";
</ins><span class="cx">                         char *digit_timeout = NULL;
</span><span class="cx">                         char *max_digits = NULL;
</span><span class="cx">                         char *hotline = NULL;
</span><span class="lines">@@ -1099,6 +1099,7 @@
</span><span class="cx">                         char *skype_user = NULL;
</span><span class="cx">
</span><span class="cx">                         uint32_t interface_id = 0, to = 0, max = 0;
</span><ins>+                        uint32_t controldevice_speed = 115200;
</ins><span class="cx">
</span><span class="cx">                         tech_pvt = NULL;
</span><span class="cx">
</span><span class="lines">@@ -1106,8 +1107,8 @@
</span><span class="cx">                                 char *var = (char *) switch_xml_attr_soft(param, "name");
</span><span class="cx">                                 char *val = (char *) switch_xml_attr_soft(param, "value");
</span><span class="cx">
</span><del>-                                if (!strcasecmp(var, "tonegroup")) {
-                                        tonegroup = val;
</del><ins>+                                if (!strcasecmp(var, "controldevice_name")) {
+                                        controldevice_name = val;
</ins><span class="cx">                                 } else if (!strcasecmp(var, "digit_timeout") || !strcasecmp(var, "digit-timeout")) {
</span><span class="cx">                                         digit_timeout = val;
</span><span class="cx">                                 } else if (!strcasecmp(var, "context")) {
</span><span class="lines">@@ -1184,8 +1185,8 @@
</span><span class="cx">                                 WARNINGA("interface missing param 'name', not nice, but works\n", SKYPIAX_P_LOG);
</span><span class="cx">                         }
</span><span class="cx">
</span><del>-                        if (!tonegroup) {
-                                tonegroup = "us";
</del><ins>+                        if (!controldevice_name) {
+                                controldevice_name = "/dev/ttyACM0";
</ins><span class="cx">                         }
</span><span class="cx">
</span><span class="cx">                         if (digit_timeout) {
</span><span class="lines">@@ -1243,6 +1244,8 @@
</span><span class="cx">                                 switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].dialplan, dialplan);
</span><span class="cx">                                 switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].destination, destination);
</span><span class="cx">                                 switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].context, context);
</span><ins>+                                switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].controldevice_name, controldevice_name);
+                                globals.SKYPIAX_INTERFACES[interface_id].controldevice_speed = controldevice_speed;
</ins><span class="cx">
</span><span class="cx">                                 DEBUGA_SKYPE
</span><span class="cx">                                         ("interface_id=%d globals.SKYPIAX_INTERFACES[interface_id].X11_display=%s\n",
</span><span class="lines">@@ -1272,6 +1275,35 @@
</span><span class="cx">                                          SKYPIAX_P_LOG, interface_id, globals.SKYPIAX_INTERFACES[interface_id].context);
</span><span class="cx">                                 WARNINGA("STARTING interface_id=%d\n", SKYPIAX_P_LOG, interface_id);
</span><span class="cx">
</span><ins>+                                int res=0;
+
+ /* init the serial port */
+ if (globals.SKYPIAX_INTERFACES[interface_id].controldevprotocol != PROTOCOL_NO_SERIAL) {
+ globals.SKYPIAX_INTERFACES[interface_id].controldevfd = celliax_serial_init(&globals.SKYPIAX_INTERFACES[interface_id], globals.SKYPIAX_INTERFACES[interface_id].controldevice_speed);
+ if (globals.SKYPIAX_INTERFACES[interface_id].controldevfd < 1) {
+ ERRORA("celliax_serial_init failed\n", SKYPIAX_P_LOG);
+ //celliax_sound_shutdown(tmp);
+ //if (tmp)
+ //free(tmp);
+ //return NULL;
+ }
+ }
+
+ /* config the phone/modem on the serial port */
+ if (globals.SKYPIAX_INTERFACES[interface_id].controldevprotocol != PROTOCOL_NO_SERIAL) {
+ //int res;
+ res = celliax_serial_config(&globals.SKYPIAX_INTERFACES[interface_id]);
+ if (res) {
+ ERRORA("celliax_serial_config failed\n", SKYPIAX_P_LOG);
+ //celliax_sound_shutdown(tmp);
+ //if (tmp)
+ //free(tmp);
+ //return NULL;
+ }
+ }
+
+
+                                switch_sleep(100000);
</ins><span class="cx">                                 switch_threadattr_create(&celliax_api_thread_attr, celliax_module_pool);
</span><span class="cx">                                 switch_threadattr_stacksize_set(celliax_api_thread_attr, SWITCH_THREAD_STACKSIZE);
</span><span class="cx">                                 switch_thread_create(&globals.SKYPIAX_INTERFACES[interface_id].celliax_api_thread, celliax_api_thread_attr, celliax_do_skypeapi_thread, &globals.SKYPIAX_INTERFACES[interface_id], celliax_module_pool);
</span></span></pre>
</div>
</div>
<div id="footer">See you at ClueCon</div>
</body>
</html>