<!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 &lt;switch.h&gt;
</span><span class="cx"> #include &lt;switch_version.h&gt;
</span><ins>+#include &lt;termios.h&gt;
+#include &lt;sys/ioctl.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> #ifndef WIN32
</span><span class="cx"> #include &lt;sys/time.h&gt;
</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];  /*!&lt; \brief name of the serial device controlling the interface, possibly none */
+  int controldevprotocol;       /*!&lt; \brief which protocol is used for serial control of this interface */
+  char controldevprotocolname[50];  /*!&lt; \brief name of the serial device controlling protocol, one of &quot;at&quot; &quot;fbus2&quot; &quot;no_serial&quot; &quot;alsa_voicemodem&quot; */
+  int controldevfd;             /*!&lt; \brief serial controlling file descriptor for this interface */
+  //pthread_t controldev_thread;  /*!&lt; \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-&gt;controldevfd;
+  if (fd) {
+    close(fd);
+  }
+/*  open the serial port */
+#ifdef __CYGWIN__
+  fd = open(tech_pvt-&gt;controldevice_name, O_RDWR | O_NOCTTY | O_NONBLOCK);
+  sleep(1);
+  close(fd);
+#endif /* __CYGWIN__ */
+  fd = open(tech_pvt-&gt;controldevice_name, O_RDWR | O_NOCTTY | O_NONBLOCK);
+  if (fd == -1) {
+    DEBUGA_SKYPE(&quot;serial error: %s\n&quot;, SKYPIAX_P_LOG, strerror(errno));
+    tech_pvt-&gt;controldevfd = fd;
+    return -1;
+  }
+/*  flush it */
+  rt = tcflush(fd, TCIFLUSH);
+  if (rt == -1) {
+    ERRORA(&quot;serial error: %s&quot;, SKYPIAX_P_LOG, strerror(errno));
+  }
+/*  attributes */
+  tp.c_cflag = B0 | CS8 | CLOCAL | CREAD | HUPCL;
+  tp.c_iflag = IGNPAR;
+  tp.c_cflag &amp;= ~CRTSCTS;
+  tp.c_oflag = 0;
+  tp.c_lflag = 0;
+  tp.c_cc[VMIN] = 1;
+  tp.c_cc[VTIME] = 0;
+/*  set controldevice_speed */
+  rt = cfsetispeed(&amp;tp, tech_pvt-&gt;controldevice_speed);
+  if (rt == -1) {
+    ERRORA(&quot;serial error: %s&quot;, SKYPIAX_P_LOG, strerror(errno));
+  }
+  rt = cfsetospeed(&amp;tp, tech_pvt-&gt;controldevice_speed);
+  if (rt == -1) {
+    ERRORA(&quot;serial error: %s&quot;, SKYPIAX_P_LOG, strerror(errno));
+  }
+/*  set port attributes */
+  if (tcsetattr(fd, TCSADRAIN, &amp;tp) == -1) {
+    ERRORA(&quot;serial error: %s&quot;, SKYPIAX_P_LOG, strerror(errno));
+  }
+  rt = tcsetattr(fd, TCSANOW, &amp;tp);
+  if (rt == -1) {
+    ERRORA(&quot;serial error: %s&quot;, SKYPIAX_P_LOG, strerror(errno));
+  }
+  unsigned int status = 0;
+#ifndef __CYGWIN__
+  ioctl(fd, TIOCMGET, &amp;status);
+  status |= TIOCM_DTR;          /*  Set DTR high */
+  status &amp;= ~TIOCM_RTS;         /*  Set RTS low */
+  ioctl(fd, TIOCMSET, &amp;status);
+  ioctl(fd, TIOCMGET, &amp;status);
+  unsigned int flags = TIOCM_DTR;
+  ioctl(fd, TIOCMBIS, &amp;flags);
+  flags = TIOCM_RTS;
+  ioctl(fd, TIOCMBIC, &amp;flags);
+  ioctl(fd, TIOCMGET, &amp;status);
+#else /* __CYGWIN__ */
+  ioctl(fd, TIOCMGET, &amp;status);
+  status |= TIOCM_DTR;          /*  Set DTR high */
+  status &amp;= ~TIOCM_RTS;         /*  Set RTS low */
+  ioctl(fd, TIOCMSET, &amp;status);
+#endif /* __CYGWIN__ */
+  tech_pvt-&gt;controldevfd = fd;
+  DEBUGA_SKYPE(&quot;Syncing Serial\n&quot;, SKYPIAX_P_LOG);
+  rt = celliax_serial_sync(tech_pvt);
+  if (rt == -1) {
+    ERRORA(&quot;Serial init error\n&quot;, SKYPIAX_P_LOG);
+    return -1;
+  }
+  return (fd);
+}
+
+int celliax_serial_sync(private_t * tech_pvt)
+{
+  if (tech_pvt-&gt;controldevprotocol == PROTOCOL_AT)
+    return celliax_serial_sync_AT(tech_pvt);
+#ifdef CELLIAX_FBUS2
+  if (tech_pvt-&gt;controldevprotocol == PROTOCOL_FBUS2)
+    return celliax_serial_sync_FBUS2(tech_pvt);
+#endif /* CELLIAX_FBUS2 */
+#ifdef CELLIAX_CVM
+  if (tech_pvt-&gt;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-&gt;controldevprotocol == PROTOCOL_AT)
+    return celliax_serial_config_AT(tech_pvt);
+#ifdef CELLIAX_FBUS2
+  if (tech_pvt-&gt;controldevprotocol == PROTOCOL_FBUS2)
+    return celliax_serial_config_FBUS2(tech_pvt);
+#endif /* CELLIAX_FBUS2 */
+#ifdef CELLIAX_CVM
+  if (tech_pvt-&gt;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-&gt;at_initial_pause) {
+    DEBUGA_SKYPE(&quot;sleeping for %d usec\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;at_initial_pause);
+    usleep(tech_pvt-&gt;at_initial_pause);
+  }
+
+/* go until first empty preinit string, or last preinit string */
+  while (1) {
+
+    if (strlen(tech_pvt-&gt;at_preinit_1)) {
+      res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_preinit_1, tech_pvt-&gt;at_preinit_1_expect);
+      if (res) {
+        DEBUGA_SKYPE(&quot;%s does not get %s from the phone. Continuing.\n&quot;, SKYPIAX_P_LOG,
+                  tech_pvt-&gt;at_preinit_1, tech_pvt-&gt;at_preinit_1_expect);
+      }
+    } else {
+      break;
+    }
+
+    if (strlen(tech_pvt-&gt;at_preinit_2)) {
+      res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_preinit_2, tech_pvt-&gt;at_preinit_2_expect);
+      if (res) {
+        DEBUGA_SKYPE(&quot;%s does not get %s from the phone. Continuing.\n&quot;, SKYPIAX_P_LOG,
+                  tech_pvt-&gt;at_preinit_2, tech_pvt-&gt;at_preinit_2_expect);
+      }
+    } else {
+      break;
+    }
+
+    if (strlen(tech_pvt-&gt;at_preinit_3)) {
+      res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_preinit_3, tech_pvt-&gt;at_preinit_3_expect);
+      if (res) {
+        DEBUGA_SKYPE(&quot;%s does not get %s from the phone. Continuing.\n&quot;, SKYPIAX_P_LOG,
+                  tech_pvt-&gt;at_preinit_3, tech_pvt-&gt;at_preinit_3_expect);
+      }
+    } else {
+      break;
+    }
+
+    if (strlen(tech_pvt-&gt;at_preinit_4)) {
+      res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_preinit_4, tech_pvt-&gt;at_preinit_4_expect);
+      if (res) {
+        DEBUGA_SKYPE(&quot;%s does not get %s from the phone. Continuing.\n&quot;, SKYPIAX_P_LOG,
+                  tech_pvt-&gt;at_preinit_4, tech_pvt-&gt;at_preinit_4_expect);
+      }
+    } else {
+      break;
+    }
+
+    if (strlen(tech_pvt-&gt;at_preinit_5)) {
+      res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_preinit_5, tech_pvt-&gt;at_preinit_5_expect);
+      if (res) {
+        DEBUGA_SKYPE(&quot;%s does not get %s from the phone. Continuing.\n&quot;, SKYPIAX_P_LOG,
+                  tech_pvt-&gt;at_preinit_5, tech_pvt-&gt;at_preinit_5_expect);
+      }
+    } else {
+      break;
+    }
+
+    break;
+  }
+
+/* after_preinit_pause? */
+  if (tech_pvt-&gt;at_after_preinit_pause) {
+    DEBUGA_SKYPE(&quot;sleeping for %d usec\n&quot;, SKYPIAX_P_LOG, tech_pvt-&gt;at_after_preinit_pause);
+    usleep(tech_pvt-&gt;at_after_preinit_pause);
+  }
+
+  /* phone, brother, art you alive? */
+  res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT&quot;);
+  if (res) {
+    ERRORA(&quot;no response to AT\n&quot;, SKYPIAX_P_LOG);
+    return -1;
+  }
+  /* for motorola, bring it back to &quot;normal&quot; mode if it happens to be in another mode */
+  res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+mode=0&quot;);
+  if (res) {
+    DEBUGA_SKYPE(&quot;AT+mode=0 does not get OK from the phone. If it is NOT Motorola,&quot;
+              &quot; no problem.\n&quot;, SKYPIAX_P_LOG);
+  }
+  usleep(50000);
+  /* for motorola end */
+
+  /* reset AT configuration to phone default */
+  res = celliax_serial_write_AT_ack(tech_pvt, &quot;ATZ&quot;);
+  if (res) {
+    DEBUGA_SKYPE(&quot;ATZ failed\n&quot;, SKYPIAX_P_LOG);
+  }
+
+  /* disable AT command echo */
+  res = celliax_serial_write_AT_ack(tech_pvt, &quot;ATE0&quot;);
+  if (res) {
+    DEBUGA_SKYPE(&quot;ATE0 failed\n&quot;, SKYPIAX_P_LOG);
+  }
+
+  /* disable extended error reporting */
+  res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CMEE=0&quot;);
+  if (res) {
+    DEBUGA_SKYPE(&quot;AT+CMEE failed\n&quot;, SKYPIAX_P_LOG);
+  }
+
+  /* various phone manufacturer identifier */
+  char at_command[5];
+  int i;
+  for (i = 0; i &lt; 10; i++) {
+    memset(at_command, 0, sizeof(at_command));
+    sprintf(at_command, &quot;ATI%d&quot;, i);
+    res = celliax_serial_write_AT_ack(tech_pvt, at_command);
+    if (res) {
+      DEBUGA_SKYPE(&quot;ATI%d command failed, continue\n&quot;, SKYPIAX_P_LOG, i);
+    }
+  }
+
+  /* phone manufacturer */
+  res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CGMI&quot;);
+  if (res) {
+    DEBUGA_SKYPE(&quot;AT+CGMI failed\n&quot;, SKYPIAX_P_LOG);
+  }
+
+  /* phone model */
+  res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CGMM&quot;);
+  if (res) {
+    DEBUGA_SKYPE(&quot;AT+CGMM failed\n&quot;, SKYPIAX_P_LOG);
+  }
+
+  res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CGSN&quot;);
+  if (res) {
+    DEBUGA_SKYPE(&quot;AT+CGSN failed\n&quot;, 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, &quot;AT+CLAC&quot;);
+  if (res) {
+    DEBUGA_SKYPE(&quot;AT+CLAC failed, continue\n&quot;, SKYPIAX_P_LOG);
+  }
+#endif
+  /* signal incoming SMS with a +CMTI unsolicited msg */
+  res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CNMI=3,1,0,0,0&quot;);
+  if (res) {
+    DEBUGA_SKYPE(&quot;AT+CNMI=3,1,0,0,0 failed, continue\n&quot;, SKYPIAX_P_LOG);
+    tech_pvt-&gt;sms_cnmi_not_supported = 1;
+    tech_pvt-&gt;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, &quot;AT+CSCA?&quot;);
+  if (res) {
+    DEBUGA_SKYPE(&quot;AT+CSCA? failed, continue\n&quot;, SKYPIAX_P_LOG);
+  }
+  /* what is the Message Format of SMSs? */
+  res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CMGF?&quot;);
+  if (res) {
+    DEBUGA_SKYPE(&quot;AT+CMGF? failed, continue\n&quot;, SKYPIAX_P_LOG);
+  }
+  res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CMGF=1&quot;);    //TODO: support phones that only accept pdu mode
+  if (res) {
+    ERRORA(&quot;Error setting SMS sending mode to TEXT on the cellphone\n&quot;, SKYPIAX_P_LOG);
+    return RESULT_FAILURE;
+  }
+  /* what is the Charset of SMSs? */
+  res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CSCS?&quot;);
+  if (res) {
+    DEBUGA_SKYPE(&quot;AT+CSCS? failed, continue\n&quot;, SKYPIAX_P_LOG);
+  }
+
+  tech_pvt-&gt;no_ucs2 = 0;
+  res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CSCS=\&quot;UCS2\&quot;&quot;);
+  if (res) {
+    WARNINGA
+      (&quot;AT+CSCS=\&quot;UCS2\&quot; (set TE messages to ucs2)  do not got OK from the phone, let's try with 'GSM'\n&quot;,
+       SKYPIAX_P_LOG);
+    tech_pvt-&gt;no_ucs2 = 1;
+  }
+
+  if (tech_pvt-&gt;no_ucs2) {
+    res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CSCS=\&quot;GSM\&quot;&quot;);
+    if (res) {
+      WARNINGA(&quot;AT+CSCS=\&quot;GSM\&quot; (set TE messages to GSM)  do not got OK from the phone\n&quot;,
+               SKYPIAX_P_LOG);
+    }
+    //res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CSMP=17,167,0,16&quot;); //&quot;flash&quot;, class 0  sms 7 bit
+    res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CSMP=17,167,0,0&quot;); //normal, 7 bit message
+    if (res) {
+      WARNINGA(&quot;AT+CSMP do not got OK from the phone, continuing\n&quot;, SKYPIAX_P_LOG);
+    }
+  } else {
+    //res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CSMP=17,167,0,20&quot;); //&quot;flash&quot;, class 0 sms 16 bit unicode
+    res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CSMP=17,167,0,8&quot;); //unicode, 16 bit message
+    if (res) {
+      WARNINGA(&quot;AT+CSMP do not got OK from the phone, continuing\n&quot;, SKYPIAX_P_LOG);
+    }
+  }
+
+  /* is the unsolicited reporting of mobile equipment event supported? */
+  res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CMER=?&quot;);
+  if (res) {
+    DEBUGA_SKYPE(&quot;AT+CMER=? failed, continue\n&quot;, 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, &quot;AT+CMER=3,0,0,1&quot;);
+  if (res) {
+    DEBUGA_SKYPE(&quot;AT+CMER=? failed, continue\n&quot;, SKYPIAX_P_LOG);
+  }
+
+  /* is the solicited reporting of mobile equipment indications supported? */
+
+  res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CIND=?&quot;);
+  if (res) {
+    DEBUGA_SKYPE(&quot;AT+CIND=? failed, continue\n&quot;, SKYPIAX_P_LOG);
+  }
+
+  /* is the unsolicited reporting of call monitoring supported? sony-ericsson specific */
+  res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT*ECAM=?&quot;);
+  if (res) {
+    DEBUGA_SKYPE(&quot;AT*ECAM=? failed, continue\n&quot;, SKYPIAX_P_LOG);
+  }
+  /* enable the unsolicited reporting of call monitoring. sony-ericsson specific */
+  res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT*ECAM=1&quot;);
+  if (res) {
+    DEBUGA_SKYPE(&quot;AT*ECAM=1 failed, continue\n&quot;, SKYPIAX_P_LOG);
+    tech_pvt-&gt;at_has_ecam = 0;
+  } else {
+    tech_pvt-&gt;at_has_ecam = 1;
+  }
+
+  /* disable unsolicited signaling of call list */
+  res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CLCC=0&quot;);
+  if (res) {
+    DEBUGA_SKYPE(&quot;AT+CLCC=0 failed, continue\n&quot;, SKYPIAX_P_LOG);
+    tech_pvt-&gt;at_has_clcc = 0;
+  } else {
+    tech_pvt-&gt;at_has_clcc = 1;
+  }
+
+  /* give unsolicited caller id when incoming call */
+  res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+CLIP=1&quot;);
+  if (res) {
+    DEBUGA_SKYPE(&quot;AT+CLIP failed, continue\n&quot;, SKYPIAX_P_LOG);
+  }
+  /* for motorola */
+  res = celliax_serial_write_AT_ack(tech_pvt, &quot;AT+MCST=1&quot;);    /* motorola call control codes
+                                                           (to know when call is disconnected (they
+                                                           don't give you &quot;no carrier&quot;) */
+  if (res) {
+    DEBUGA_SKYPE(&quot;AT+MCST=1 does not get OK from the phone. If it is NOT Motorola,&quot;
+              &quot; no problem.\n&quot;, SKYPIAX_P_LOG);
+  }
+  /* for motorola end */
+
+/* go until first empty postinit string, or last postinit string */
+  while (1) {
+
+    if (strlen(tech_pvt-&gt;at_postinit_1)) {
+      res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_postinit_1, tech_pvt-&gt;at_postinit_1_expect);
+      if (res) {
+        DEBUGA_SKYPE(&quot;%s does not get %s from the phone. Continuing.\n&quot;, SKYPIAX_P_LOG,
+                  tech_pvt-&gt;at_postinit_1, tech_pvt-&gt;at_postinit_1_expect);
+      }
+    } else {
+      break;
+    }
+
+    if (strlen(tech_pvt-&gt;at_postinit_2)) {
+      res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_postinit_2, tech_pvt-&gt;at_postinit_2_expect);
+      if (res) {
+        DEBUGA_SKYPE(&quot;%s does not get %s from the phone. Continuing.\n&quot;, SKYPIAX_P_LOG,
+                  tech_pvt-&gt;at_postinit_2, tech_pvt-&gt;at_postinit_2_expect);
+      }
+    } else {
+      break;
+    }
+
+    if (strlen(tech_pvt-&gt;at_postinit_3)) {
+      res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_postinit_3, tech_pvt-&gt;at_postinit_3_expect);
+      if (res) {
+        DEBUGA_SKYPE(&quot;%s does not get %s from the phone. Continuing.\n&quot;, SKYPIAX_P_LOG,
+                  tech_pvt-&gt;at_postinit_3, tech_pvt-&gt;at_postinit_3_expect);
+      }
+    } else {
+      break;
+    }
+
+    if (strlen(tech_pvt-&gt;at_postinit_4)) {
+      res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_postinit_4, tech_pvt-&gt;at_postinit_4_expect);
+      if (res) {
+        DEBUGA_SKYPE(&quot;%s does not get %s from the phone. Continuing.\n&quot;, SKYPIAX_P_LOG,
+                  tech_pvt-&gt;at_postinit_4, tech_pvt-&gt;at_postinit_4_expect);
+      }
+    } else {
+      break;
+    }
+
+    if (strlen(tech_pvt-&gt;at_postinit_5)) {
+      res = celliax_serial_write_AT_expect(tech_pvt, tech_pvt-&gt;at_postinit_5, tech_pvt-&gt;at_postinit_5_expect);
+      if (res) {
+        DEBUGA_SKYPE(&quot;%s does not get %s from the phone. Continuing.\n&quot;, SKYPIAX_P_LOG,
+                  tech_pvt-&gt;at_postinit_5, tech_pvt-&gt;at_postinit_5_expect);
+      }
+    } else {
+      break;
+    }
+
+    break;
+  }
+
+  return 0;
+}
+
+
+#ifdef NOTDEF
+int celliax_serial_getstatus(private_t * tech_pvt)
+{
+  if (tech_pvt-&gt;controldevprotocol == PROTOCOL_AT)
+    return celliax_serial_getstatus_AT(tech_pvt);
+#ifdef CELLIAX_FBUS2
+  if (tech_pvt-&gt;controldevprotocol == PROTOCOL_FBUS2)
+    return celliax_serial_getstatus_FBUS2(tech_pvt);
+#endif /* CELLIAX_FBUS2 */
+
+#ifdef CELLIAX_CVM
+  if (tech_pvt-&gt;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-&gt;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-&gt;controldevprotocol == PROTOCOL_FBUS2)
+    return celliax_serial_read_FBUS2(tech_pvt);
+#endif /* CELLIAX_FBUS2 */
+#ifdef CELLIAX_CVM
+  if (tech_pvt-&gt;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-&gt;controldevprotocol == PROTOCOL_AT)
+    return celliax_serial_hangup_AT(tech_pvt);
+#ifdef CELLIAX_FBUS2
+  if (tech_pvt-&gt;controldevprotocol == PROTOCOL_FBUS2)
+    return celliax_serial_hangup_FBUS2(tech_pvt);
+#endif /* CELLIAX_FBUS2 */
+#ifdef CELLIAX_CVM
+  if (tech_pvt-&gt;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-&gt;controldevprotocol == PROTOCOL_AT)
+    return celliax_serial_answer_AT(tech_pvt);
+#ifdef CELLIAX_FBUS2
+  if (tech_pvt-&gt;controldevprotocol == PROTOCOL_FBUS2)
+    return celliax_serial_answer_FBUS2(tech_pvt);
+#endif /* CELLIAX_FBUS2 */
+#ifdef CELLIAX_CVM
+  if (tech_pvt-&gt;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-&gt;alsac = alsa_open_dev(p, SND_PCM_STREAM_CAPTURE);
</del><ins>+  tech_pvt-&gt;alsac = alsa_open_dev(p, SND_PCM_STREAM_CAPTURE);
</ins><span class="cx">   if (!p-&gt;alsac) {
</span><del>-    ERRORA(&quot;Failed opening ALSA capture device: %s\n&quot;, CELLIAX_P_LOG, p-&gt;alsacname);
</del><ins>+    ERRORA(&quot;Failed opening ALSA capture device: %s\n&quot;, SKYPIAX_P_LOG, p-&gt;alsacname);
</ins><span class="cx">     if (alsa_shutdown(p)) {
</span><del>-      ERRORA(&quot;alsa_shutdown failed\n&quot;, CELLIAX_P_LOG);
</del><ins>+      ERRORA(&quot;alsa_shutdown failed\n&quot;, 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-&gt;alsap = alsa_open_dev(p, SND_PCM_STREAM_PLAYBACK);
</span><span class="cx">   if (!p-&gt;alsap) {
</span><del>-    ERRORA(&quot;Failed opening ALSA playback device: %s\n&quot;, CELLIAX_P_LOG, p-&gt;alsapname);
</del><ins>+    ERRORA(&quot;Failed opening ALSA playback device: %s\n&quot;, SKYPIAX_P_LOG, p-&gt;alsapname);
</ins><span class="cx">     if (alsa_shutdown(p)) {
</span><del>-      ERRORA(&quot;alsa_shutdown failed\n&quot;, CELLIAX_P_LOG);
</del><ins>+      ERRORA(&quot;alsa_shutdown failed\n&quot;, 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-&gt;alsap) {
</span><span class="cx">     err = snd_pcm_drop(p-&gt;alsap);
</span><span class="cx">     if (err &lt; 0) {
</span><del>-      ERRORA(&quot;device [%s], snd_pcm_drop failed with error '%s'\n&quot;, CELLIAX_P_LOG,
</del><ins>+      ERRORA(&quot;device [%s], snd_pcm_drop failed with error '%s'\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">              p-&gt;alsapname, snd_strerror(err));
</span><span class="cx">       return -1;
</span><span class="cx">     }
</span><span class="cx">     err = snd_pcm_close(p-&gt;alsap);
</span><span class="cx">     if (err &lt; 0) {
</span><del>-      ERRORA(&quot;device [%s], snd_pcm_close failed with error '%s'\n&quot;, CELLIAX_P_LOG,
</del><ins>+      ERRORA(&quot;device [%s], snd_pcm_close failed with error '%s'\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">              p-&gt;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-&gt;alsac) {
</span><span class="cx">     err = snd_pcm_drop(p-&gt;alsac);
</span><span class="cx">     if (err &lt; 0) {
</span><del>-      ERRORA(&quot;device [%s], snd_pcm_drop failed with error '%s'\n&quot;, CELLIAX_P_LOG,
</del><ins>+      ERRORA(&quot;device [%s], snd_pcm_drop failed with error '%s'\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">              p-&gt;alsacname, snd_strerror(err));
</span><span class="cx">       return -1;
</span><span class="cx">     }
</span><span class="cx">     err = snd_pcm_close(p-&gt;alsac);
</span><span class="cx">     if (err &lt; 0) {
</span><del>-      ERRORA(&quot;device [%s], snd_pcm_close failed with error '%s'\n&quot;, CELLIAX_P_LOG,
</del><ins>+      ERRORA(&quot;device [%s], snd_pcm_close failed with error '%s'\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">              p-&gt;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 &lt; 0) {
</span><span class="cx">     ERRORA
</span><span class="cx">       (&quot;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&quot;
</span><del>-       &quot; is running?\n&quot;, CELLIAX_P_LOG, snd_strerror(err),
</del><ins>+       &quot; is running?\n&quot;, SKYPIAX_P_LOG, snd_strerror(err),
</ins><span class="cx">        stream == SND_PCM_STREAM_CAPTURE ? p-&gt;alsacname : p-&gt;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(&amp;info);
</span><span class="cx"> 
</span><span class="cx">   if ((err = snd_pcm_info(handle, info)) &lt; 0) {
</span><del>-    ERRORA(&quot;info error: %s&quot;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+    ERRORA(&quot;info error: %s&quot;, 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 &lt; 0) {
</span><del>-    ERRORA(&quot;nonblock setting error: %s&quot;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+    ERRORA(&quot;nonblock setting error: %s&quot;, 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 &lt; 0) {
</span><span class="cx">     ERRORA(&quot;Broken configuration for this PCM, no configurations available: %s\n&quot;,
</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 &lt; 0) {
</span><del>-    ERRORA(&quot;Access type not available: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+    ERRORA(&quot;Access type not available: %s\n&quot;, 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 &lt; 0) {
</span><del>-    ERRORA(&quot;Sample format non available: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+    ERRORA(&quot;Sample format non available: %s\n&quot;, 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 &lt; 0) {
</span><del>-    DEBUGA_SOUND(&quot;Channels count set failed: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+    DEBUGA_SOUND(&quot;Channels count set failed: %s\n&quot;, 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, &amp;chan_num);
</span><span class="cx">   if (err &lt; 0) {
</span><del>-    ERRORA(&quot;Channels count non available: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+    ERRORA(&quot;Channels count non available: %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(err));
</ins><span class="cx">     return NULL;
</span><span class="cx">   }
</span><span class="cx">   if (chan_num &lt; 1 || chan_num &gt; 2) {
</span><del>-    ERRORA(&quot;Channels count MUST BE 1 or 2, it is: %d\n&quot;, CELLIAX_P_LOG, chan_num);
-    ERRORA(&quot;Channels count MUST BE 1 or 2, it is: %d on %s %s\n&quot;, CELLIAX_P_LOG, chan_num,
</del><ins>+    ERRORA(&quot;Channels count MUST BE 1 or 2, it is: %d\n&quot;, SKYPIAX_P_LOG, chan_num);
+    ERRORA(&quot;Channels count MUST BE 1 or 2, it is: %d on %s %s\n&quot;, SKYPIAX_P_LOG, chan_num,
</ins><span class="cx">            p-&gt;alsapname, p-&gt;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, &amp;rate, 0);
</span><span class="cx">   if ((float) p-&gt;celliax_sound_rate * 1.05 &lt; rate
</span><span class="cx">       || (float) p-&gt;celliax_sound_rate * 0.95 &gt; rate) {
</span><del>-    WARNINGA(&quot;Rate is not accurate (requested = %iHz, got = %iHz)\n&quot;, CELLIAX_P_LOG,
</del><ins>+    WARNINGA(&quot;Rate is not accurate (requested = %iHz, got = %iHz)\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">              p-&gt;celliax_sound_rate, rate);
</span><span class="cx">   }
</span><span class="cx"> 
</span><span class="cx">   if (err &lt; 0) {
</span><del>-    ERRORA(&quot;Error setting rate: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+    ERRORA(&quot;Error setting rate: %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(err));
</ins><span class="cx">     return NULL;
</span><span class="cx">   }
</span><span class="cx">   p-&gt;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, &amp;period_size, 0);
</span><span class="cx"> 
</span><span class="cx">   if (err &lt; 0) {
</span><del>-    ERRORA(&quot;Error setting period_size: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+    ERRORA(&quot;Error setting period_size: %s\n&quot;, 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, &amp;p-&gt;alsa_buffer_size);
</span><span class="cx"> 
</span><span class="cx">   if (err &lt; 0) {
</span><del>-    ERRORA(&quot;Error setting buffer_size: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+    ERRORA(&quot;Error setting buffer_size: %s\n&quot;, 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 &lt; 0) {
</span><del>-    ERRORA(&quot;Unable to install hw params: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+    ERRORA(&quot;Unable to install hw params: %s\n&quot;, 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, &amp;chunk_size, 0);
</span><span class="cx">   snd_pcm_hw_params_get_buffer_size(params, &amp;buffer_size);
</span><span class="cx">   if (chunk_size == buffer_size) {
</span><del>-    ERRORA(&quot;Can't use period equal to buffer size (%lu == %lu)\n&quot;, CELLIAX_P_LOG,
</del><ins>+    ERRORA(&quot;Can't use period equal to buffer size (%lu == %lu)\n&quot;, 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, &amp;xfer_align);
</span><span class="cx">   if (err &lt; 0) {
</span><del>-    ERRORA(&quot;Unable to obtain xfer align: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+    ERRORA(&quot;Unable to obtain xfer align: %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(err));
</ins><span class="cx">   }
</span><del>-  NOTICA(&quot;xfer_align: %d\n&quot;, CELLIAX_P_LOG, xfer_align);
</del><ins>+  NOTICA(&quot;xfer_align: %d\n&quot;, 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-&gt;alsa_period_size;
</span><del>-  NOTICA(&quot;xfer_align: %d\n&quot;, CELLIAX_P_LOG, xfer_align);
</del><ins>+  NOTICA(&quot;xfer_align: %d\n&quot;, 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 &lt; 0) {
</span><del>-    ERRORA(&quot;Error setting xfer_align: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+    ERRORA(&quot;Error setting xfer_align: %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(err));
</ins><span class="cx">   }
</span><del>-  NOTICA(&quot;xfer_align: %d\n&quot;, CELLIAX_P_LOG, xfer_align);
</del><ins>+  NOTICA(&quot;xfer_align: %d\n&quot;, SKYPIAX_P_LOG, xfer_align);
</ins><span class="cx"> 
</span><span class="cx">   err = snd_pcm_sw_params_get_xfer_align(swparams, &amp;xfer_align);
</span><span class="cx">   if (err &lt; 0) {
</span><del>-    ERRORA(&quot;Unable to obtain xfer align: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+    ERRORA(&quot;Unable to obtain xfer align: %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(err));
</ins><span class="cx">   }
</span><del>-  NOTICA(&quot;xfer_align: %d\n&quot;, CELLIAX_P_LOG, xfer_align);
</del><ins>+  NOTICA(&quot;xfer_align: %d\n&quot;, 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 &lt; 0) {
</span><del>-     ERRORA(&quot;Error setting slep_min: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+     ERRORA(&quot;Error setting slep_min: %s\n&quot;, 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 &lt; 0) {
</span><del>-    ERRORA(&quot;Error setting avail_min: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+    ERRORA(&quot;Error setting avail_min: %s\n&quot;, 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 &lt; 0) {
</span><del>-    ERRORA(&quot;Error setting start_threshold: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+    ERRORA(&quot;Error setting start_threshold: %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(err));
</ins><span class="cx">   }
</span><span class="cx"> 
</span><span class="cx">   if (stop_delay &lt;= 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 &lt; 0) {
</span><del>-    ERRORA(&quot;Error setting stop_threshold: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+    ERRORA(&quot;Error setting stop_threshold: %s\n&quot;, 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 &lt; 0) {
</span><del>-    ERRORA(&quot;Error setting xfer_align: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+    ERRORA(&quot;Error setting xfer_align: %s\n&quot;, 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) &lt; 0) {
</span><del>-    ERRORA(&quot;Error installing software parameters: %s\n&quot;, CELLIAX_P_LOG,
</del><ins>+    ERRORA(&quot;Error installing software parameters: %s\n&quot;, 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 &lt;= 0) {
</span><del>-    ERRORA(&quot;Unable to get a poll descriptors count, error is %s\n&quot;, CELLIAX_P_LOG,
</del><ins>+    ERRORA(&quot;Unable to get a poll descriptors count, error is %s\n&quot;, 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(&quot;Can't handle more than one device\n&quot;, CELLIAX_P_LOG);
</del><ins>+    DEBUGA_SOUND(&quot;Can't handle more than one device\n&quot;, 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, &amp;p-&gt;pfd, err);
</span><span class="cx">   if (err != 1) {
</span><del>-    ERRORA(&quot;snd_pcm_poll_descriptors failed, %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+    ERRORA(&quot;snd_pcm_poll_descriptors failed, %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(err));
</ins><span class="cx">     return NULL;
</span><span class="cx">   }
</span><del>-  DEBUGA_SOUND(&quot;Acquired fd %d from the poll descriptor\n&quot;, CELLIAX_P_LOG, p-&gt;pfd.fd);
</del><ins>+  DEBUGA_SOUND(&quot;Acquired fd %d from the poll descriptor\n&quot;, SKYPIAX_P_LOG, p-&gt;pfd.fd);
</ins><span class="cx"> 
</span><span class="cx">   if (stream == SND_PCM_STREAM_CAPTURE) {
</span><span class="cx">     p-&gt;celliax_sound_capt_fd = p-&gt;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(&quot;snd_pcm_prepare failed, %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+        ERRORA(&quot;snd_pcm_prepare failed, %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(err));
</ins><span class="cx">         return NULL;
</span><span class="cx">       }
</span><del>-      DEBUGA_SOUND(&quot;prepared!\n&quot;, CELLIAX_P_LOG);
</del><ins>+      DEBUGA_SOUND(&quot;prepared!\n&quot;, 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(&quot;snd_pcm_start failed, %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+        ERRORA(&quot;snd_pcm_start failed, %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(err));
</ins><span class="cx">         return NULL;
</span><span class="cx">       }
</span><del>-      DEBUGA_SOUND(&quot;started!\n&quot;, CELLIAX_P_LOG);
</del><ins>+      DEBUGA_SOUND(&quot;started!\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">     }
</span><span class="cx">   }
</span><span class="cx">   if (option_debug &gt; 1) {
</span><span class="cx">     snd_output_t *output = NULL;
</span><span class="cx">     err = snd_output_stdio_attach(&amp;output, stdout, 0);
</span><span class="cx">     if (err &lt; 0) {
</span><del>-      ERRORA(&quot;snd_output_stdio_attach failed: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(err));
</del><ins>+      ERRORA(&quot;snd_output_stdio_attach failed: %s\n&quot;, 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 &gt; 1)
</span><del>-    DEBUGA_SOUND(&quot;ALSA handle = %ld\n&quot;, CELLIAX_P_LOG, (long int) handle);
</del><ins>+    DEBUGA_SOUND(&quot;ALSA handle = %ld\n&quot;, 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-&gt;alsac);
</span><span class="cx">   if (state != SND_PCM_STATE_RUNNING) {
</span><del>-    DEBUGA_SOUND(&quot;ALSA read state is not SND_PCM_STATE_RUNNING\n&quot;, CELLIAX_P_LOG);
</del><ins>+    DEBUGA_SOUND(&quot;ALSA read state is not SND_PCM_STATE_RUNNING\n&quot;, 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-&gt;alsac);
</span><span class="cx">       if (error) {
</span><del>-        ERRORA(&quot;snd_pcm_prepare failed, %s\n&quot;, CELLIAX_P_LOG, snd_strerror(error));
</del><ins>+        ERRORA(&quot;snd_pcm_prepare failed, %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(error));
</ins><span class="cx">         return &amp;f;
</span><span class="cx">       }
</span><del>-      DEBUGA_SOUND(&quot;prepared!\n&quot;, CELLIAX_P_LOG);
</del><ins>+      DEBUGA_SOUND(&quot;prepared!\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">     }
</span><span class="cx">     usleep(1000);
</span><span class="cx">     error = snd_pcm_start(p-&gt;alsac);
</span><span class="cx">     if (error) {
</span><del>-      ERRORA(&quot;snd_pcm_start failed, %s\n&quot;, CELLIAX_P_LOG, snd_strerror(error));
</del><ins>+      ERRORA(&quot;snd_pcm_start failed, %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(error));
</ins><span class="cx">       return &amp;f;
</span><span class="cx">     }
</span><del>-    DEBUGA_SOUND(&quot;started!\n&quot;, CELLIAX_P_LOG);
</del><ins>+    DEBUGA_SOUND(&quot;started!\n&quot;, 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(&quot;XRUN read\n\n\n\n\n&quot;, CELLIAX_P_LOG);
</del><ins>+    ERRORA(&quot;XRUN read\n\n\n\n\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">     return &amp;f;
</span><span class="cx">   } else if (r == -ESTRPIPE) {
</span><del>-    ERRORA(&quot;-ESTRPIPE\n&quot;, CELLIAX_P_LOG);
</del><ins>+    ERRORA(&quot;-ESTRPIPE\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">     return &amp;f;
</span><span class="cx"> 
</span><span class="cx">   } else if (r == -EAGAIN) {
</span><span class="cx">     DEBUGA_SOUND(&quot;ALSA read -EAGAIN, the soundcard is not ready to be read by celliax\n&quot;,
</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 &lt; 0) {
</span><del>-    WARNINGA(&quot;ALSA Read error: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(r));
</del><ins>+    WARNINGA(&quot;ALSA Read error: %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(r));
</ins><span class="cx">   } else if (r &gt;= 0) {
</span><del>-    //DEBUGA_SOUND(&quot;read: r=%d, readpos=%d, left=%d, off=%d\n&quot;, CELLIAX_P_LOG, r, readpos, left, off);
</del><ins>+    //DEBUGA_SOUND(&quot;read: r=%d, readpos=%d, left=%d, off=%d\n&quot;, 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-&gt;datalen &gt; sizeof(sizbuf) - sizpos) {
</span><del>-    ERRORA(&quot;Frame too large\n&quot;, CELLIAX_P_LOG);
</del><ins>+    ERRORA(&quot;Frame too large\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">     res = -1;
</span><span class="cx">   } else {
</span><span class="cx">     memcpy(sizbuf + sizpos, f-&gt;data, f-&gt;datalen);
</span><span class="lines">@@ -2173,23 +2662,23 @@
</span><span class="cx"> 
</span><span class="cx">       DEBUGA_SOUND
</span><span class="cx">         (&quot;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&quot;,
</span><del>-         CELLIAX_P_LOG, p-&gt;alsa_periods_in_buffer);
</del><ins>+         SKYPIAX_P_LOG, p-&gt;alsa_periods_in_buffer);
</ins><span class="cx">       res = snd_pcm_prepare(p-&gt;alsap);
</span><span class="cx">       if (res) {
</span><del>-        ERRORA(&quot;audio play prepare failed: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(res));
</del><ins>+        ERRORA(&quot;audio play prepare failed: %s\n&quot;, 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 &lt; 0) {
</span><del>-          DEBUGA_SOUND(&quot;Silence error %s\n&quot;, CELLIAX_P_LOG, snd_strerror(res));
</del><ins>+          DEBUGA_SOUND(&quot;Silence error %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(res));
</ins><span class="cx">           res = -1;
</span><span class="cx">         }
</span><span class="cx">         for (i = 0; i &lt; (p-&gt;alsa_periods_in_buffer - 1); i++) {
</span><span class="cx">           res = snd_pcm_writei(p-&gt;alsap, silencebuf, len / 2);
</span><span class="cx">           if (res != len / 2) {
</span><del>-            DEBUGA_SOUND(&quot;Write returned a different quantity: %d\n&quot;, CELLIAX_P_LOG, res);
</del><ins>+            DEBUGA_SOUND(&quot;Write returned a different quantity: %d\n&quot;, SKYPIAX_P_LOG, res);
</ins><span class="cx">             res = -1;
</span><span class="cx">           } else if (res &lt; 0) {
</span><del>-            DEBUGA_SOUND(&quot;Write error %s\n&quot;, CELLIAX_P_LOG, snd_strerror(res));
</del><ins>+            DEBUGA_SOUND(&quot;Write error %s\n&quot;, 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-&gt;alsap, &amp;delayp1);
</span><span class="cx">     if (res &lt; 0) {
</span><del>-      DEBUGA_SOUND(&quot;Error %d on snd_pcm_delay: \&quot;%s\&quot;\n&quot;, CELLIAX_P_LOG, res,
</del><ins>+      DEBUGA_SOUND(&quot;Error %d on snd_pcm_delay: \&quot;%s\&quot;\n&quot;, SKYPIAX_P_LOG, res,
</ins><span class="cx">                    snd_strerror(res));
</span><span class="cx">       res = snd_pcm_prepare(p-&gt;alsap);
</span><span class="cx">       if (res) {
</span><del>-        DEBUGA_SOUND(&quot;snd_pcm_prepare failed: '%s'\n&quot;, CELLIAX_P_LOG, snd_strerror(res));
</del><ins>+        DEBUGA_SOUND(&quot;snd_pcm_prepare failed: '%s'\n&quot;, SKYPIAX_P_LOG, snd_strerror(res));
</ins><span class="cx">       }
</span><span class="cx">       res = snd_pcm_delay(p-&gt;alsap, &amp;delayp1);
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     delayp2 = snd_pcm_avail_update(p-&gt;alsap);
</span><span class="cx">     if (delayp2 &lt; 0) {
</span><del>-      DEBUGA_SOUND(&quot;Error %d on snd_pcm_avail_update: \&quot;%s\&quot;\n&quot;, CELLIAX_P_LOG,
</del><ins>+      DEBUGA_SOUND(&quot;Error %d on snd_pcm_avail_update: \&quot;%s\&quot;\n&quot;, 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-&gt;alsap);
</span><span class="cx">       if (res) {
</span><del>-        DEBUGA_SOUND(&quot;snd_pcm_prepare failed: '%s'\n&quot;, CELLIAX_P_LOG, snd_strerror(res));
</del><ins>+        DEBUGA_SOUND(&quot;snd_pcm_prepare failed: '%s'\n&quot;, SKYPIAX_P_LOG, snd_strerror(res));
</ins><span class="cx">       }
</span><span class="cx">       delayp2 = snd_pcm_avail_update(p-&gt;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">           (&quot;snd_pcm_prepare failed while trying to prevent an ALSA write XRUN: %s, delayp1=%d, delayp2=%d\n&quot;,
</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 &lt; (p-&gt;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 &lt; 0) {
</span><del>-            DEBUGA_SOUND(&quot;Silence error %s\n&quot;, CELLIAX_P_LOG, snd_strerror(res));
</del><ins>+            DEBUGA_SOUND(&quot;Silence error %s\n&quot;, 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-&gt;alsap, silencebuf, len / 2);
</span><span class="cx">           if (res &lt; 0) {
</span><del>-            DEBUGA_SOUND(&quot;Write error %s\n&quot;, CELLIAX_P_LOG, snd_strerror(res));
</del><ins>+            DEBUGA_SOUND(&quot;Write error %s\n&quot;, 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(&quot;Write returned a different quantity: %d\n&quot;, CELLIAX_P_LOG, res);
</del><ins>+            DEBUGA_SOUND(&quot;Write returned a different quantity: %d\n&quot;, 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">           (&quot;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&quot;,
</span><del>-           CELLIAX_P_LOG, p-&gt;alsa_periods_in_buffer, (int) delayp1, (int) delayp2);
</del><ins>+           SKYPIAX_P_LOG, p-&gt;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">         (&quot;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&quot;,
</span><del>-         CELLIAX_P_LOG, p-&gt;alsa_periods_in_buffer, (int) delayp1, (int) delayp2);
</del><ins>+         SKYPIAX_P_LOG, p-&gt;alsa_periods_in_buffer, (int) delayp1, (int) delayp2);
</ins><span class="cx">       res = snd_pcm_prepare(p-&gt;alsap);
</span><span class="cx">       if (res) {
</span><del>-        ERRORA(&quot;audio play prepare failed: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(res));
</del><ins>+        ERRORA(&quot;audio play prepare failed: %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(res));
</ins><span class="cx">       } else {
</span><span class="cx"> 
</span><span class="cx">         if (p-&gt;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(&quot;You've got some big problems\n&quot;, CELLIAX_P_LOG);
</del><ins>+        ERRORA(&quot;You've got some big problems\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">       } else if (res == -EAGAIN) {
</span><span class="cx">         res = 0;
</span><span class="cx">       } else if (res &lt; 0) {
</span><del>-        ERRORA(&quot;Error %d on audio write: \&quot;%s\&quot;\n&quot;, CELLIAX_P_LOG, res,
</del><ins>+        ERRORA(&quot;Error %d on audio write: \&quot;%s\&quot;\n&quot;, 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(&amp;now_timestamp);
</span><span class="cx">     if ((now_timestamp - p-&gt;audio_play_reset_timestamp) &gt; p-&gt;audio_play_reset_period) {
</span><span class="cx">       if (option_debug)
</span><del>-        DEBUGA_SOUND(&quot;reset audio play\n&quot;, CELLIAX_P_LOG);
</del><ins>+        DEBUGA_SOUND(&quot;reset audio play\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">       res = snd_pcm_wait(p-&gt;alsap, 1000);
</span><span class="cx">       if (res &lt; 0) {
</span><del>-        ERRORA(&quot;audio play wait failed: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(res));
</del><ins>+        ERRORA(&quot;audio play wait failed: %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(res));
</ins><span class="cx">       }
</span><span class="cx">       res = snd_pcm_drop(p-&gt;alsap);
</span><span class="cx">       if (res) {
</span><del>-        ERRORA(&quot;audio play drop failed: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(res));
</del><ins>+        ERRORA(&quot;audio play drop failed: %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(res));
</ins><span class="cx">       }
</span><span class="cx">       res = snd_pcm_prepare(p-&gt;alsap);
</span><span class="cx">       if (res) {
</span><del>-        ERRORA(&quot;audio play prepare failed: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(res));
</del><ins>+        ERRORA(&quot;audio play prepare failed: %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(res));
</ins><span class="cx">       }
</span><span class="cx">       res = snd_pcm_wait(p-&gt;alsap, 1000);
</span><span class="cx">       if (res &lt; 0) {
</span><del>-        ERRORA(&quot;audio play wait failed: %s\n&quot;, CELLIAX_P_LOG, snd_strerror(res));
</del><ins>+        ERRORA(&quot;audio play wait failed: %s\n&quot;, SKYPIAX_P_LOG, snd_strerror(res));
</ins><span class="cx">       }
</span><span class="cx">       time(&amp;p-&gt;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">       (&quot;Found PORTAUDIO device: id=%d\tname=%s\tmax input channels=%d\tmax output channels=%d\n&quot;,
</span><del>-       CELLIAX_P_LOG, i, deviceInfo-&gt;name, deviceInfo-&gt;maxInputChannels,
</del><ins>+       SKYPIAX_P_LOG, i, deviceInfo-&gt;name, deviceInfo-&gt;maxInputChannels,
</ins><span class="cx">        deviceInfo-&gt;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-&gt;portaudiocindex &gt; (numdevices - 1)) {
</span><span class="cx">     ERRORA(&quot;Portaudio Capture id=%d is out of range: valid id are from 0 to %d\n&quot;,
</span><del>-           CELLIAX_P_LOG, p-&gt;portaudiocindex, (numdevices - 1));
</del><ins>+           SKYPIAX_P_LOG, p-&gt;portaudiocindex, (numdevices - 1));
</ins><span class="cx">     return -1;
</span><span class="cx">   }
</span><span class="cx"> 
</span><span class="cx">   if (p-&gt;portaudiopindex &gt; (numdevices - 1)) {
</span><span class="cx">     ERRORA(&quot;Portaudio Playback id=%d is out of range: valid id are from 0 to %d\n&quot;,
</span><del>-           CELLIAX_P_LOG, p-&gt;portaudiopindex, (numdevices - 1));
</del><ins>+           SKYPIAX_P_LOG, p-&gt;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">     (&quot;Using INPUT PORTAUDIO device: id=%d\tname=%s\tmax input channels=%d\tmax output channels=%d\n&quot;,
</span><del>-     CELLIAX_P_LOG, inputParameters.device, deviceInfo-&gt;name,
</del><ins>+     SKYPIAX_P_LOG, inputParameters.device, deviceInfo-&gt;name,
</ins><span class="cx">      deviceInfo-&gt;maxInputChannels, deviceInfo-&gt;maxOutputChannels);
</span><span class="cx">   if (deviceInfo-&gt;maxInputChannels == 0) {
</span><span class="cx">     ERRORA
</span><span class="cx">       (&quot;No INPUT channels on device: id=%d\tname=%s\tmax input channels=%d\tmax output channels=%d\n&quot;,
</span><del>-       CELLIAX_P_LOG, inputParameters.device, deviceInfo-&gt;name,
</del><ins>+       SKYPIAX_P_LOG, inputParameters.device, deviceInfo-&gt;name,
</ins><span class="cx">        deviceInfo-&gt;maxInputChannels, deviceInfo-&gt;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">     (&quot;Using OUTPUT PORTAUDIO device: id=%d\tname=%s\tmax input channels=%d\tmax output channels=%d\n&quot;,
</span><del>-     CELLIAX_P_LOG, outputParameters.device, deviceInfo-&gt;name,
</del><ins>+     SKYPIAX_P_LOG, outputParameters.device, deviceInfo-&gt;name,
</ins><span class="cx">      deviceInfo-&gt;maxInputChannels, deviceInfo-&gt;maxOutputChannels);
</span><span class="cx">   if (deviceInfo-&gt;maxOutputChannels == 0) {
</span><span class="cx">     ERRORA
</span><span class="cx">       (&quot;No OUTPUT channels on device: id=%d\tname=%s\tmax input channels=%d\tmax output channels=%d\n&quot;,
</span><del>-       CELLIAX_P_LOG, inputParameters.device, deviceInfo-&gt;name,
</del><ins>+       SKYPIAX_P_LOG, inputParameters.device, deviceInfo-&gt;name,
</ins><span class="cx">        deviceInfo-&gt;maxInputChannels, deviceInfo-&gt;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-&gt;audiopipe);
</span><span class="cx">   if (c) {
</span><del>-    ERRORA(&quot;Unable to create audio pipe\n&quot;, CELLIAX_P_LOG);
</del><ins>+    ERRORA(&quot;Unable to create audio pipe\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">     return -1;
</span><span class="cx">   }
</span><span class="cx">   fcntl(p-&gt;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(&quot;Unable to open audio stream: %s\n&quot;, CELLIAX_P_LOG, Pa_GetErrorText(err));
</del><ins>+    ERRORA(&quot;Unable to open audio stream: %s\n&quot;, 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(&quot;1 f-&gt;datalen=: %d\n&quot;, CELLIAX_P_LOG, f-&gt;datalen);
</del><ins>+  //ERRORA(&quot;1 f-&gt;datalen=: %d\n&quot;, SKYPIAX_P_LOG, f-&gt;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-&gt;data = &amp;buf;
</span><span class="cx">   f-&gt;datalen = f-&gt;datalen * 6;
</span><del>-  //ERRORA(&quot;2 f-&gt;datalen=: %d\n&quot;, CELLIAX_P_LOG, f-&gt;datalen);
</del><ins>+  //ERRORA(&quot;2 f-&gt;datalen=: %d\n&quot;, SKYPIAX_P_LOG, f-&gt;datalen);
</ins><span class="cx">   //f-&gt;datalen = f-&gt;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-&gt;datalen / sizeof(short)))
</span><del>-    ERRORA(&quot;WriteAudioStream wrote: %d of %d\n&quot;, CELLIAX_P_LOG, samples,
</del><ins>+    ERRORA(&quot;WriteAudioStream wrote: %d of %d\n&quot;, SKYPIAX_P_LOG, samples,
</ins><span class="cx">            (int) (f-&gt;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 &amp;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-&gt;stream);
</span><span class="cx"> 
</span><span class="cx">   if (err != paNoError)
</span><del>-    ERRORA(&quot;not able to CloseAudioStream\n&quot;, CELLIAX_P_LOG);
</del><ins>+    ERRORA(&quot;not able to CloseAudioStream\n&quot;, 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(&amp;p-&gt;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-&gt;owner) {
</span><span class="cx">     if (p-&gt;owner-&gt;_state != AST_STATE_UP &amp;&amp; p-&gt;owner-&gt;_state != AST_STATE_DOWN) {
</span><del>-      DEBUGA_AT(&quot;No getstatus, we're neither UP nor DOWN\n&quot;, CELLIAX_P_LOG);
</del><ins>+      DEBUGA_SKYPE(&quot;No getstatus, we're neither UP nor DOWN\n&quot;, 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, &quot;AT&quot;);
</span><span class="cx">   if (res) {
</span><span class="cx">     ERRORA(&quot;AT was not acknowledged, continuing but maybe there is a problem\n&quot;,
</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-&gt;at_query_battchg, p-&gt;at_query_battchg_expect);
</span><span class="cx">     if (res) {
</span><del>-      WARNINGA(&quot;%s does not get %s from the phone. Continuing.\n&quot;, CELLIAX_P_LOG,
</del><ins>+      WARNINGA(&quot;%s does not get %s from the phone. Continuing.\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                p-&gt;at_query_battchg, p-&gt;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-&gt;at_query_signal, p-&gt;at_query_signal_expect);
</span><span class="cx">     if (res) {
</span><del>-      WARNINGA(&quot;%s does not get %s from the phone. Continuing.\n&quot;, CELLIAX_P_LOG,
</del><ins>+      WARNINGA(&quot;%s does not get %s from the phone. Continuing.\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                p-&gt;at_query_signal, p-&gt;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">         (&quot;%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&quot;,
</span><del>-         CELLIAX_P_LOG, &quot;AT+MMGL=\&quot;HEADER ONLY\&quot;&quot;, &quot;OK&quot;);
</del><ins>+         SKYPIAX_P_LOG, &quot;AT+MMGL=\&quot;HEADER ONLY\&quot;&quot;, &quot;OK&quot;);
</ins><span class="cx">     } else {
</span><span class="cx">       usleep(1000);
</span><span class="cx">       if (p-&gt;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">               (&quot;AT+CSCS=\&quot;UCS2\&quot; (set TE messages to ucs2)  do not got OK from the phone\n&quot;,
</span><del>-               CELLIAX_P_LOG);
</del><ins>+               SKYPIAX_P_LOG);
</ins><span class="cx">             memset(p-&gt;sms_message, 0, sizeof(p-&gt;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">             (&quot;AT+CMGR (read SMS) do not got OK from the phone, message sent was:|||%s|||\n&quot;,
</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, &quot;AT+CSCS=\&quot;GSM\&quot;&quot;);
</span><span class="cx">         if (res) {
</span><span class="cx">           ERRORA
</span><span class="cx">             (&quot;AT+CSCS=\&quot;GSM\&quot; (set TE messages to GSM) do not got OK from the phone\n&quot;,
</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, &quot;AT+CMGD=%d&quot;, p-&gt;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">             (&quot;AT+CMGD (Delete SMS) do not got OK from the phone, message sent was:|||%s|||\n&quot;,
</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-&gt;sms_message)) {
</span><span class="lines">@@ -2753,7 +3242,7 @@
</span><span class="cx">             char *arg1[] = { p-&gt;sms_receiving_program, (char *) NULL };
</span><span class="cx">             int i;
</span><span class="cx"> 
</span><del>-            NOTICA(&quot;incoming SMS message:&gt;&gt;&gt;%s&lt;&lt;&lt;\n&quot;, CELLIAX_P_LOG, p-&gt;sms_message);
</del><ins>+            NOTICA(&quot;incoming SMS message:&gt;&gt;&gt;%s&lt;&lt;&lt;\n&quot;, SKYPIAX_P_LOG, p-&gt;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">                   (&quot;'sms_receiving_program' is set in config file to '%s', and it gave us back this error: %d, (%s). SMS received was:---%s---\n&quot;,
</span><del>-                   CELLIAX_P_LOG, p-&gt;sms_receiving_program, err, strerror(errno),
</del><ins>+                   SKYPIAX_P_LOG, p-&gt;sms_receiving_program, err, strerror(errno),
</ins><span class="cx">                    p-&gt;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">               (&quot;got SMS incoming message, but 'sms_receiving_program' is not set in config file. SMS received was:---%s---\n&quot;,
</span><del>-               CELLIAX_P_LOG, p-&gt;sms_message);
</del><ins>+               SKYPIAX_P_LOG, p-&gt;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">               (&quot;AT+CKPD=\&quot;EEE\&quot; (cellphone screen back to user) do not got OK from the phone\n&quot;,
</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(&amp;read_fds);
</span><span class="cx">   FD_SET(p-&gt;controldevfd, &amp;read_fds);
</span><span class="cx"> 
</span><del>-  //NOTICA (&quot; INSIDE this celliax_serial_device %s \n&quot;, CELLIAX_P_LOG, p-&gt;controldevice_name);
</del><ins>+  //NOTICA (&quot; INSIDE this celliax_serial_device %s \n&quot;, SKYPIAX_P_LOG, p-&gt;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">         (&quot;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&quot;,
</span><del>-         CELLIAX_P_LOG, p-&gt;controldevice_name);
</del><ins>+         SKYPIAX_P_LOG, p-&gt;controldevice_name);
</ins><span class="cx">       p-&gt;controldev_dead = 1;
</span><span class="cx">       close(p-&gt;controldevfd);
</span><span class="cx">       UNLOCKA(&amp;p-&gt;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 &gt; 90) {
</span><del>-      //DEBUGA_AT(&quot;1 read %d bytes, --|%s|--\n&quot;, CELLIAX_P_LOG, read_count, tmp_answer_ptr);
-      //DEBUGA_AT(&quot;2 read %d bytes, --|%s|--\n&quot;, CELLIAX_P_LOG, read_count, tmp_answer);
</del><ins>+      //DEBUGA_SKYPE(&quot;1 read %d bytes, --|%s|--\n&quot;, SKYPIAX_P_LOG, read_count, tmp_answer_ptr);
+      //DEBUGA_SKYPE(&quot;2 read %d bytes, --|%s|--\n&quot;, 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) &gt; AT_MESG_MAX_LENGTH) {
</span><span class="cx">         WARNINGA
</span><span class="cx">           (&quot;AT mesg longer than buffer, original message was: |%s|, in buffer only: |%s|\n&quot;,
</span><del>-           CELLIAX_P_LOG, token_ptr, p-&gt;line_array.result[la_counter]);
</del><ins>+           SKYPIAX_P_LOG, token_ptr, p-&gt;line_array.result[la_counter]);
</ins><span class="cx">       }
</span><span class="cx">       la_counter++;
</span><span class="cx">       while ((token_ptr = strtok(NULL, &quot;\n\r&quot;))) {
</span><span class="lines">@@ -2880,7 +3369,7 @@
</span><span class="cx">         if (strlen(token_ptr) &gt; AT_MESG_MAX_LENGTH) {
</span><span class="cx">           WARNINGA
</span><span class="cx">             (&quot;AT mesg longer than buffer, original message was: |%s|, in buffer only: |%s|\n&quot;,
</span><del>-             CELLIAX_P_LOG, token_ptr, p-&gt;line_array.result[la_counter]);
</del><ins>+             SKYPIAX_P_LOG, token_ptr, p-&gt;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 &amp;&amp; !expect_crlf) {
</span><del>-      DEBUGA_AT
</del><ins>+      DEBUGA_SKYPE
</ins><span class="cx">         (&quot;last_line_ptr=|%s|, expected_string=|%s|, expect_crlf=%d, memcmp(last_line_ptr, expected_string, strlen(expected_string)) = %d\n&quot;,
</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 &gt; 1) {
</span><span class="cx">       for (i = la_read; i &lt; la_counter; i++)
</span><del>-        DEBUGA_AT(&quot;Read line %d: |%s|\n&quot;, CELLIAX_P_LOG, i, p-&gt;line_array.result[i]);
</del><ins>+        DEBUGA_SKYPE(&quot;Read line %d: |%s|\n&quot;, SKYPIAX_P_LOG, i, p-&gt;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-&gt;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(&quot;|%s| got second RING\n&quot;, CELLIAX_P_LOG, p-&gt;line_array.result[i]);
</del><ins>+          DEBUGA_SKYPE(&quot;|%s| got second RING\n&quot;, SKYPIAX_P_LOG, p-&gt;line_array.result[i]);
</ins><span class="cx">           p-&gt;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-&gt;at_has_clcc != 0) {
</span><span class="cx">             /* we're at the first ring, try to get CALLID (with +CLCC) */
</span><del>-            DEBUGA_AT(&quot;|%s| got first RING, sending AT+CLCC?\n&quot;, CELLIAX_P_LOG,
</del><ins>+            DEBUGA_SKYPE(&quot;|%s| got first RING, sending AT+CLCC?\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                       p-&gt;line_array.result[i]);
</span><span class="cx">             res = celliax_serial_write_AT_noack(p, &quot;AT+CLCC?&quot;);
</span><span class="cx">             if (res) {
</span><span class="cx">               ERRORA(&quot;AT+CLCC? (call list) was not correctly sent to the phone\n&quot;,
</span><del>-                     CELLIAX_P_LOG);
</del><ins>+                     SKYPIAX_P_LOG);
</ins><span class="cx">             }
</span><span class="cx">           } else {
</span><del>-            DEBUGA_AT(&quot;|%s| got first RING, but not sending AT+CLCC? as this device &quot;
-                      &quot;seems not to support\n&quot;, CELLIAX_P_LOG, p-&gt;line_array.result[i]);
</del><ins>+            DEBUGA_SKYPE(&quot;|%s| got first RING, but not sending AT+CLCC? as this device &quot;
+                      &quot;seems not to support\n&quot;, SKYPIAX_P_LOG, p-&gt;line_array.result[i]);
</ins><span class="cx">           }
</span><span class="cx">         }
</span><span class="cx">         p-&gt;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-&gt;phone_callflow = CALLFLOW_INCOMING_RING;
</span><del>-        DEBUGA_AT(&quot;|%s| CLCC CALLID: name is %s, number is %s\n&quot;, CELLIAX_P_LOG,
</del><ins>+        DEBUGA_SKYPE(&quot;|%s| CLCC CALLID: name is %s, number is %s\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                   p-&gt;line_array.result[i],
</span><span class="cx">                   p-&gt;callid_name[0] ? p-&gt;callid_name : &quot;not available&quot;,
</span><span class="cx">                   p-&gt;callid_number[0] ? p-&gt;callid_number : &quot;not available&quot;);
</span><span class="lines">@@ -3015,14 +3504,14 @@
</span><span class="cx"> 
</span><span class="cx">         if (p-&gt;interface_state != AST_STATE_RING) {
</span><span class="cx">           gettimeofday(&amp;(p-&gt;call_incoming_time), NULL);
</span><del>-          DEBUGA_AT(&quot;AST_STATE_RING call_incoming_time.tv_sec=%ld\n&quot;,
-                    CELLIAX_P_LOG, p-&gt;call_incoming_time.tv_sec);
</del><ins>+          DEBUGA_SKYPE(&quot;AST_STATE_RING call_incoming_time.tv_sec=%ld\n&quot;,
+                    SKYPIAX_P_LOG, p-&gt;call_incoming_time.tv_sec);
</ins><span class="cx"> 
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         p-&gt;interface_state = AST_STATE_RING;
</span><span class="cx">         p-&gt;phone_callflow = CALLFLOW_INCOMING_RING;
</span><del>-        DEBUGA_AT(&quot;|%s| CLIP INCOMING CALLID: name is %s, number is %s\n&quot;, CELLIAX_P_LOG,
</del><ins>+        DEBUGA_SKYPE(&quot;|%s| CLIP INCOMING CALLID: name is %s, number is %s\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                   p-&gt;line_array.result[i],
</span><span class="cx">                   p-&gt;callid_name[0] != 1 ? p-&gt;callid_name : &quot;not available&quot;,
</span><span class="cx">                   p-&gt;callid_number[0] ? p-&gt;callid_number : &quot;not available&quot;);
</span><span class="lines">@@ -3031,37 +3520,37 @@
</span><span class="cx">       if ((strcmp(p-&gt;line_array.result[i], &quot;BUSY&quot;) == 0)) {
</span><span class="cx">         p-&gt;phone_callflow = CALLFLOW_CALL_LINEBUSY;
</span><span class="cx">         if (option_debug &gt; 1)
</span><del>-          DEBUGA_AT(&quot;|%s| CALLFLOW_CALL_LINEBUSY\n&quot;, CELLIAX_P_LOG,
</del><ins>+          DEBUGA_SKYPE(&quot;|%s| CALLFLOW_CALL_LINEBUSY\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                     p-&gt;line_array.result[i]);
</span><span class="cx">         if (p-&gt;interface_state != AST_STATE_DOWN &amp;&amp; p-&gt;owner) {
</span><span class="cx">           ast_setstate(p-&gt;owner, AST_STATE_BUSY);
</span><span class="cx">           celliax_queue_control(p-&gt;owner, AST_CONTROL_BUSY);
</span><span class="cx">         } else {
</span><del>-          ERRORA(&quot;Why BUSY now?\n&quot;, CELLIAX_P_LOG);
</del><ins>+          ERRORA(&quot;Why BUSY now?\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">         }
</span><span class="cx">       }
</span><span class="cx">       if ((strcmp(p-&gt;line_array.result[i], &quot;NO ANSWER&quot;) == 0)) {
</span><span class="cx">         p-&gt;phone_callflow = CALLFLOW_CALL_NOANSWER;
</span><span class="cx">         if (option_debug &gt; 1)
</span><del>-          DEBUGA_AT(&quot;|%s| CALLFLOW_CALL_NOANSWER\n&quot;, CELLIAX_P_LOG,
</del><ins>+          DEBUGA_SKYPE(&quot;|%s| CALLFLOW_CALL_NOANSWER\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                     p-&gt;line_array.result[i]);
</span><span class="cx">         if (p-&gt;interface_state != AST_STATE_DOWN &amp;&amp; p-&gt;owner) {
</span><span class="cx">           p-&gt;owner-&gt;hangupcause = AST_CAUSE_NO_ANSWER;
</span><span class="cx">           celliax_queue_control(p-&gt;owner, AST_CONTROL_HANGUP);
</span><span class="cx">         } else {
</span><del>-          ERRORA(&quot;Why NO ANSWER now?\n&quot;, CELLIAX_P_LOG);
</del><ins>+          ERRORA(&quot;Why NO ANSWER now?\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">         }
</span><span class="cx">       }
</span><span class="cx">       if ((strcmp(p-&gt;line_array.result[i], &quot;NO CARRIER&quot;) == 0)) {
</span><span class="cx">         p-&gt;phone_callflow = CALLFLOW_CALL_NOCARRIER;
</span><span class="cx">         if (option_debug &gt; 1)
</span><del>-          DEBUGA_AT(&quot;|%s| CALLFLOW_CALL_NOCARRIER\n&quot;, CELLIAX_P_LOG,
</del><ins>+          DEBUGA_SKYPE(&quot;|%s| CALLFLOW_CALL_NOCARRIER\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                     p-&gt;line_array.result[i]);
</span><span class="cx">         if (p-&gt;interface_state != AST_STATE_DOWN &amp;&amp; p-&gt;owner) {
</span><span class="cx">           p-&gt;owner-&gt;hangupcause = AST_CAUSE_FAILURE;
</span><span class="cx">           celliax_queue_control(p-&gt;owner, AST_CONTROL_HANGUP);
</span><span class="cx">         } else {
</span><del>-          ERRORA(&quot;Why NO CARRIER now?\n&quot;, CELLIAX_P_LOG);
</del><ins>+          ERRORA(&quot;Why NO CARRIER now?\n&quot;, 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(&amp;p-&gt;line_array.result[i][6], &quot;%d,%d&quot;, &amp;power_supply, &amp;battery_strenght);
</span><span class="cx">         if (err &lt; 2) {
</span><del>-          DEBUGA_AT(&quot;|%s| is not formatted as: |+CBC: xx,yy| now trying  |+CBC:xx,yy|\n&quot;,
-                    CELLIAX_P_LOG, p-&gt;line_array.result[i]);
</del><ins>+          DEBUGA_SKYPE(&quot;|%s| is not formatted as: |+CBC: xx,yy| now trying  |+CBC:xx,yy|\n&quot;,
+                    SKYPIAX_P_LOG, p-&gt;line_array.result[i]);
</ins><span class="cx"> 
</span><span class="cx">           err =
</span><span class="cx">             sscanf(&amp;p-&gt;line_array.result[i][5], &quot;%d,%d&quot;, &amp;power_supply,
</span><span class="cx">                    &amp;battery_strenght);
</span><del>-          DEBUGA_AT(&quot;|%s| +CBC: Powered by %s, battery strenght=%d\n&quot;, CELLIAX_P_LOG,
</del><ins>+          DEBUGA_SKYPE(&quot;|%s| +CBC: Powered by %s, battery strenght=%d\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                     p-&gt;line_array.result[i], power_supply ? &quot;power supply&quot; : &quot;battery&quot;,
</span><span class="cx">                     battery_strenght);
</span><span class="cx"> 
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (err &lt; 2) {
</span><del>-          DEBUGA_AT(&quot;|%s| is not formatted as: |+CBC:xx,yy| giving up\n&quot;, CELLIAX_P_LOG,
</del><ins>+          DEBUGA_SKYPE(&quot;|%s| is not formatted as: |+CBC:xx,yy| giving up\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                     p-&gt;line_array.result[i]);
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         else {
</span><span class="cx">           if (option_debug &gt; 1)
</span><del>-            DEBUGA_AT(&quot;|%s| +CBC: Powered by %s, battery strenght=%d\n&quot;, CELLIAX_P_LOG,
</del><ins>+            DEBUGA_SKYPE(&quot;|%s| +CBC: Powered by %s, battery strenght=%d\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                       p-&gt;line_array.result[i], power_supply ? &quot;power supply&quot; : &quot;battery&quot;,
</span><span class="cx">                       battery_strenght);
</span><span class="cx">           if (!power_supply) {
</span><span class="cx">             if (battery_strenght &lt; 10) {
</span><del>-              ERRORA(&quot;|%s| BATTERY ALMOST EXHAUSTED\n&quot;, CELLIAX_P_LOG,
</del><ins>+              ERRORA(&quot;|%s| BATTERY ALMOST EXHAUSTED\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                      p-&gt;line_array.result[i]);
</span><span class="cx">             } else if (battery_strenght &lt; 20) {
</span><del>-              WARNINGA(&quot;|%s| BATTERY LOW\n&quot;, CELLIAX_P_LOG, p-&gt;line_array.result[i]);
</del><ins>+              WARNINGA(&quot;|%s| BATTERY LOW\n&quot;, SKYPIAX_P_LOG, p-&gt;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(&amp;p-&gt;line_array.result[i][6], &quot;%d,%d&quot;, &amp;signal_quality, &amp;ber);
</span><span class="cx">         if (option_debug &gt; 1)
</span><del>-          DEBUGA_AT(&quot;|%s| +CSQ: Signal Quality: %d, Error Rate=%d\n&quot;, CELLIAX_P_LOG,
</del><ins>+          DEBUGA_SKYPE(&quot;|%s| +CSQ: Signal Quality: %d, Error Rate=%d\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                     p-&gt;line_array.result[i], signal_quality, ber);
</span><span class="cx">         if (err &lt; 2) {
</span><del>-          ERRORA(&quot;|%s| is not formatted as: |+CSQ: xx,yy|\n&quot;, CELLIAX_P_LOG,
</del><ins>+          ERRORA(&quot;|%s| is not formatted as: |+CSQ: xx,yy|\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                  p-&gt;line_array.result[i]);
</span><span class="cx">         } else {
</span><span class="cx">           if (signal_quality &lt; 11 || signal_quality == 99) {
</span><span class="cx">             WARNINGA
</span><span class="cx">               (&quot;|%s| CELLPHONE GETS ALMOST NO SIGNAL, consider to move it or additional antenna\n&quot;,
</span><del>-               CELLIAX_P_LOG, p-&gt;line_array.result[i]);
</del><ins>+               SKYPIAX_P_LOG, p-&gt;line_array.result[i]);
</ins><span class="cx">           } else if (signal_quality &lt; 15) {
</span><del>-            WARNINGA(&quot;|%s| CELLPHONE GETS SIGNAL LOW\n&quot;, CELLIAX_P_LOG,
</del><ins>+            WARNINGA(&quot;|%s| CELLPHONE GETS SIGNAL LOW\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                      p-&gt;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(&amp;p-&gt;line_array.result[i][7], &quot;%s&quot;, p-&gt;at_cmgw);
</span><del>-        DEBUGA_AT(&quot;|%s| +CMGW: %s\n&quot;, CELLIAX_P_LOG, p-&gt;line_array.result[i], p-&gt;at_cmgw);
</del><ins>+        DEBUGA_SKYPE(&quot;|%s| +CMGW: %s\n&quot;, SKYPIAX_P_LOG, p-&gt;line_array.result[i], p-&gt;at_cmgw);
</ins><span class="cx">         if (err &lt; 1) {
</span><del>-          ERRORA(&quot;|%s| is not formatted as: |+CMGW: xxxx|\n&quot;, CELLIAX_P_LOG,
</del><ins>+          ERRORA(&quot;|%s| is not formatted as: |+CMGW: xxxx|\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                  p-&gt;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-&gt;line_array.result[i], p-&gt;at_call_idle) == 0)) {
</span><span class="cx">         p-&gt;phone_callflow = CALLFLOW_CALL_IDLE;
</span><span class="cx">         if (option_debug &gt; 1)
</span><del>-          DEBUGA_AT(&quot;|%s| CALLFLOW_CALL_IDLE\n&quot;, CELLIAX_P_LOG, p-&gt;line_array.result[i]);
</del><ins>+          DEBUGA_SKYPE(&quot;|%s| CALLFLOW_CALL_IDLE\n&quot;, SKYPIAX_P_LOG, p-&gt;line_array.result[i]);
</ins><span class="cx">         if (p-&gt;interface_state != AST_STATE_DOWN &amp;&amp; p-&gt;owner) {
</span><del>-          DEBUGA_AT(&quot;just received a remote HANGUP\n&quot;, CELLIAX_P_LOG);
</del><ins>+          DEBUGA_SKYPE(&quot;just received a remote HANGUP\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">           p-&gt;owner-&gt;hangupcause = AST_CAUSE_NORMAL;
</span><span class="cx">           celliax_queue_control(p-&gt;owner, AST_CONTROL_HANGUP);
</span><del>-          DEBUGA_AT(&quot;just sent AST_CONTROL_HANGUP\n&quot;, CELLIAX_P_LOG);
</del><ins>+          DEBUGA_SKYPE(&quot;just sent AST_CONTROL_HANGUP\n&quot;, 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 &gt; 1)
</span><del>-          DEBUGA_AT(&quot;|%s| CALLFLOW_CALL_INCOMING\n&quot;, CELLIAX_P_LOG,
</del><ins>+          DEBUGA_SKYPE(&quot;|%s| CALLFLOW_CALL_INCOMING\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                     p-&gt;line_array.result[i]);
</span><span class="cx"> 
</span><span class="cx">         if (p-&gt;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(&amp;(p-&gt;call_incoming_time), NULL);
</span><span class="cx">           p-&gt;phone_callflow = CALLFLOW_CALL_INCOMING;
</span><del>-          DEBUGA_AT(&quot;CALLFLOW_CALL_INCOMING call_incoming_time.tv_sec=%ld\n&quot;,
-                    CELLIAX_P_LOG, p-&gt;call_incoming_time.tv_sec);
</del><ins>+          DEBUGA_SKYPE(&quot;CALLFLOW_CALL_INCOMING call_incoming_time.tv_sec=%ld\n&quot;,
+                    SKYPIAX_P_LOG, p-&gt;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-&gt;line_array.result[i], p-&gt;at_call_active) == 0)) {
</span><span class="cx">         p-&gt;phone_callflow = CALLFLOW_CALL_ACTIVE;
</span><span class="cx">         if (option_debug &gt; 1)
</span><del>-          DEBUGA_AT(&quot;|%s| CALLFLOW_CALL_ACTIVE\n&quot;, CELLIAX_P_LOG,
</del><ins>+          DEBUGA_SKYPE(&quot;|%s| CALLFLOW_CALL_ACTIVE\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                     p-&gt;line_array.result[i]);
</span><span class="cx"> 
</span><span class="cx">         if (p-&gt;owner &amp;&amp; p-&gt;interface_state == CALLFLOW_CALL_DIALING) {
</span><del>-          DEBUGA_PBX(&quot;just received a remote ANSWER\n&quot;, CELLIAX_P_LOG);
</del><ins>+          DEBUGA_PBX(&quot;just received a remote ANSWER\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">           if (p-&gt;owner-&gt;_state != AST_STATE_UP) {
</span><span class="cx">             celliax_queue_control(p-&gt;owner, AST_CONTROL_RINGING);
</span><del>-            DEBUGA_PBX(&quot;just sent AST_CONTROL_RINGING\n&quot;, CELLIAX_P_LOG);
-            DEBUGA_PBX(&quot;going to send AST_CONTROL_ANSWER\n&quot;, CELLIAX_P_LOG);
</del><ins>+            DEBUGA_PBX(&quot;just sent AST_CONTROL_RINGING\n&quot;, SKYPIAX_P_LOG);
+            DEBUGA_PBX(&quot;going to send AST_CONTROL_ANSWER\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">             celliax_queue_control(p-&gt;owner, AST_CONTROL_ANSWER);
</span><del>-            DEBUGA_PBX(&quot;just sent AST_CONTROL_ANSWER\n&quot;, CELLIAX_P_LOG);
</del><ins>+            DEBUGA_PBX(&quot;just sent AST_CONTROL_ANSWER\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">           }
</span><span class="cx">         } else {
</span><span class="cx">         }
</span><span class="cx">         p-&gt;interface_state = AST_STATE_UP;
</span><del>-        DEBUGA_PBX(&quot;just interface_state UP\n&quot;, CELLIAX_P_LOG);
</del><ins>+        DEBUGA_PBX(&quot;just interface_state UP\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">       }
</span><span class="cx"> 
</span><span class="cx">       if ((strcmp(p-&gt;line_array.result[i], p-&gt;at_call_calling) == 0)) {
</span><span class="cx">         p-&gt;phone_callflow = CALLFLOW_CALL_DIALING;
</span><span class="cx">         if (option_debug &gt; 1)
</span><del>-          DEBUGA_AT(&quot;|%s| CALLFLOW_CALL_DIALING\n&quot;, CELLIAX_P_LOG,
</del><ins>+          DEBUGA_SKYPE(&quot;|%s| CALLFLOW_CALL_DIALING\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                     p-&gt;line_array.result[i]);
</span><span class="cx">       }
</span><span class="cx">       if ((strcmp(p-&gt;line_array.result[i], p-&gt;at_call_failed) == 0)) {
</span><span class="cx">         p-&gt;phone_callflow = CALLFLOW_CALL_FAILED;
</span><span class="cx">         if (option_debug &gt; 1)
</span><del>-          DEBUGA_AT(&quot;|%s| CALLFLOW_CALL_FAILED\n&quot;, CELLIAX_P_LOG,
</del><ins>+          DEBUGA_SKYPE(&quot;|%s| CALLFLOW_CALL_FAILED\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                     p-&gt;line_array.result[i]);
</span><span class="cx">         if (p-&gt;interface_state != AST_STATE_DOWN &amp;&amp; p-&gt;owner) {
</span><span class="cx">           p-&gt;owner-&gt;hangupcause = AST_CAUSE_FAILURE;
</span><span class="lines">@@ -3219,13 +3708,13 @@
</span><span class="cx"> 
</span><span class="cx">       if ((strncmp(p-&gt;line_array.result[i], &quot;+CSCA:&quot;, 6) == 0)) {   //TODO SMS FIXME in config!
</span><span class="cx">         if (option_debug &gt; 1)
</span><del>-          DEBUGA_AT(&quot;|%s| +CSCA: Message Center Address!\n&quot;, CELLIAX_P_LOG,
</del><ins>+          DEBUGA_SKYPE(&quot;|%s| +CSCA: Message Center Address!\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                     p-&gt;line_array.result[i]);
</span><span class="cx">       }
</span><span class="cx"> 
</span><span class="cx">       if ((strncmp(p-&gt;line_array.result[i], &quot;+CMGF:&quot;, 6) == 0)) {   //TODO SMS FIXME in config!
</span><span class="cx">         if (option_debug &gt; 1)
</span><del>-          DEBUGA_AT(&quot;|%s| +CMGF: Message Format!\n&quot;, CELLIAX_P_LOG,
</del><ins>+          DEBUGA_SKYPE(&quot;|%s| +CMGF: Message Format!\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                     p-&gt;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(&quot;|%s| +CMTI: Incoming SMS!\n&quot;, CELLIAX_P_LOG,
</del><ins>+          DEBUGA_SKYPE(&quot;|%s| +CMTI: Incoming SMS!\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                     p-&gt;line_array.result[i]);
</span><span class="cx"> 
</span><span class="cx">         err = sscanf(&amp;p-&gt;line_array.result[i][12], &quot;%d&quot;, &amp;pos);
</span><span class="cx">         if (err &lt; 1) {
</span><del>-          ERRORA(&quot;|%s| is not formatted as: |+CMTI: \&quot;MT\&quot;,xx|\n&quot;, CELLIAX_P_LOG,
</del><ins>+          ERRORA(&quot;|%s| is not formatted as: |+CMTI: \&quot;MT\&quot;,xx|\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                  p-&gt;line_array.result[i]);
</span><span class="cx">         } else {
</span><del>-          DEBUGA_AT(&quot;|%s| +CMTI: Incoming SMS in position: %d!\n&quot;, CELLIAX_P_LOG,
</del><ins>+          DEBUGA_SKYPE(&quot;|%s| +CMTI: Incoming SMS in position: %d!\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                     p-&gt;line_array.result[i], pos);
</span><span class="cx">           p-&gt;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">                   (&quot;AT+CSCS=\&quot;UCS2\&quot; (set TE messages to ucs2)  do not got OK from the phone, continuing\n&quot;,
</span><del>-                   CELLIAX_P_LOG);
</del><ins>+                   SKYPIAX_P_LOG);
</ins><span class="cx">                 //memset(p-&gt;sms_message, 0, sizeof(p-&gt;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">                 (&quot;AT+CMGR (read SMS) do not got OK from the phone, message sent was:|||%s|||\n&quot;,
</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, &quot;AT+CSCS=\&quot;GSM\&quot;&quot;);
</span><span class="cx">             if (res) {
</span><span class="cx">               ERRORA
</span><span class="cx">                 (&quot;AT+CSCS=\&quot;GSM\&quot; (set TE messages to GSM) do not got OK from the phone\n&quot;,
</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, &quot;AT+CMGD=%d&quot;, p-&gt;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">                 (&quot;AT+CMGD (Delete SMS) do not got OK from the phone, message sent was:|||%s|||\n&quot;,
</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-&gt;sms_message)) {
</span><span class="lines">@@ -3299,7 +3788,7 @@
</span><span class="cx">                 char *arg1[] = { p-&gt;sms_receiving_program, (char *) NULL };
</span><span class="cx">                 int i;
</span><span class="cx"> 
</span><del>-                NOTICA(&quot;incoming SMS message:&gt;&gt;&gt;%s&lt;&lt;&lt;\n&quot;, CELLIAX_P_LOG, p-&gt;sms_message);
</del><ins>+                NOTICA(&quot;incoming SMS message:&gt;&gt;&gt;%s&lt;&lt;&lt;\n&quot;, SKYPIAX_P_LOG, p-&gt;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">                       (&quot;'sms_receiving_program' is set in config file to '%s', and it gave us back this error: %d, (%s). SMS received was:---%s---\n&quot;,
</span><del>-                       CELLIAX_P_LOG, p-&gt;sms_receiving_program, err, strerror(errno),
</del><ins>+                       SKYPIAX_P_LOG, p-&gt;sms_receiving_program, err, strerror(errno),
</ins><span class="cx">                        p-&gt;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">                   (&quot;got SMS incoming message, but 'sms_receiving_program' is not set in config file. SMS received was:---%s---\n&quot;,
</span><del>-                   CELLIAX_P_LOG, p-&gt;sms_message);
</del><ins>+                   SKYPIAX_P_LOG, p-&gt;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">                   (&quot;AT+CKPD=\&quot;EEE\&quot; (cellphone screen back to user) do not got OK from the phone\n&quot;,
</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(&quot;|%s| +MMGL: Listing Motorola SMSs!\n&quot;, CELLIAX_P_LOG,
</del><ins>+          DEBUGA_SKYPE(&quot;|%s| +MMGL: Listing Motorola SMSs!\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                     p-&gt;line_array.result[i]);
</span><span class="cx"> 
</span><span class="cx">         err = sscanf(&amp;p-&gt;line_array.result[i][7], &quot;%d&quot;, &amp;p-&gt;unread_sms_msg_id);
</span><span class="cx">         if (err &lt; 1) {
</span><del>-          ERRORA(&quot;|%s| is not formatted as: |+MMGL: xx|\n&quot;, CELLIAX_P_LOG,
</del><ins>+          ERRORA(&quot;|%s| is not formatted as: |+MMGL: xx|\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                  p-&gt;line_array.result[i]);
</span><span class="cx">         }
</span><span class="cx">       }
</span><span class="cx">       if ((strncmp(p-&gt;line_array.result[i], &quot;+CMGL:&quot;, 6) == 0)) {   //TODO  SMS FIXME in config!
</span><span class="cx">         if (option_debug)
</span><del>-          DEBUGA_AT(&quot;|%s| +CMGL: Listing SMSs!\n&quot;, CELLIAX_P_LOG,
</del><ins>+          DEBUGA_SKYPE(&quot;|%s| +CMGL: Listing SMSs!\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                     p-&gt;line_array.result[i]);
</span><span class="cx">       }
</span><span class="cx">       if ((strncmp(p-&gt;line_array.result[i], &quot;+MMGR:&quot;, 6) == 0)) {   //TODO MOTOROLA SMS FIXME in config!
</span><span class="cx">         if (option_debug)
</span><del>-          DEBUGA_AT(&quot;|%s| +MMGR: Reading Motorola SMS!\n&quot;, CELLIAX_P_LOG,
</del><ins>+          DEBUGA_SKYPE(&quot;|%s| +MMGR: Reading Motorola SMS!\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                     p-&gt;line_array.result[i]);
</span><span class="cx">         if (p-&gt;reading_sms_msg)
</span><span class="cx">           p-&gt;reading_sms_msg++;
</span><span class="cx">       }
</span><span class="cx">       if ((strncmp(p-&gt;line_array.result[i], &quot;+CMGR: \&quot;STO U&quot;, 13) == 0)) {  //TODO  SMS FIXME in config!
</span><span class="cx">         if (option_debug)
</span><del>-          DEBUGA_AT(&quot;|%s| +CMGR: Reading stored UNSENT SMS!\n&quot;, CELLIAX_P_LOG,
</del><ins>+          DEBUGA_SKYPE(&quot;|%s| +CMGR: Reading stored UNSENT SMS!\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                     p-&gt;line_array.result[i]);
</span><span class="cx">       } else if ((strncmp(p-&gt;line_array.result[i], &quot;+CMGR: \&quot;STO S&quot;, 13) == 0)) {   //TODO  SMS FIXME in config!
</span><span class="cx">         if (option_debug)
</span><del>-          DEBUGA_AT(&quot;|%s| +CMGR: Reading stored SENT SMS!\n&quot;, CELLIAX_P_LOG,
</del><ins>+          DEBUGA_SKYPE(&quot;|%s| +CMGR: Reading stored SENT SMS!\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                     p-&gt;line_array.result[i]);
</span><span class="cx">       } else if ((strncmp(p-&gt;line_array.result[i], &quot;+CMGR: \&quot;REC R&quot;, 13) == 0)) {   //TODO  SMS FIXME in config!
</span><span class="cx">         if (option_debug)
</span><del>-          DEBUGA_AT(&quot;|%s| +CMGR: Reading received READ SMS!\n&quot;, CELLIAX_P_LOG,
</del><ins>+          DEBUGA_SKYPE(&quot;|%s| +CMGR: Reading received READ SMS!\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                     p-&gt;line_array.result[i]);
</span><span class="cx">       } else if ((strncmp(p-&gt;line_array.result[i], &quot;+CMGR: \&quot;REC U&quot;, 13) == 0)) {   //TODO  SMS FIXME in config!
</span><span class="cx">         if (option_debug)
</span><del>-          DEBUGA_AT(&quot;|%s| +CMGR: Reading received UNREAD SMS!\n&quot;, CELLIAX_P_LOG,
</del><ins>+          DEBUGA_SKYPE(&quot;|%s| +CMGR: Reading received UNREAD SMS!\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                     p-&gt;line_array.result[i]);
</span><span class="cx">         if (p-&gt;reading_sms_msg)
</span><span class="cx">           p-&gt;reading_sms_msg++;
</span><span class="lines">@@ -3399,14 +3888,14 @@
</span><span class="cx">       if ((strcmp(p-&gt;line_array.result[i], &quot;+MCST: 17&quot;) == 0)) {    /* motorola call processing unsolicited messages */
</span><span class="cx">         p-&gt;phone_callflow = CALLFLOW_CALL_INFLUX;
</span><span class="cx">         if (option_debug &gt; 1)
</span><del>-          DEBUGA_AT(&quot;|%s| CALLFLOW_CALL_INFLUX\n&quot;, CELLIAX_P_LOG,
</del><ins>+          DEBUGA_SKYPE(&quot;|%s| CALLFLOW_CALL_INFLUX\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                     p-&gt;line_array.result[i]);
</span><span class="cx">       }
</span><span class="cx"> 
</span><span class="cx">       if ((strcmp(p-&gt;line_array.result[i], &quot;+MCST: 68&quot;) == 0)) {    /* motorola call processing unsolicited messages */
</span><span class="cx">         p-&gt;phone_callflow = CALLFLOW_CALL_NOSERVICE;
</span><span class="cx">         if (option_debug &gt; 1)
</span><del>-          DEBUGA_AT(&quot;|%s| CALLFLOW_CALL_NOSERVICE\n&quot;, CELLIAX_P_LOG,
</del><ins>+          DEBUGA_SKYPE(&quot;|%s| CALLFLOW_CALL_NOSERVICE\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                     p-&gt;line_array.result[i]);
</span><span class="cx">         if (p-&gt;interface_state != AST_STATE_DOWN &amp;&amp; p-&gt;owner) {
</span><span class="cx">           p-&gt;owner-&gt;hangupcause = AST_CAUSE_FAILURE;
</span><span class="lines">@@ -3416,7 +3905,7 @@
</span><span class="cx">       if ((strcmp(p-&gt;line_array.result[i], &quot;+MCST: 70&quot;) == 0)) {    /* motorola call processing unsolicited messages */
</span><span class="cx">         p-&gt;phone_callflow = CALLFLOW_CALL_OUTGOINGRESTRICTED;
</span><span class="cx">         if (option_debug &gt; 1)
</span><del>-          DEBUGA_AT(&quot;|%s| CALLFLOW_CALL_OUTGOINGRESTRICTED\n&quot;, CELLIAX_P_LOG,
</del><ins>+          DEBUGA_SKYPE(&quot;|%s| CALLFLOW_CALL_OUTGOINGRESTRICTED\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                     p-&gt;line_array.result[i]);
</span><span class="cx">         if (p-&gt;interface_state != AST_STATE_DOWN &amp;&amp; p-&gt;owner) {
</span><span class="cx">           p-&gt;owner-&gt;hangupcause = AST_CAUSE_FAILURE;
</span><span class="lines">@@ -3426,7 +3915,7 @@
</span><span class="cx">       if ((strcmp(p-&gt;line_array.result[i], &quot;+MCST: 72&quot;) == 0)) {    /* motorola call processing unsolicited messages */
</span><span class="cx">         p-&gt;phone_callflow = CALLFLOW_CALL_SECURITYFAIL;
</span><span class="cx">         if (option_debug &gt; 1)
</span><del>-          DEBUGA_AT(&quot;|%s| CALLFLOW_CALL_SECURITYFAIL\n&quot;, CELLIAX_P_LOG,
</del><ins>+          DEBUGA_SKYPE(&quot;|%s| CALLFLOW_CALL_SECURITYFAIL\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                     p-&gt;line_array.result[i]);
</span><span class="cx">         if (p-&gt;interface_state != AST_STATE_DOWN &amp;&amp; p-&gt;owner) {
</span><span class="cx">           p-&gt;owner-&gt;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(&quot;phonebook struct: |%s|\n&quot;, CELLIAX_P_LOG, p-&gt;line_array.result[i]);
</del><ins>+            DEBUGA_SKYPE(&quot;phonebook struct: |%s|\n&quot;, SKYPIAX_P_LOG, p-&gt;line_array.result[i]);
</ins><span class="cx"> 
</span><span class="cx">           err =
</span><span class="cx">             sscanf(&amp;p-&gt;line_array.result[i][8], &quot;%d-%d),%d,%d&quot;, &amp;first_entry, &amp;last_entry,
</span><span class="lines">@@ -3455,13 +3944,13 @@
</span><span class="cx">           if (err &lt; 4) {
</span><span class="cx">             ERRORA
</span><span class="cx">               (&quot;phonebook struct: |%s| is nor formatted as: |+CPBR: (1-750),40,14| neither as: |+CPBR: 1-750,40,14|\n&quot;,
</span><del>-               CELLIAX_P_LOG, p-&gt;line_array.result[i]);
</del><ins>+               SKYPIAX_P_LOG, p-&gt;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">                 (&quot;First entry: %d, last entry: %d, phone number max lenght: %d, text max lenght: %d\n&quot;,
</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-&gt;phonebook_first_entry = first_entry;
</span><span class="cx">             p-&gt;phonebook_last_entry = last_entry;
</span><span class="cx">             p-&gt;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(&quot;phonebook entry: |%s|\n&quot;, CELLIAX_P_LOG,
</del><ins>+              DEBUGA_SKYPE(&quot;phonebook entry: |%s|\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                         p-&gt;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 &lt; 4) {
</span><span class="cx">               ERRORA
</span><span class="cx">                 (&quot;err=%d, phonebook entry: |%s| is not formatted as: |+CPBR: 504,\&quot;+39025458068\&quot;,145,\&quot;ciao a tutti\&quot;|\n&quot;,
</span><del>-                 CELLIAX_P_LOG, err, p-&gt;line_array.result[i]);
</del><ins>+                 SKYPIAX_P_LOG, err, p-&gt;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(&quot;Number: %s, Text: %s, Type: %d\n&quot;, CELLIAX_P_LOG, entry_number,
</del><ins>+                DEBUGA_SKYPE(&quot;Number: %s, Text: %s, Type: %d\n&quot;, 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-&gt;phonebook_writing_fp) {
</span><span class="lines">@@ -3518,7 +4007,7 @@
</span><span class="cx">             char entry_text[256] = &quot;&quot;;
</span><span class="cx"> 
</span><span class="cx">             if (option_debug)
</span><del>-              DEBUGA_AT(&quot;phonebook entry: |%s|\n&quot;, CELLIAX_P_LOG,
</del><ins>+              DEBUGA_SKYPE(&quot;phonebook entry: |%s|\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                         p-&gt;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 &lt; 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">                 (&quot;err=%d, phonebook entry: |%s| is not formatted as: |+CPBR: 504,\&quot;+39025458068\&quot;,145,\&quot;ciao a tutti\&quot;|\n&quot;,
</span><del>-                 CELLIAX_P_LOG, err, p-&gt;line_array.result[i]);
</del><ins>+                 SKYPIAX_P_LOG, err, p-&gt;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(&quot;Number: %s, Text: %s, Type: %d\n&quot;, CELLIAX_P_LOG, entry_number,
</del><ins>+                DEBUGA_SKYPE(&quot;Number: %s, Text: %s, Type: %d\n&quot;, SKYPIAX_P_LOG, entry_number,
</ins><span class="cx">                           entry_text, entry_type);
</span><span class="cx">               memset(p-&gt;callid_name, 0, sizeof(p-&gt;callid_name));
</span><span class="cx">               memset(p-&gt;callid_number, 0, sizeof(p-&gt;callid_number));
</span><span class="cx">               strncpy(p-&gt;callid_name, entry_text, sizeof(p-&gt;callid_name));
</span><span class="cx">               strncpy(p-&gt;callid_number, entry_number, sizeof(p-&gt;callid_number));
</span><span class="cx">               if (option_debug)
</span><del>-                DEBUGA_AT(&quot;incoming callid: Text: %s, Number: %s\n&quot;, CELLIAX_P_LOG,
</del><ins>+                DEBUGA_SKYPE(&quot;incoming callid: Text: %s, Number: %s\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                           p-&gt;callid_name, p-&gt;callid_number);
</span><span class="cx"> 
</span><del>-              DEBUGA_AT(&quot;|%s| CPBR INCOMING CALLID: name is %s, number is %s\n&quot;,
-                        CELLIAX_P_LOG, p-&gt;line_array.result[i],
</del><ins>+              DEBUGA_SKYPE(&quot;|%s| CPBR INCOMING CALLID: name is %s, number is %s\n&quot;,
+                        SKYPIAX_P_LOG, p-&gt;line_array.result[i],
</ins><span class="cx">                         p-&gt;callid_name[0] != 1 ? p-&gt;callid_name : &quot;not available&quot;,
</span><span class="cx">                         p-&gt;callid_number[0] ? p-&gt;callid_number : &quot;not available&quot;);
</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(&quot;phonebook entry: |%s|\n&quot;, CELLIAX_P_LOG, p-&gt;line_array.result[i]);
</del><ins>+            DEBUGA_SKYPE(&quot;phonebook entry: |%s|\n&quot;, SKYPIAX_P_LOG, p-&gt;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-&gt;phone_callflow = CALLFLOW_CALL_IDLE;
</span><span class="cx">             p-&gt;interface_state = AST_STATE_DOWN;
</span><span class="cx">             if (option_debug &gt; 1)
</span><del>-              DEBUGA_AT(&quot;|%s| Sony-Ericsson *ECAM/*ECAV: IDLE\n&quot;, CELLIAX_P_LOG,
</del><ins>+              DEBUGA_SKYPE(&quot;|%s| Sony-Ericsson *ECAM/*ECAV: IDLE\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                         p-&gt;line_array.result[i]);
</span><span class="cx">             break;
</span><span class="cx">           case 1:
</span><span class="cx">             if (option_debug &gt; 1)
</span><del>-              DEBUGA_AT(&quot;|%s| Sony-Ericsson *ECAM/*ECAV: CALLING\n&quot;, CELLIAX_P_LOG,
</del><ins>+              DEBUGA_SKYPE(&quot;|%s| Sony-Ericsson *ECAM/*ECAV: CALLING\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                         p-&gt;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-&gt;interface_state = CALLFLOW_CALL_DIALING;
</span><span class="cx">             if (option_debug &gt; 1)
</span><del>-              DEBUGA_AT(&quot;|%s| Sony-Ericsson *ECAM/*ECAV: CONNECTING\n&quot;, CELLIAX_P_LOG,
</del><ins>+              DEBUGA_SKYPE(&quot;|%s| Sony-Ericsson *ECAM/*ECAV: CONNECTING\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                         p-&gt;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-&gt;phone_callflow = CALLFLOW_CALL_ACTIVE;
</span><span class="cx">             p-&gt;interface_state = AST_STATE_UP;
</span><span class="cx">             if (option_debug &gt; 1)
</span><del>-              DEBUGA_AT(&quot;|%s| Sony-Ericsson *ECAM/*ECAV: ACTIVE\n&quot;, CELLIAX_P_LOG,
</del><ins>+              DEBUGA_SKYPE(&quot;|%s| Sony-Ericsson *ECAM/*ECAV: ACTIVE\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                         p-&gt;line_array.result[i]);
</span><span class="cx">             break;
</span><span class="cx">           case 4:
</span><span class="cx">             if (option_debug &gt; 1)
</span><del>-              DEBUGA_AT
</del><ins>+              DEBUGA_SKYPE
</ins><span class="cx">                 (&quot;|%s| Sony-Ericsson *ECAM/*ECAV: don't know how to handle HOLD event\n&quot;,
</span><del>-                 CELLIAX_P_LOG, p-&gt;line_array.result[i]);
</del><ins>+                 SKYPIAX_P_LOG, p-&gt;line_array.result[i]);
</ins><span class="cx">             break;
</span><span class="cx">           case 5:
</span><span class="cx">             if (option_debug &gt; 1)
</span><del>-              DEBUGA_AT
</del><ins>+              DEBUGA_SKYPE
</ins><span class="cx">                 (&quot;|%s| Sony-Ericsson *ECAM/*ECAV: don't know how to handle WAITING event\n&quot;,
</span><del>-                 CELLIAX_P_LOG, p-&gt;line_array.result[i]);
</del><ins>+                 SKYPIAX_P_LOG, p-&gt;line_array.result[i]);
</ins><span class="cx">             break;
</span><span class="cx">           case 6:
</span><span class="cx">             if (option_debug &gt; 1)
</span><del>-              DEBUGA_AT
</del><ins>+              DEBUGA_SKYPE
</ins><span class="cx">                 (&quot;|%s| Sony-Ericsson *ECAM/*ECAV: don't know how to handle ALERTING event\n&quot;,
</span><del>-                 CELLIAX_P_LOG, p-&gt;line_array.result[i]);
</del><ins>+                 SKYPIAX_P_LOG, p-&gt;line_array.result[i]);
</ins><span class="cx">             break;
</span><span class="cx">           case 7:
</span><span class="cx">             if (p-&gt;owner) {
</span><span class="lines">@@ -3636,14 +4125,14 @@
</span><span class="cx">             p-&gt;phone_callflow = CALLFLOW_CALL_LINEBUSY;
</span><span class="cx">             p-&gt;interface_state = AST_STATE_BUSY;
</span><span class="cx">             if (option_debug &gt; 1)
</span><del>-              DEBUGA_AT(&quot;|%s| Sony-Ericsson *ECAM/*ECAV: BUSY\n&quot;, CELLIAX_P_LOG,
</del><ins>+              DEBUGA_SKYPE(&quot;|%s| Sony-Ericsson *ECAM/*ECAV: BUSY\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                         p-&gt;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 &gt; 1)
</span><del>-            DEBUGA_AT(&quot;|%s| Sony-Ericsson *ECAM/*ECAV: could not parse parameters\n&quot;,
-                      CELLIAX_P_LOG, p-&gt;line_array.result[i]);
</del><ins>+            DEBUGA_SKYPE(&quot;|%s| Sony-Ericsson *ECAM/*ECAV: could not parse parameters\n&quot;,
+                      SKYPIAX_P_LOG, p-&gt;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-&gt;line_array.result[i], p-&gt;at_indicator_noservice_string) == 0)) {
</span><span class="cx">         if (option_debug &gt; 1)
</span><del>-          ERRORA(&quot;|%s| at_indicator_noservice_string\n&quot;, CELLIAX_P_LOG,
</del><ins>+          ERRORA(&quot;|%s| at_indicator_noservice_string\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                  p-&gt;line_array.result[i]);
</span><span class="cx">       }
</span><span class="cx"> 
</span><span class="cx">       if ((strcmp(p-&gt;line_array.result[i], p-&gt;at_indicator_nosignal_string) == 0)) {
</span><span class="cx">         if (option_debug &gt; 1)
</span><del>-          ERRORA(&quot;|%s| at_indicator_nosignal_string\n&quot;, CELLIAX_P_LOG,
</del><ins>+          ERRORA(&quot;|%s| at_indicator_nosignal_string\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                  p-&gt;line_array.result[i]);
</span><span class="cx">       }
</span><span class="cx"> 
</span><span class="cx">       if ((strcmp(p-&gt;line_array.result[i], p-&gt;at_indicator_lowsignal_string) == 0)) {
</span><span class="cx">         if (option_debug &gt; 1)
</span><del>-          WARNINGA(&quot;|%s| at_indicator_lowsignal_string\n&quot;, CELLIAX_P_LOG,
</del><ins>+          WARNINGA(&quot;|%s| at_indicator_lowsignal_string\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                    p-&gt;line_array.result[i]);
</span><span class="cx">       }
</span><span class="cx"> 
</span><span class="cx">       if ((strcmp(p-&gt;line_array.result[i], p-&gt;at_indicator_lowbattchg_string) == 0)) {
</span><span class="cx">         if (option_debug &gt; 1)
</span><del>-          WARNINGA(&quot;|%s| at_indicator_lowbattchg_string\n&quot;, CELLIAX_P_LOG,
</del><ins>+          WARNINGA(&quot;|%s| at_indicator_lowbattchg_string\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                    p-&gt;line_array.result[i]);
</span><span class="cx">       }
</span><span class="cx"> 
</span><span class="cx">       if ((strcmp(p-&gt;line_array.result[i], p-&gt;at_indicator_nobattchg_string) == 0)) {
</span><span class="cx">         if (option_debug &gt; 1)
</span><del>-          ERRORA(&quot;|%s| at_indicator_nobattchg_string\n&quot;, CELLIAX_P_LOG,
</del><ins>+          ERRORA(&quot;|%s| at_indicator_nobattchg_string\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                  p-&gt;line_array.result[i]);
</span><span class="cx">       }
</span><span class="cx"> 
</span><span class="cx">       if ((strcmp(p-&gt;line_array.result[i], p-&gt;at_indicator_callactive_string) == 0)) {
</span><span class="cx">         if (option_debug &gt; 1)
</span><del>-          DEBUGA_AT(&quot;|%s| at_indicator_callactive_string\n&quot;, CELLIAX_P_LOG,
</del><ins>+          DEBUGA_SKYPE(&quot;|%s| at_indicator_callactive_string\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                     p-&gt;line_array.result[i]);
</span><span class="cx">       }
</span><span class="cx"> 
</span><span class="cx">       if ((strcmp(p-&gt;line_array.result[i], p-&gt;at_indicator_nocallactive_string) == 0)) {
</span><span class="cx">         if (option_debug &gt; 1)
</span><del>-          DEBUGA_AT(&quot;|%s| at_indicator_nocallactive_string\n&quot;, CELLIAX_P_LOG,
</del><ins>+          DEBUGA_SKYPE(&quot;|%s| at_indicator_nocallactive_string\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                     p-&gt;line_array.result[i]);
</span><span class="cx">       }
</span><span class="cx"> 
</span><span class="cx">       if ((strcmp(p-&gt;line_array.result[i], p-&gt;at_indicator_nocallsetup_string) == 0)) {
</span><span class="cx">         if (option_debug &gt; 1)
</span><del>-          DEBUGA_AT(&quot;|%s| at_indicator_nocallsetup_string\n&quot;, CELLIAX_P_LOG,
</del><ins>+          DEBUGA_SKYPE(&quot;|%s| at_indicator_nocallsetup_string\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                     p-&gt;line_array.result[i]);
</span><span class="cx">       }
</span><span class="cx"> 
</span><span class="cx">       if ((strcmp(p-&gt;line_array.result[i], p-&gt;at_indicator_callsetupincoming_string) ==
</span><span class="cx">            0)) {
</span><span class="cx">         if (option_debug &gt; 1)
</span><del>-          DEBUGA_AT(&quot;|%s| at_indicator_callsetupincoming_string\n&quot;, CELLIAX_P_LOG,
</del><ins>+          DEBUGA_SKYPE(&quot;|%s| at_indicator_callsetupincoming_string\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                     p-&gt;line_array.result[i]);
</span><span class="cx">       }
</span><span class="cx"> 
</span><span class="cx">       if ((strcmp(p-&gt;line_array.result[i], p-&gt;at_indicator_callsetupoutgoing_string) ==
</span><span class="cx">            0)) {
</span><span class="cx">         if (option_debug &gt; 1)
</span><del>-          DEBUGA_AT(&quot;|%s| at_indicator_callsetupoutgoing_string\n&quot;, CELLIAX_P_LOG,
</del><ins>+          DEBUGA_SKYPE(&quot;|%s| at_indicator_callsetupoutgoing_string\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                     p-&gt;line_array.result[i]);
</span><span class="cx">       }
</span><span class="cx"> 
</span><span class="cx">       if ((strcmp(p-&gt;line_array.result[i], p-&gt;at_indicator_callsetupremoteringing_string)
</span><span class="cx">            == 0)) {
</span><span class="cx">         if (option_debug &gt; 1)
</span><del>-          DEBUGA_AT(&quot;|%s| at_indicator_callsetupremoteringing_string\n&quot;, CELLIAX_P_LOG,
</del><ins>+          DEBUGA_SKYPE(&quot;|%s| at_indicator_callsetupremoteringing_string\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                     p-&gt;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-&gt;line_array.result[i], expected_string, strlen(expected_string))
</span><span class="cx">              == 0)) {
</span><span class="cx">           if (option_debug &gt; 1)
</span><del>-            DEBUGA_AT(&quot;|%s| got what EXPECTED\n&quot;, CELLIAX_P_LOG, p-&gt;line_array.result[i]);
</del><ins>+            DEBUGA_SKYPE(&quot;|%s| got what EXPECTED\n&quot;, SKYPIAX_P_LOG, p-&gt;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-&gt;line_array.result[i], &quot;OK&quot;) == 0)) {
</span><span class="cx">           if (option_debug &gt; 1)
</span><del>-            DEBUGA_AT(&quot;got OK\n&quot;, CELLIAX_P_LOG);
</del><ins>+            DEBUGA_SKYPE(&quot;got OK\n&quot;, 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-&gt;line_array.result[i], &quot;ERROR&quot;) == 0)) {
</span><span class="cx">         if (option_debug &gt; 1)
</span><del>-          DEBUGA_AT(&quot;got ERROR\n&quot;, CELLIAX_P_LOG);
</del><ins>+          DEBUGA_SKYPE(&quot;got ERROR\n&quot;, 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">                 &amp;&amp; p-&gt;line_array.result[i][c - 1] != '\\' &amp;&amp; inside_quote == 0) {
</span><span class="cx">               if (inside_comma) {
</span><span class="cx">                 inside_comma = 0;
</span><del>-                //NOTICA(&quot;inside_comma=%d, inside_quote=%d, we're at=%s\n&quot;, CELLIAX_P_LOG, inside_comma, inside_quote, &amp;p-&gt;line_array.result[i][c]);
</del><ins>+                //NOTICA(&quot;inside_comma=%d, inside_quote=%d, we're at=%s\n&quot;, SKYPIAX_P_LOG, inside_comma, inside_quote, &amp;p-&gt;line_array.result[i][c]);
</ins><span class="cx">               } else {
</span><span class="cx">                 inside_comma = 1;
</span><del>-                //NOTICA(&quot;inside_comma=%d, inside_quote=%d, we're at=%s\n&quot;, CELLIAX_P_LOG, inside_comma, inside_quote, &amp;p-&gt;line_array.result[i][c]);
</del><ins>+                //NOTICA(&quot;inside_comma=%d, inside_quote=%d, we're at=%s\n&quot;, SKYPIAX_P_LOG, inside_comma, inside_quote, &amp;p-&gt;line_array.result[i][c]);
</ins><span class="cx">               }
</span><span class="cx">             }
</span><span class="cx">             if (p-&gt;line_array.result[i][c] == '&quot;'
</span><span class="cx">                 &amp;&amp; p-&gt;line_array.result[i][c - 1] != '\\') {
</span><span class="cx">               if (inside_quote) {
</span><span class="cx">                 inside_quote = 0;
</span><del>-                //ERRORA(&quot;END_CONTENT inside_comma=%d, inside_quote=%d, we're at=%s\n&quot;, CELLIAX_P_LOG, inside_comma, inside_quote, &amp;p-&gt;line_array.result[i][c]);
-                DEBUGA_AT(&quot;content=%s\n&quot;, CELLIAX_P_LOG, content);
</del><ins>+                //ERRORA(&quot;END_CONTENT inside_comma=%d, inside_quote=%d, we're at=%s\n&quot;, SKYPIAX_P_LOG, inside_comma, inside_quote, &amp;p-&gt;line_array.result[i][c]);
+                DEBUGA_SKYPE(&quot;content=%s\n&quot;, SKYPIAX_P_LOG, content);
</ins><span class="cx"> 
</span><span class="cx">                 strncat(p-&gt;sms_message, &quot;---&quot;,
</span><span class="cx">                         ((sizeof(p-&gt;sms_message) - strlen(p-&gt;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(&quot;START_CONTENT inside_comma=%d, inside_quote=%d, we're at=%s\n&quot;, CELLIAX_P_LOG, inside_comma, inside_quote, &amp;p-&gt;line_array.result[i][c]);
</del><ins>+                //WARNINGA(&quot;START_CONTENT inside_comma=%d, inside_quote=%d, we're at=%s\n&quot;, SKYPIAX_P_LOG, inside_comma, inside_quote, &amp;p-&gt;line_array.result[i][c]);
</ins><span class="cx">               }
</span><span class="cx">             }
</span><span class="cx">             if (inside_quote &amp;&amp; p-&gt;line_array.result[i][c] != '&quot;') {
</span><span class="lines">@@ -3828,7 +4317,7 @@
</span><span class="cx">           strncat(p-&gt;sms_message, &quot;|||&quot;,
</span><span class="cx">                   ((sizeof(p-&gt;sms_message) - strlen(p-&gt;sms_message)) - 1));
</span><span class="cx"> 
</span><del>-          DEBUGA_AT(&quot;sms_message=%s\n&quot;, CELLIAX_P_LOG, p-&gt;sms_message);
</del><ins>+          DEBUGA_SKYPE(&quot;sms_message=%s\n&quot;, SKYPIAX_P_LOG, p-&gt;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 &gt; AT_MESG_MAX_LINES) {
</span><del>-      ERRORA(&quot;Too many lines in result (&gt;%d). Stopping reader.\n&quot;, CELLIAX_P_LOG,
</del><ins>+      ERRORA(&quot;Too many lines in result (&gt;%d). Stopping reader.\n&quot;, 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(&amp;p-&gt;controldev_lock);
</span><span class="cx">   if (select_err == -1) {
</span><span class="cx">     ERRORA(&quot;select returned -1 on %s, setting controldev_dead, error was: %s\n&quot;,
</span><del>-           CELLIAX_P_LOG, p-&gt;controldevice_name, strerror(errno));
</del><ins>+           SKYPIAX_P_LOG, p-&gt;controldevice_name, strerror(errno));
</ins><span class="cx">     p-&gt;controldev_dead = 1;
</span><span class="cx">     close(p-&gt;controldevfd);
</span><span class="cx">     if (p-&gt;owner)
</span><span class="lines">@@ -3866,28 +4355,28 @@
</span><span class="cx">     struct timeval call_incoming_timeout;
</span><span class="cx">     gettimeofday(&amp;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">       (&quot;CALLFLOW_CALL_INCOMING call_incoming_time.tv_sec=%ld, call_incoming_timeout.tv_sec=%ld\n&quot;,
</span><del>-       CELLIAX_P_LOG, p-&gt;call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
</del><ins>+       SKYPIAX_P_LOG, p-&gt;call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
</ins><span class="cx">     if (call_incoming_timeout.tv_sec &gt; p-&gt;call_incoming_time.tv_sec) {
</span><span class="cx"> 
</span><span class="cx">       p-&gt;call_incoming_time.tv_sec = 0;
</span><span class="cx">       p-&gt;call_incoming_time.tv_usec = 0;
</span><del>-      DEBUGA_AT
</del><ins>+      DEBUGA_SKYPE
</ins><span class="cx">         (&quot;CALLFLOW_CALL_INCOMING call_incoming_time.tv_sec=%ld, call_incoming_timeout.tv_sec=%ld\n&quot;,
</span><del>-         CELLIAX_P_LOG, p-&gt;call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
</del><ins>+         SKYPIAX_P_LOG, p-&gt;call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
</ins><span class="cx">       res = celliax_serial_write_AT_ack(p, &quot;AT+CPBS=RC&quot;);
</span><span class="cx">       if (res) {
</span><span class="cx">         ERRORA
</span><span class="cx">           (&quot;AT+CPBS=RC (select memory of received calls) was not answered by the phone\n&quot;,
</span><del>-           CELLIAX_P_LOG);
</del><ins>+           SKYPIAX_P_LOG);
</ins><span class="cx">       }
</span><span class="cx">       p-&gt;phonebook_querying = 1;
</span><span class="cx">       res = celliax_serial_write_AT_ack(p, &quot;AT+CPBR=?&quot;);
</span><span class="cx">       if (res) {
</span><span class="cx">         ERRORA
</span><span class="cx">           (&quot;AT+CPBS=RC (select memory of received calls) was not answered by the phone\n&quot;,
</span><del>-           CELLIAX_P_LOG);
</del><ins>+           SKYPIAX_P_LOG);
</ins><span class="cx">       }
</span><span class="cx">       p-&gt;phonebook_querying = 0;
</span><span class="cx">       sprintf(list_command, &quot;AT+CPBR=%d,%d&quot;, p-&gt;phonebook_first_entry,
</span><span class="lines">@@ -3895,7 +4384,7 @@
</span><span class="cx">       p-&gt;phonebook_listing_received_calls = 1;
</span><span class="cx">       res = celliax_serial_write_AT_expect_longtime(p, list_command, &quot;OK&quot;);
</span><span class="cx">       if (res) {
</span><del>-        WARNINGA(&quot;AT+CPBR=%d,%d failed, continue\n&quot;, CELLIAX_P_LOG,
</del><ins>+        WARNINGA(&quot;AT+CPBR=%d,%d failed, continue\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                  p-&gt;phonebook_first_entry, p-&gt;phonebook_last_entry);
</span><span class="cx">       }
</span><span class="cx">       p-&gt;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(&amp;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">       (&quot;CALLFLOW_CALL_INCOMING call_incoming_time.tv_sec=%ld, call_incoming_timeout.tv_sec=%ld\n&quot;,
</span><del>-       CELLIAX_P_LOG, p-&gt;call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
</del><ins>+       SKYPIAX_P_LOG, p-&gt;call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
</ins><span class="cx">     if (call_incoming_timeout.tv_sec &gt; p-&gt;ringtime.tv_sec) {
</span><del>-      ERRORA(&quot;Ringing stopped and I have not answered. Why?\n&quot;, CELLIAX_P_LOG);
-      DEBUGA_AT
</del><ins>+      ERRORA(&quot;Ringing stopped and I have not answered. Why?\n&quot;, SKYPIAX_P_LOG);
+      DEBUGA_SKYPE
</ins><span class="cx">         (&quot;CALLFLOW_CALL_INCOMING call_incoming_time.tv_sec=%ld, call_incoming_timeout.tv_sec=%ld\n&quot;,
</span><del>-         CELLIAX_P_LOG, p-&gt;call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
</del><ins>+         SKYPIAX_P_LOG, p-&gt;call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
</ins><span class="cx">       if (p-&gt;owner) {
</span><span class="cx">         celliax_queue_control(p-&gt;owner, AST_CONTROL_HANGUP);
</span><span class="cx">         p-&gt;owner-&gt;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-&gt;line_array.elemcount = la_counter;
</span><del>-  //NOTICA (&quot; OUTSIDE this celliax_serial_device %s \n&quot;, CELLIAX_P_LOG, p-&gt;controldevice_name);
</del><ins>+  //NOTICA (&quot; OUTSIDE this celliax_serial_device %s \n&quot;, SKYPIAX_P_LOG, p-&gt;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-&gt;controldevfd, &amp;data[i], 1);
</span><span class="cx"> 
</span><span class="cx">     if (res != 1) {
</span><del>-      DEBUGA_AT(&quot;Error sending (%.1s): %d (%s)\n&quot;, CELLIAX_P_LOG, &amp;data[i], res,
</del><ins>+      DEBUGA_SKYPE(&quot;Error sending (%.1s): %d (%s)\n&quot;, SKYPIAX_P_LOG, &amp;data[i], res,
</ins><span class="cx">                 strerror(errno));
</span><span class="cx">       usleep(100000);
</span><span class="cx">       for (count = 0; count &lt; 10; count++) {
</span><span class="cx">         res = write(p-&gt;controldevfd, &amp;data[i], 1);
</span><span class="cx">         if (res == 1) {
</span><del>-          DEBUGA_AT(&quot;Successfully RE-sent (%.1s): %d %d (%s)\n&quot;, CELLIAX_P_LOG, &amp;data[i],
</del><ins>+          DEBUGA_SKYPE(&quot;Successfully RE-sent (%.1s): %d %d (%s)\n&quot;, SKYPIAX_P_LOG, &amp;data[i],
</ins><span class="cx">                     count, res, strerror(errno));
</span><span class="cx">           break;
</span><span class="cx">         } else
</span><del>-          DEBUGA_AT(&quot;Error RE-sending (%.1s): %d %d (%s)\n&quot;, CELLIAX_P_LOG, &amp;data[i],
</del><ins>+          DEBUGA_SKYPE(&quot;Error RE-sending (%.1s): %d %d (%s)\n&quot;, SKYPIAX_P_LOG, &amp;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(&quot;Error RE-sending (%.1s): %d %d (%s)\n&quot;, CELLIAX_P_LOG, &amp;data[i], count,
</del><ins>+        ERRORA(&quot;Error RE-sending (%.1s): %d %d (%s)\n&quot;, SKYPIAX_P_LOG, &amp;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 &gt; 1)
</span><del>-      DEBUGA_AT(&quot;sent data... (%.1s)\n&quot;, CELLIAX_P_LOG, &amp;data[i]);
</del><ins>+      DEBUGA_SKYPE(&quot;sent data... (%.1s)\n&quot;, SKYPIAX_P_LOG, &amp;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-&gt;controldevfd, &quot;\r&quot;, 1);
</span><span class="cx"> 
</span><span class="cx">   if (res != 1) {
</span><del>-    DEBUGA_AT(&quot;Error sending (carriage return): %d (%s)\n&quot;, CELLIAX_P_LOG, res,
</del><ins>+    DEBUGA_SKYPE(&quot;Error sending (carriage return): %d (%s)\n&quot;, SKYPIAX_P_LOG, res,
</ins><span class="cx">               strerror(errno));
</span><span class="cx">     usleep(100000);
</span><span class="cx">     for (count = 0; count &lt; 10; count++) {
</span><span class="cx">       res = write(p-&gt;controldevfd, &quot;\r&quot;, 1);
</span><span class="cx"> 
</span><span class="cx">       if (res == 1) {
</span><del>-        DEBUGA_AT(&quot;Successfully RE-sent carriage return: %d %d (%s)\n&quot;, CELLIAX_P_LOG,
</del><ins>+        DEBUGA_SKYPE(&quot;Successfully RE-sent carriage return: %d %d (%s)\n&quot;, 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(&quot;Error RE-sending (carriage return): %d %d (%s)\n&quot;, CELLIAX_P_LOG,
</del><ins>+        DEBUGA_SKYPE(&quot;Error RE-sending (carriage return): %d %d (%s)\n&quot;, 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(&quot;Error RE-sending (carriage return): %d %d (%s)\n&quot;, CELLIAX_P_LOG, count,
</del><ins>+      ERRORA(&quot;Error RE-sending (carriage return): %d %d (%s)\n&quot;, 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 &gt; 1)
</span><del>-    DEBUGA_AT(&quot;sent (carriage return)\n&quot;, CELLIAX_P_LOG);
</del><ins>+    DEBUGA_SKYPE(&quot;sent (carriage return)\n&quot;, 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-&gt;controldevfd, &amp;data[i], 1);
</span><span class="cx"> 
</span><span class="cx">     if (res != 1) {
</span><del>-      DEBUGA_AT(&quot;Error sending (%.1s): %d (%s)\n&quot;, CELLIAX_P_LOG, &amp;data[i], res,
</del><ins>+      DEBUGA_SKYPE(&quot;Error sending (%.1s): %d (%s)\n&quot;, SKYPIAX_P_LOG, &amp;data[i], res,
</ins><span class="cx">                 strerror(errno));
</span><span class="cx">       usleep(100000);
</span><span class="cx">       for (count = 0; count &lt; 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(&quot;Error RE-sending (%.1s): %d %d (%s)\n&quot;, CELLIAX_P_LOG, &amp;data[i],
</del><ins>+          DEBUGA_SKYPE(&quot;Error RE-sending (%.1s): %d %d (%s)\n&quot;, SKYPIAX_P_LOG, &amp;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(&quot;Error RE-sending (%.1s): %d %d (%s)\n&quot;, CELLIAX_P_LOG, &amp;data[i], count,
</del><ins>+        ERRORA(&quot;Error RE-sending (%.1s): %d %d (%s)\n&quot;, SKYPIAX_P_LOG, &amp;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 &gt; 1)
</span><del>-      DEBUGA_AT(&quot;sent data... (%.1s)\n&quot;, CELLIAX_P_LOG, &amp;data[i]);
</del><ins>+      DEBUGA_SKYPE(&quot;sent data... (%.1s)\n&quot;, SKYPIAX_P_LOG, &amp;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 &gt; 1)
</span><del>-    DEBUGA_AT(&quot;celliax_serial_write_AT_noack: %s\n&quot;, CELLIAX_P_LOG, data);
</del><ins>+    DEBUGA_SKYPE(&quot;celliax_serial_write_AT_noack: %s\n&quot;, SKYPIAX_P_LOG, data);
</ins><span class="cx"> 
</span><span class="cx">   PUSHA_UNLOCKA(&amp;p-&gt;controldev_lock);
</span><span class="cx">   LOKKA(&amp;p-&gt;controldev_lock);
</span><span class="cx">   if (celliax_serial_write_AT(p, data) != strlen(data)) {
</span><span class="cx"> 
</span><del>-    ERRORA(&quot;Error sending data... (%s)\n&quot;, CELLIAX_P_LOG, strerror(errno));
</del><ins>+    ERRORA(&quot;Error sending data... (%s)\n&quot;, SKYPIAX_P_LOG, strerror(errno));
</ins><span class="cx">     UNLOCKA(&amp;p-&gt;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(&amp;p-&gt;controldev_lock);
</span><span class="cx">   LOKKA(&amp;p-&gt;controldev_lock);
</span><span class="cx">   if (option_debug &gt; 1)
</span><del>-    DEBUGA_AT(&quot;sending: %s\n&quot;, CELLIAX_P_LOG, data);
</del><ins>+    DEBUGA_SKYPE(&quot;sending: %s\n&quot;, SKYPIAX_P_LOG, data);
</ins><span class="cx">   if (celliax_serial_write_AT(p, data) != strlen(data)) {
</span><del>-    ERRORA(&quot;Error sending data... (%s) \n&quot;, CELLIAX_P_LOG, strerror(errno));
</del><ins>+    ERRORA(&quot;Error sending data... (%s) \n&quot;, SKYPIAX_P_LOG, strerror(errno));
</ins><span class="cx">     UNLOCKA(&amp;p-&gt;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(&amp;p-&gt;controldev_lock);
</span><span class="cx">   LOKKA(&amp;p-&gt;controldev_lock);
</span><span class="cx">   if (option_debug &gt; 1)
</span><del>-    DEBUGA_AT(&quot;sending: %s\n&quot;, CELLIAX_P_LOG, data);
</del><ins>+    DEBUGA_SKYPE(&quot;sending: %s\n&quot;, SKYPIAX_P_LOG, data);
</ins><span class="cx">   if (celliax_serial_write_AT_nocr(p, data) != strlen(data)) {
</span><del>-    ERRORA(&quot;Error sending data... (%s) \n&quot;, CELLIAX_P_LOG, strerror(errno));
</del><ins>+    ERRORA(&quot;Error sending data... (%s) \n&quot;, SKYPIAX_P_LOG, strerror(errno));
</ins><span class="cx">     UNLOCKA(&amp;p-&gt;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(&amp;p-&gt;controldev_lock);
</span><span class="cx">   LOKKA(&amp;p-&gt;controldev_lock);
</span><span class="cx">   if (option_debug &gt; 1)
</span><del>-    DEBUGA_AT(&quot;sending: %s, expecting: %s\n&quot;, CELLIAX_P_LOG, data, expected_string);
</del><ins>+    DEBUGA_SKYPE(&quot;sending: %s, expecting: %s\n&quot;, SKYPIAX_P_LOG, data, expected_string);
</ins><span class="cx">   if (celliax_serial_write_AT(p, data) != strlen(data)) {
</span><del>-    ERRORA(&quot;Error sending data... (%s) \n&quot;, CELLIAX_P_LOG, strerror(errno));
</del><ins>+    ERRORA(&quot;Error sending data... (%s) \n&quot;, SKYPIAX_P_LOG, strerror(errno));
</ins><span class="cx">     UNLOCKA(&amp;p-&gt;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(&amp;p-&gt;controldev_lock);
</span><span class="cx">   LOKKA(&amp;p-&gt;controldev_lock);
</span><span class="cx">   if (option_debug &gt; 1)
</span><del>-    DEBUGA_AT(&quot;expecting: %s\n&quot;, CELLIAX_P_LOG, expected_string);
</del><ins>+    DEBUGA_SKYPE(&quot;expecting: %s\n&quot;, 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(&amp;p-&gt;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-&gt;at_answer, p-&gt;at_answer_expect);
</span><span class="cx">   if (res) {
</span><del>-    DEBUGA_AT
</del><ins>+    DEBUGA_SKYPE
</ins><span class="cx">       (&quot;at_answer command failed, command used: %s, expecting: %s, trying with AT+CKPD=\&quot;S\&quot;\n&quot;,
</span><del>-       CELLIAX_P_LOG, p-&gt;at_answer, p-&gt;at_answer_expect);
</del><ins>+       SKYPIAX_P_LOG, p-&gt;at_answer, p-&gt;at_answer_expect);
</ins><span class="cx"> 
</span><span class="cx">     res = celliax_serial_write_AT_ack(p, &quot;AT+CKPD=\&quot;S\&quot;&quot;);
</span><span class="cx">     if (res) {
</span><span class="cx">       ERRORA(&quot;at_answer command failed, command used: 'AT+CKPD=\&quot;S\&quot;', giving up\n&quot;,
</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-&gt;interface_state = AST_STATE_UP;
</span><span class="cx">   //p-&gt;phone_callflow = CALLFLOW_CALL_ACTIVE;
</span><del>-  DEBUGA_AT(&quot;AT: call answered\n&quot;, CELLIAX_P_LOG);
</del><ins>+  DEBUGA_SKYPE(&quot;AT: call answered\n&quot;, 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-&gt;interface_state != AST_STATE_DOWN) {
</span><span class="cx">     res = celliax_serial_write_AT_expect(p, p-&gt;at_hangup, p-&gt;at_hangup_expect);
</span><span class="cx">     if (res) {
</span><del>-      DEBUGA_AT
</del><ins>+      DEBUGA_SKYPE
</ins><span class="cx">         (&quot;at_hangup command failed, command used: %s, trying to use AT+CKPD=\&quot;EEE\&quot;\n&quot;,
</span><del>-         CELLIAX_P_LOG, p-&gt;at_hangup);
</del><ins>+         SKYPIAX_P_LOG, p-&gt;at_hangup);
</ins><span class="cx">       res = celliax_serial_write_AT_ack(p, &quot;AT+CKPD=\&quot;EEE\&quot;&quot;);
</span><span class="cx">       if (res) {
</span><span class="cx">         ERRORA(&quot;at_hangup command failed, command used: 'AT+CKPD=\&quot;EEE\&quot;'\n&quot;,
</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-&gt;at_initial_pause) {
</span><del>-    DEBUGA_AT(&quot;sleeping for %d usec\n&quot;, CELLIAX_P_LOG, p-&gt;at_initial_pause);
</del><ins>+    DEBUGA_SKYPE(&quot;sleeping for %d usec\n&quot;, SKYPIAX_P_LOG, p-&gt;at_initial_pause);
</ins><span class="cx">     usleep(p-&gt;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-&gt;at_preinit_1)) {
</span><span class="cx">       res = celliax_serial_write_AT_expect(p, p-&gt;at_preinit_1, p-&gt;at_preinit_1_expect);
</span><span class="cx">       if (res) {
</span><del>-        DEBUGA_AT(&quot;%s does not get %s from the phone. Continuing.\n&quot;, CELLIAX_P_LOG,
</del><ins>+        DEBUGA_SKYPE(&quot;%s does not get %s from the phone. Continuing.\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                   p-&gt;at_preinit_1, p-&gt;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-&gt;at_preinit_2)) {
</span><span class="cx">       res = celliax_serial_write_AT_expect(p, p-&gt;at_preinit_2, p-&gt;at_preinit_2_expect);
</span><span class="cx">       if (res) {
</span><del>-        DEBUGA_AT(&quot;%s does not get %s from the phone. Continuing.\n&quot;, CELLIAX_P_LOG,
</del><ins>+        DEBUGA_SKYPE(&quot;%s does not get %s from the phone. Continuing.\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                   p-&gt;at_preinit_2, p-&gt;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-&gt;at_preinit_3)) {
</span><span class="cx">       res = celliax_serial_write_AT_expect(p, p-&gt;at_preinit_3, p-&gt;at_preinit_3_expect);
</span><span class="cx">       if (res) {
</span><del>-        DEBUGA_AT(&quot;%s does not get %s from the phone. Continuing.\n&quot;, CELLIAX_P_LOG,
</del><ins>+        DEBUGA_SKYPE(&quot;%s does not get %s from the phone. Continuing.\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                   p-&gt;at_preinit_3, p-&gt;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-&gt;at_preinit_4)) {
</span><span class="cx">       res = celliax_serial_write_AT_expect(p, p-&gt;at_preinit_4, p-&gt;at_preinit_4_expect);
</span><span class="cx">       if (res) {
</span><del>-        DEBUGA_AT(&quot;%s does not get %s from the phone. Continuing.\n&quot;, CELLIAX_P_LOG,
</del><ins>+        DEBUGA_SKYPE(&quot;%s does not get %s from the phone. Continuing.\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                   p-&gt;at_preinit_4, p-&gt;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-&gt;at_preinit_5)) {
</span><span class="cx">       res = celliax_serial_write_AT_expect(p, p-&gt;at_preinit_5, p-&gt;at_preinit_5_expect);
</span><span class="cx">       if (res) {
</span><del>-        DEBUGA_AT(&quot;%s does not get %s from the phone. Continuing.\n&quot;, CELLIAX_P_LOG,
</del><ins>+        DEBUGA_SKYPE(&quot;%s does not get %s from the phone. Continuing.\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                   p-&gt;at_preinit_5, p-&gt;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-&gt;at_after_preinit_pause) {
</span><del>-    DEBUGA_AT(&quot;sleeping for %d usec\n&quot;, CELLIAX_P_LOG, p-&gt;at_after_preinit_pause);
</del><ins>+    DEBUGA_SKYPE(&quot;sleeping for %d usec\n&quot;, SKYPIAX_P_LOG, p-&gt;at_after_preinit_pause);
</ins><span class="cx">     usleep(p-&gt;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, &quot;AT&quot;);
</span><span class="cx">   if (res) {
</span><del>-    ERRORA(&quot;no response to AT\n&quot;, CELLIAX_P_LOG);
</del><ins>+    ERRORA(&quot;no response to AT\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">     return -1;
</span><span class="cx">   }
</span><span class="cx">   /* for motorola, bring it back to &quot;normal&quot; mode if it happens to be in another mode */
</span><span class="cx">   res = celliax_serial_write_AT_ack(p, &quot;AT+mode=0&quot;);
</span><span class="cx">   if (res) {
</span><del>-    DEBUGA_AT(&quot;AT+mode=0 does not get OK from the phone. If it is NOT Motorola,&quot;
-              &quot; no problem.\n&quot;, CELLIAX_P_LOG);
</del><ins>+    DEBUGA_SKYPE(&quot;AT+mode=0 does not get OK from the phone. If it is NOT Motorola,&quot;
+              &quot; no problem.\n&quot;, 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, &quot;ATZ&quot;);
</span><span class="cx">   if (res) {
</span><del>-    DEBUGA_AT(&quot;ATZ failed\n&quot;, CELLIAX_P_LOG);
</del><ins>+    DEBUGA_SKYPE(&quot;ATZ failed\n&quot;, 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, &quot;ATE0&quot;);
</span><span class="cx">   if (res) {
</span><del>-    DEBUGA_AT(&quot;ATE0 failed\n&quot;, CELLIAX_P_LOG);
</del><ins>+    DEBUGA_SKYPE(&quot;ATE0 failed\n&quot;, 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, &quot;AT+CMEE=0&quot;);
</span><span class="cx">   if (res) {
</span><del>-    DEBUGA_AT(&quot;AT+CMEE failed\n&quot;, CELLIAX_P_LOG);
</del><ins>+    DEBUGA_SKYPE(&quot;AT+CMEE failed\n&quot;, 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, &quot;ATI%d&quot;, i);
</span><span class="cx">     res = celliax_serial_write_AT_ack(p, at_command);
</span><span class="cx">     if (res) {
</span><del>-      DEBUGA_AT(&quot;ATI%d command failed, continue\n&quot;, CELLIAX_P_LOG, i);
</del><ins>+      DEBUGA_SKYPE(&quot;ATI%d command failed, continue\n&quot;, 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, &quot;AT+CGMI&quot;);
</span><span class="cx">   if (res) {
</span><del>-    DEBUGA_AT(&quot;AT+CGMI failed\n&quot;, CELLIAX_P_LOG);
</del><ins>+    DEBUGA_SKYPE(&quot;AT+CGMI failed\n&quot;, 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, &quot;AT+CGMM&quot;);
</span><span class="cx">   if (res) {
</span><del>-    DEBUGA_AT(&quot;AT+CGMM failed\n&quot;, CELLIAX_P_LOG);
</del><ins>+    DEBUGA_SKYPE(&quot;AT+CGMM failed\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">   }
</span><span class="cx"> 
</span><span class="cx">   res = celliax_serial_write_AT_ack(p, &quot;AT+CGSN&quot;);
</span><span class="cx">   if (res) {
</span><del>-    DEBUGA_AT(&quot;AT+CGSN failed\n&quot;, CELLIAX_P_LOG);
</del><ins>+    DEBUGA_SKYPE(&quot;AT+CGSN failed\n&quot;, 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, &quot;AT+CLAC&quot;);
</span><span class="cx">   if (res) {
</span><del>-    DEBUGA_AT(&quot;AT+CLAC failed, continue\n&quot;, CELLIAX_P_LOG);
</del><ins>+    DEBUGA_SKYPE(&quot;AT+CLAC failed, continue\n&quot;, 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, &quot;AT+CNMI=3,1,0,0,0&quot;);
</span><span class="cx">   if (res) {
</span><del>-    DEBUGA_AT(&quot;AT+CNMI=3,1,0,0,0 failed, continue\n&quot;, CELLIAX_P_LOG);
</del><ins>+    DEBUGA_SKYPE(&quot;AT+CNMI=3,1,0,0,0 failed, continue\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">     p-&gt;sms_cnmi_not_supported = 1;
</span><span class="cx">     p-&gt;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, &quot;AT+CSCA?&quot;);
</span><span class="cx">   if (res) {
</span><del>-    DEBUGA_AT(&quot;AT+CSCA? failed, continue\n&quot;, CELLIAX_P_LOG);
</del><ins>+    DEBUGA_SKYPE(&quot;AT+CSCA? failed, continue\n&quot;, 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, &quot;AT+CMGF?&quot;);
</span><span class="cx">   if (res) {
</span><del>-    DEBUGA_AT(&quot;AT+CMGF? failed, continue\n&quot;, CELLIAX_P_LOG);
</del><ins>+    DEBUGA_SKYPE(&quot;AT+CMGF? failed, continue\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">   }
</span><span class="cx">   res = celliax_serial_write_AT_ack(p, &quot;AT+CMGF=1&quot;);    //TODO: support phones that only accept pdu mode
</span><span class="cx">   if (res) {
</span><del>-    ERRORA(&quot;Error setting SMS sending mode to TEXT on the cellphone\n&quot;, CELLIAX_P_LOG);
</del><ins>+    ERRORA(&quot;Error setting SMS sending mode to TEXT on the cellphone\n&quot;, 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, &quot;AT+CSCS?&quot;);
</span><span class="cx">   if (res) {
</span><del>-    DEBUGA_AT(&quot;AT+CSCS? failed, continue\n&quot;, CELLIAX_P_LOG);
</del><ins>+    DEBUGA_SKYPE(&quot;AT+CSCS? failed, continue\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">   }
</span><span class="cx"> 
</span><span class="cx">   p-&gt;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">       (&quot;AT+CSCS=\&quot;UCS2\&quot; (set TE messages to ucs2)  do not got OK from the phone, let's try with 'GSM'\n&quot;,
</span><del>-       CELLIAX_P_LOG);
</del><ins>+       SKYPIAX_P_LOG);
</ins><span class="cx">     p-&gt;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, &quot;AT+CSCS=\&quot;GSM\&quot;&quot;);
</span><span class="cx">     if (res) {
</span><span class="cx">       WARNINGA(&quot;AT+CSCS=\&quot;GSM\&quot; (set TE messages to GSM)  do not got OK from the phone\n&quot;,
</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, &quot;AT+CSMP=17,167,0,16&quot;); //&quot;flash&quot;, class 0  sms 7 bit
</span><span class="cx">     res = celliax_serial_write_AT_ack(p, &quot;AT+CSMP=17,167,0,0&quot;); //normal, 7 bit message
</span><span class="cx">     if (res) {
</span><del>-      WARNINGA(&quot;AT+CSMP do not got OK from the phone, continuing\n&quot;, CELLIAX_P_LOG);
</del><ins>+      WARNINGA(&quot;AT+CSMP do not got OK from the phone, continuing\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">     }
</span><span class="cx">   } else {
</span><span class="cx">     //res = celliax_serial_write_AT_ack(p, &quot;AT+CSMP=17,167,0,20&quot;); //&quot;flash&quot;, class 0 sms 16 bit unicode
</span><span class="cx">     res = celliax_serial_write_AT_ack(p, &quot;AT+CSMP=17,167,0,8&quot;); //unicode, 16 bit message
</span><span class="cx">     if (res) {
</span><del>-      WARNINGA(&quot;AT+CSMP do not got OK from the phone, continuing\n&quot;, CELLIAX_P_LOG);
</del><ins>+      WARNINGA(&quot;AT+CSMP do not got OK from the phone, continuing\n&quot;, 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, &quot;AT+CMER=?&quot;);
</span><span class="cx">   if (res) {
</span><del>-    DEBUGA_AT(&quot;AT+CMER=? failed, continue\n&quot;, CELLIAX_P_LOG);
</del><ins>+    DEBUGA_SKYPE(&quot;AT+CMER=? failed, continue\n&quot;, 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, &quot;AT+CMER=3,0,0,1&quot;);
</span><span class="cx">   if (res) {
</span><del>-    DEBUGA_AT(&quot;AT+CMER=? failed, continue\n&quot;, CELLIAX_P_LOG);
</del><ins>+    DEBUGA_SKYPE(&quot;AT+CMER=? failed, continue\n&quot;, 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, &quot;AT+CIND=?&quot;);
</span><span class="cx">   if (res) {
</span><del>-    DEBUGA_AT(&quot;AT+CIND=? failed, continue\n&quot;, CELLIAX_P_LOG);
</del><ins>+    DEBUGA_SKYPE(&quot;AT+CIND=? failed, continue\n&quot;, 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, &quot;AT*ECAM=?&quot;);
</span><span class="cx">   if (res) {
</span><del>-    DEBUGA_AT(&quot;AT*ECAM=? failed, continue\n&quot;, CELLIAX_P_LOG);
</del><ins>+    DEBUGA_SKYPE(&quot;AT*ECAM=? failed, continue\n&quot;, 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, &quot;AT*ECAM=1&quot;);
</span><span class="cx">   if (res) {
</span><del>-    DEBUGA_AT(&quot;AT*ECAM=1 failed, continue\n&quot;, CELLIAX_P_LOG);
</del><ins>+    DEBUGA_SKYPE(&quot;AT*ECAM=1 failed, continue\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">     p-&gt;at_has_ecam = 0;
</span><span class="cx">   } else {
</span><span class="cx">     p-&gt;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, &quot;AT+CLCC=0&quot;);
</span><span class="cx">   if (res) {
</span><del>-    DEBUGA_AT(&quot;AT+CLCC=0 failed, continue\n&quot;, CELLIAX_P_LOG);
</del><ins>+    DEBUGA_SKYPE(&quot;AT+CLCC=0 failed, continue\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">     p-&gt;at_has_clcc = 0;
</span><span class="cx">   } else {
</span><span class="cx">     p-&gt;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, &quot;AT+CLIP=1&quot;);
</span><span class="cx">   if (res) {
</span><del>-    DEBUGA_AT(&quot;AT+CLIP failed, continue\n&quot;, CELLIAX_P_LOG);
</del><ins>+    DEBUGA_SKYPE(&quot;AT+CLIP failed, continue\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">   }
</span><span class="cx">   /* for motorola */
</span><span class="cx">   res = celliax_serial_write_AT_ack(p, &quot;AT+MCST=1&quot;);    /* motorola call control codes
</span><span class="cx">                                                            (to know when call is disconnected (they
</span><span class="cx">                                                            don't give you &quot;no carrier&quot;) */
</span><span class="cx">   if (res) {
</span><del>-    DEBUGA_AT(&quot;AT+MCST=1 does not get OK from the phone. If it is NOT Motorola,&quot;
-              &quot; no problem.\n&quot;, CELLIAX_P_LOG);
</del><ins>+    DEBUGA_SKYPE(&quot;AT+MCST=1 does not get OK from the phone. If it is NOT Motorola,&quot;
+              &quot; no problem.\n&quot;, 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-&gt;at_postinit_1)) {
</span><span class="cx">       res = celliax_serial_write_AT_expect(p, p-&gt;at_postinit_1, p-&gt;at_postinit_1_expect);
</span><span class="cx">       if (res) {
</span><del>-        DEBUGA_AT(&quot;%s does not get %s from the phone. Continuing.\n&quot;, CELLIAX_P_LOG,
</del><ins>+        DEBUGA_SKYPE(&quot;%s does not get %s from the phone. Continuing.\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                   p-&gt;at_postinit_1, p-&gt;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-&gt;at_postinit_2)) {
</span><span class="cx">       res = celliax_serial_write_AT_expect(p, p-&gt;at_postinit_2, p-&gt;at_postinit_2_expect);
</span><span class="cx">       if (res) {
</span><del>-        DEBUGA_AT(&quot;%s does not get %s from the phone. Continuing.\n&quot;, CELLIAX_P_LOG,
</del><ins>+        DEBUGA_SKYPE(&quot;%s does not get %s from the phone. Continuing.\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                   p-&gt;at_postinit_2, p-&gt;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-&gt;at_postinit_3)) {
</span><span class="cx">       res = celliax_serial_write_AT_expect(p, p-&gt;at_postinit_3, p-&gt;at_postinit_3_expect);
</span><span class="cx">       if (res) {
</span><del>-        DEBUGA_AT(&quot;%s does not get %s from the phone. Continuing.\n&quot;, CELLIAX_P_LOG,
</del><ins>+        DEBUGA_SKYPE(&quot;%s does not get %s from the phone. Continuing.\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                   p-&gt;at_postinit_3, p-&gt;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-&gt;at_postinit_4)) {
</span><span class="cx">       res = celliax_serial_write_AT_expect(p, p-&gt;at_postinit_4, p-&gt;at_postinit_4_expect);
</span><span class="cx">       if (res) {
</span><del>-        DEBUGA_AT(&quot;%s does not get %s from the phone. Continuing.\n&quot;, CELLIAX_P_LOG,
</del><ins>+        DEBUGA_SKYPE(&quot;%s does not get %s from the phone. Continuing.\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                   p-&gt;at_postinit_4, p-&gt;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-&gt;at_postinit_5)) {
</span><span class="cx">       res = celliax_serial_write_AT_expect(p, p-&gt;at_postinit_5, p-&gt;at_postinit_5_expect);
</span><span class="cx">       if (res) {
</span><del>-        DEBUGA_AT(&quot;%s does not get %s from the phone. Continuing.\n&quot;, CELLIAX_P_LOG,
</del><ins>+        DEBUGA_SKYPE(&quot;%s does not get %s from the phone. Continuing.\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                   p-&gt;at_postinit_5, p-&gt;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(&quot;Dialing %s\n&quot;, CELLIAX_P_LOG, dstr);
</del><ins>+    DEBUGA_PBX(&quot;Dialing %s\n&quot;, SKYPIAX_P_LOG, dstr);
</ins><span class="cx">   memset(at_command, 0, sizeof(at_command));
</span><span class="cx">   p-&gt;phone_callflow = CALLFLOW_CALL_DIALING;
</span><span class="cx">   p-&gt;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(&quot;dial command failed because of invalid dial number. dial string was: %s\n&quot;,
</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, &quot;%s%s%s&quot;, p-&gt;at_dial_pre_number, dstr, p-&gt;at_dial_post_number);
</span><span class="cx">   res = celliax_serial_write_AT_expect(p, at_command, p-&gt;at_dial_expect);
</span><span class="cx">   if (res) {
</span><del>-    ERRORA(&quot;dial command failed, dial string was: %s\n&quot;, CELLIAX_P_LOG, at_command);
</del><ins>+    ERRORA(&quot;dial command failed, dial string was: %s\n&quot;, 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(&quot;ucs2_in=%s\n&quot;, CELLIAX_P_LOG, ucs2_in);
</del><ins>+  DEBUGA_SKYPE(&quot;ucs2_in=%s\n&quot;, SKYPIAX_P_LOG, ucs2_in);
</ins><span class="cx">   /* cicopet */
</span><span class="cx">   for (c = 0; c &lt; strlen(ucs2_in); c++) {
</span><span class="cx">     sprintf(stringa, &quot;0x%c%c&quot;, 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(&quot;UTF8&quot;, &quot;UCS-2BE&quot;);
</span><span class="cx">   if (iconv_format == (iconv_t) - 1) {
</span><del>-    ERRORA(&quot;error: %s\n&quot;, CELLIAX_P_LOG, strerror(errno));
</del><ins>+    ERRORA(&quot;error: %s\n&quot;, 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, &amp;inbuf, &amp;inbytesleft, &amp;outbuf, &amp;outbytesleft);
</span><span class="cx">   if (iconv_res == (size_t) - 1) {
</span><del>-    DEBUGA_AT(&quot;ciao in=%s, inleft=%d, out=%s, outleft=%d, converted=%s, utf8_out=%s\n&quot;,
-              CELLIAX_P_LOG, inbuf, inbytesleft, outbuf, outbytesleft, converted,
</del><ins>+    DEBUGA_SKYPE(&quot;ciao in=%s, inleft=%d, out=%s, outleft=%d, converted=%s, utf8_out=%s\n&quot;,
+              SKYPIAX_P_LOG, inbuf, inbytesleft, outbuf, outbytesleft, converted,
</ins><span class="cx">               utf8_out);
</span><del>-    DEBUGA_AT(&quot;error: %s %d\n&quot;, CELLIAX_P_LOG, strerror(errno), errno);
</del><ins>+    DEBUGA_SKYPE(&quot;error: %s %d\n&quot;, 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">     (&quot;iconv_res=%d,  in=%s, inleft=%d, out=%s, outleft=%d, converted=%s, utf8_out=%s\n&quot;,
</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(&quot;UCS-2BE&quot;, &quot;UTF8&quot;);
</span><span class="cx">   if (iconv_format == (iconv_t) - 1) {
</span><del>-    ERRORA(&quot;error: %s\n&quot;, CELLIAX_P_LOG, strerror(errno));
</del><ins>+    ERRORA(&quot;error: %s\n&quot;, 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(&quot;in=%s, inleft=%d, out=%s, outleft=%d, utf_in=%s, converted=%s\n&quot;,
-            CELLIAX_P_LOG, inbuf, inbytesleft, outbuf, outbytesleft, utf_in, converted);
</del><ins>+  DEBUGA_SKYPE(&quot;in=%s, inleft=%d, out=%s, outleft=%d, utf_in=%s, converted=%s\n&quot;,
+            SKYPIAX_P_LOG, inbuf, inbytesleft, outbuf, outbytesleft, utf_in, converted);
</ins><span class="cx">   iconv_res = iconv(iconv_format, &amp;inbuf, &amp;inbytesleft, &amp;outbuf, &amp;outbytesleft);
</span><span class="cx">   if (iconv_res == (size_t) - 1) {
</span><del>-    ERRORA(&quot;error: %s %d\n&quot;, CELLIAX_P_LOG, strerror(errno), errno);
</del><ins>+    ERRORA(&quot;error: %s %d\n&quot;, 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">     (&quot;iconv_res=%d,  in=%s, inleft=%d, out=%s, outleft=%d, utf_in=%s, converted=%s\n&quot;,
</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, &quot;%02X&quot;, converted[i]);
</span><del>-    DEBUGA_AT(&quot;character is |%02X|\n&quot;, CELLIAX_P_LOG, converted[i]);
</del><ins>+    DEBUGA_SKYPE(&quot;character is |%02X|\n&quot;, 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(&quot;stringa=%s, stringa2=%s, ucs2_out=%s\n&quot;, CELLIAX_P_LOG, stringa, stringa2,
</del><ins>+    DEBUGA_SKYPE(&quot;stringa=%s, stringa2=%s, ucs2_out=%s\n&quot;, 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-&gt;name, length) == 0) {
</span><span class="cx">       /* this is the requested interface! */
</span><span class="cx">       if (option_debug)
</span><del>-        DEBUGA_AT(&quot;FOUND! interfacename:%s, destinationnumber:%s, text:%s, p-&gt;name=%s\n&quot;,
-                  CELLIAX_P_LOG, device, dest, text, p-&gt;name);
</del><ins>+        DEBUGA_SKYPE(&quot;FOUND! interfacename:%s, destinationnumber:%s, text:%s, p-&gt;name=%s\n&quot;,
+                  SKYPIAX_P_LOG, device, dest, text, p-&gt;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-&gt;controldevprotocol != PROTOCOL_AT) {
</span><span class="cx">     ERRORA(&quot;CelliaxSendsms supports only AT command cellphones at the moment :-( !\n&quot;,
</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">               (&quot;AT+CSCS=\&quot;UCS2\&quot; (set TE messages to ucs2)  do not got OK from the phone\n&quot;,
</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(&quot;Error sending SMS\n&quot;, CELLIAX_P_LOG);
</del><ins>+      ERRORA(&quot;Error sending SMS\n&quot;, 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, &quot;&gt; &quot;, 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">         (&quot;Error or timeout getting prompt '&gt; ' 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&quot;,
</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, &quot;ATE1&quot;); //motorola (at least c350) do not echo the '&gt;' prompt when in ATE0... go figure!!!!
</span><span class="cx">       if (err) {
</span><del>-        ERRORA(&quot;Error activating echo from modem\n&quot;, CELLIAX_P_LOG);
</del><ins>+        ERRORA(&quot;Error activating echo from modem\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">       }
</span><span class="cx">       p-&gt;at_cmgw[0] = '\0';
</span><span class="cx">       sprintf(smscommand, &quot;AT+CMGW=\&quot;%s\&quot;&quot;, 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(&quot;Error writing SMS destination to the cellphone memory\n&quot;, CELLIAX_P_LOG);
</del><ins>+        ERRORA(&quot;Error writing SMS destination to the cellphone memory\n&quot;, 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">           (&quot;Error or timeout getting prompt '&gt; ' for writing sms text in cellphone memory\n&quot;,
</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(&quot;smscommand len is: %d, text is:|||%s|||\n&quot;, CELLIAX_P_LOG,
</del><ins>+    DEBUGA_SKYPE(&quot;smscommand len is: %d, text is:|||%s|||\n&quot;, 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(&quot;Error writing SMS text to the cellphone memory\n&quot;, CELLIAX_P_LOG);
</del><ins>+      ERRORA(&quot;Error writing SMS text to the cellphone memory\n&quot;, 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, &quot;AT+CMSS=%s&quot;, p-&gt;at_cmgw);
</span><span class="cx">       err = celliax_serial_write_AT_expect_longtime(p, smscommand, &quot;OK&quot;);
</span><span class="cx">       if (err) {
</span><del>-        ERRORA(&quot;Error sending SMS from the cellphone memory\n&quot;, CELLIAX_P_LOG);
</del><ins>+        ERRORA(&quot;Error sending SMS from the cellphone memory\n&quot;, 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, &quot;ATE0&quot;); //motorola (at least c350) do not echo the '&gt;' prompt when in ATE0... go figure!!!!
</span><span class="cx">       if (err) {
</span><del>-        ERRORA(&quot;Error de-activating echo from modem\n&quot;, CELLIAX_P_LOG);
</del><ins>+        ERRORA(&quot;Error de-activating echo from modem\n&quot;, 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, &quot;AT+CMGR=%s&quot;, p-&gt;at_cmgw);
</span><span class="cx">       err = celliax_serial_write_AT_ack(p, smscommand);
</span><span class="cx">       if (err) {
</span><del>-        ERRORA(&quot;Error reading SMS back from the cellphone memory\n&quot;, CELLIAX_P_LOG);
</del><ins>+        ERRORA(&quot;Error reading SMS back from the cellphone memory\n&quot;, 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, &quot;AT+CMGD=%s&quot;, p-&gt;at_cmgw);
</span><span class="cx">       err = celliax_serial_write_AT_ack(p, smscommand);
</span><span class="cx">       if (err) {
</span><del>-        ERRORA(&quot;Error deleting SMS from the cellphone memory\n&quot;, CELLIAX_P_LOG);
</del><ins>+        ERRORA(&quot;Error deleting SMS from the cellphone memory\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">       }
</span><span class="cx"> 
</span><span class="cx">       p-&gt;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">       (&quot;Loading directoriax.conf config file failed. It's not necessary, continuing.\n&quot;,
</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 = &quot;default&quot;;
</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(&quot;celliax_cellphonenumber is: %s\n&quot;, CELLIAX_P_LOG, argv[2]);
</del><ins>+    NOTICA(&quot;celliax_cellphonenumber is: %s\n&quot;, 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(&quot;filename is: %s\n&quot;, CELLIAX_P_LOG, argv[3]);
</del><ins>+      NOTICA(&quot;filename is: %s\n&quot;, SKYPIAX_P_LOG, argv[3]);
</ins><span class="cx">     //ast_cli(fd, &quot;\n\nnot yet implemented :P \n&quot;);
</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(&quot;filename is: %s\n&quot;, CELLIAX_P_LOG, argv[3]);
</del><ins>+      NOTICA(&quot;filename is: %s\n&quot;, SKYPIAX_P_LOG, argv[3]);
</ins><span class="cx">     ast_cli(fd, &quot;\n\nnot yet implemented :P \n&quot;);
</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, &quot;AT+CPBS=SM&quot;);
</span><span class="cx">     if (res) {
</span><del>-      WARNINGA(&quot;AT+CPBS=SM failed, continue\n&quot;, CELLIAX_P_LOG);
</del><ins>+      WARNINGA(&quot;AT+CPBS=SM failed, continue\n&quot;, 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, &quot;AT+CPBS=ME&quot;);
</span><span class="cx">     if (res) {
</span><del>-      WARNINGA(&quot;AT+CPBS=ME failed, continue\n&quot;, CELLIAX_P_LOG);
</del><ins>+      WARNINGA(&quot;AT+CPBS=ME failed, continue\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">     }
</span><span class="cx">     /* retrieve the fields lenght in the selected phonebook  */
</span><span class="cx">     p-&gt;phonebook_querying = 1;
</span><span class="cx">     res = celliax_serial_write_AT_ack(p, &quot;AT+CPBR=?&quot;);
</span><span class="cx">     if (res) {
</span><del>-      WARNINGA(&quot;AT+CPBR=? failed, continue\n&quot;, CELLIAX_P_LOG);
</del><ins>+      WARNINGA(&quot;AT+CPBR=? failed, continue\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">     }
</span><span class="cx">     p-&gt;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(&quot;v-&gt;name=%s\n&quot;, CELLIAX_P_LOG, v-&gt;name);
-        DEBUGA_AT(&quot;v-&gt;value=%s\n&quot;, CELLIAX_P_LOG, v-&gt;value);
</del><ins>+        DEBUGA_SKYPE(&quot;v-&gt;name=%s\n&quot;, SKYPIAX_P_LOG, v-&gt;name);
+        DEBUGA_SKYPE(&quot;v-&gt;value=%s\n&quot;, SKYPIAX_P_LOG, v-&gt;value);
</ins><span class="cx"> 
</span><span class="cx">         stringp = start;
</span><span class="cx">         strsep(&amp;stringp, &quot;,&quot;);
</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(&quot;&lt;pos=&gt;%s&lt;conv=&gt;%s&lt;\n&quot;, CELLIAX_P_LOG, pos, conv);
</del><ins>+            DEBUGA_SKYPE(&quot;&lt;pos=&gt;%s&lt;conv=&gt;%s&lt;\n&quot;, SKYPIAX_P_LOG, pos, conv);
</ins><span class="cx"> 
</span><span class="cx">             options = strdup(v-&gt;value);
</span><span class="cx">             strsep(&amp;options, &quot;,&quot;);
</span><span class="cx">             strsep(&amp;options, &quot;,&quot;);
</span><span class="cx">             strsep(&amp;options, &quot;,&quot;);
</span><span class="cx">             strsep(&amp;options, &quot;,&quot;);
</span><del>-            DEBUGA_AT(&quot;options=%s\n&quot;, CELLIAX_P_LOG, options);
</del><ins>+            DEBUGA_SKYPE(&quot;options=%s\n&quot;, SKYPIAX_P_LOG, options);
</ins><span class="cx"> 
</span><span class="cx">             while ((s = strsep(&amp;options, &quot;|&quot;))) {
</span><span class="cx">               value = s;
</span><span class="cx">               if ((var = strsep(&amp;value, &quot;=&quot;)) &amp;&amp; value) {
</span><del>-                DEBUGA_AT(&quot;var=%s value=%s\n&quot;, CELLIAX_P_LOG, var, value);
</del><ins>+                DEBUGA_SKYPE(&quot;var=%s value=%s\n&quot;, SKYPIAX_P_LOG, var, value);
</ins><span class="cx">                 if (!strcmp(var, &quot;phonebook_direct_calling_ext&quot;))
</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-&gt;phonebook_number_lenght + 1)
</span><span class="cx">                 || res &gt; (p-&gt;phonebook_number_lenght + 1)) {
</span><span class="cx">               ERRORA(&quot;entry_number truncated, was: '%s%s%d%s%s', now is: '%s'\n&quot;,
</span><del>-                     CELLIAX_P_LOG, argv[2], &quot;p&quot;, p-&gt;celliax_dir_prefix, &quot;p&quot;,
</del><ins>+                     SKYPIAX_P_LOG, argv[2], &quot;p&quot;, p-&gt;celliax_dir_prefix, &quot;p&quot;,
</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 &gt; (sizeof(write_entry_command) - 1)) {
</span><span class="cx">               WARNINGA
</span><span class="cx">                 (&quot;write_entry_command truncated, was supposed: 'AT+CPBW=,\&quot;%s\&quot;,,\&quot;%s\&quot;', now is: '%s'\n&quot;,
</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(&quot;%s\n&quot;, CELLIAX_P_LOG, write_entry_command);
</del><ins>+            NOTICA(&quot;%s\n&quot;, 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(&quot;v-&gt;name=%s\n&quot;, CELLIAX_P_LOG, v-&gt;name);
-        DEBUGA_AT(&quot;v-&gt;value=%s\n&quot;, CELLIAX_P_LOG, v-&gt;value);
</del><ins>+        DEBUGA_SKYPE(&quot;v-&gt;name=%s\n&quot;, SKYPIAX_P_LOG, v-&gt;name);
+        DEBUGA_SKYPE(&quot;v-&gt;value=%s\n&quot;, SKYPIAX_P_LOG, v-&gt;value);
</ins><span class="cx"> 
</span><span class="cx">         stringp = start;
</span><span class="cx">         strsep(&amp;stringp, &quot;,&quot;);
</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(&quot;&lt;pos=&gt;%s&lt;conv=&gt;%s&lt;\n&quot;, CELLIAX_P_LOG, pos, conv);
</del><ins>+            DEBUGA_SKYPE(&quot;&lt;pos=&gt;%s&lt;conv=&gt;%s&lt;\n&quot;, SKYPIAX_P_LOG, pos, conv);
</ins><span class="cx"> 
</span><span class="cx">             options = strdup(v-&gt;value);
</span><span class="cx">             strsep(&amp;options, &quot;,&quot;);
</span><span class="cx">             strsep(&amp;options, &quot;,&quot;);
</span><span class="cx">             strsep(&amp;options, &quot;,&quot;);
</span><span class="cx">             strsep(&amp;options, &quot;,&quot;);
</span><del>-            DEBUGA_AT(&quot;options=%s\n&quot;, CELLIAX_P_LOG, options);
</del><ins>+            DEBUGA_SKYPE(&quot;options=%s\n&quot;, SKYPIAX_P_LOG, options);
</ins><span class="cx"> 
</span><span class="cx">             while ((s = strsep(&amp;options, &quot;|&quot;))) {
</span><span class="cx">               value = s;
</span><span class="cx">               if ((var = strsep(&amp;value, &quot;=&quot;)) &amp;&amp; value) {
</span><del>-                DEBUGA_AT(&quot;var=%s value=%s\n&quot;, CELLIAX_P_LOG, var, value);
</del><ins>+                DEBUGA_SKYPE(&quot;var=%s value=%s\n&quot;, SKYPIAX_P_LOG, var, value);
</ins><span class="cx">                 if (!strcmp(var, &quot;phonebook_direct_calling_ext&quot;))
</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 &gt; (sizeof(entry_number) - 1)) {
</span><span class="cx">               ERRORA(&quot;entry_number truncated, was: '%s%s%d%s%s', now is: '%s'\n&quot;,
</span><del>-                     CELLIAX_P_LOG, argv[2], &quot;p&quot;, p-&gt;celliax_dir_prefix, &quot;p&quot;,
</del><ins>+                     SKYPIAX_P_LOG, argv[2], &quot;p&quot;, p-&gt;celliax_dir_prefix, &quot;p&quot;,
</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(&quot;i=%d a=%d\n&quot;, CELLIAX_P_LOG, i, a);
</del><ins>+            //NOTICA(&quot;i=%d a=%d\n&quot;, SKYPIAX_P_LOG, i, a);
</ins><span class="cx"> 
</span><span class="cx">             write_entry_command[a] = '&quot;';
</span><span class="cx">             a++;
</span><del>-            //NOTICA(&quot;i=%d a=%d\n&quot;, CELLIAX_P_LOG, i, a);
</del><ins>+            //NOTICA(&quot;i=%d a=%d\n&quot;, SKYPIAX_P_LOG, i, a);
</ins><span class="cx">             for (i = 0; i &lt; 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(&quot;i=%d a=%d\n&quot;, CELLIAX_P_LOG, i, a);
</del><ins>+            //NOTICA(&quot;i=%d a=%d\n&quot;, SKYPIAX_P_LOG, i, a);
</ins><span class="cx">             write_entry_command[a] = '&quot;';
</span><span class="cx">             a++;
</span><del>-            //NOTICA(&quot;i=%d a=%d\n&quot;, CELLIAX_P_LOG, i, a);
</del><ins>+            //NOTICA(&quot;i=%d a=%d\n&quot;, SKYPIAX_P_LOG, i, a);
</ins><span class="cx">             for (i = 0; i &lt; (p-&gt;csv_business_phone_pos - p-&gt;csv_complete_name_pos); i++) {
</span><span class="cx">               if (p-&gt;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(&quot;i=%d a=%d\n&quot;, CELLIAX_P_LOG, i, a);
</del><ins>+            //NOTICA(&quot;i=%d a=%d\n&quot;, SKYPIAX_P_LOG, i, a);
</ins><span class="cx"> 
</span><span class="cx">             write_entry_command[a] = '&quot;';
</span><span class="cx">             a++;
</span><del>-            //NOTICA(&quot;i=%d a=%d\n&quot;, CELLIAX_P_LOG, i, a);
</del><ins>+            //NOTICA(&quot;i=%d a=%d\n&quot;, SKYPIAX_P_LOG, i, a);
</ins><span class="cx">             for (i = 0; i &lt; 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(&quot;i=%d a=%d\n&quot;, CELLIAX_P_LOG, i, a);
</del><ins>+            //NOTICA(&quot;i=%d a=%d\n&quot;, SKYPIAX_P_LOG, i, a);
</ins><span class="cx">             write_entry_command[a] = '&quot;';
</span><span class="cx">             a++;
</span><del>-            //NOTICA(&quot;i=%d a=%d\n&quot;, CELLIAX_P_LOG, i, a);
</del><ins>+            //NOTICA(&quot;i=%d a=%d\n&quot;, SKYPIAX_P_LOG, i, a);
</ins><span class="cx"> 
</span><span class="cx">             if (option_debug)
</span><del>-              NOTICA(&quot;%s\n&quot;, CELLIAX_P_LOG, write_entry_command);
</del><ins>+              NOTICA(&quot;%s\n&quot;, 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-&gt;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-&gt;csv_rows++;
</span><span class="cx">   p-&gt;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">           (&quot;ROW %d ENDED, complete_name=%s, email=%s, home_phone=%s, mobile_phone=%s, business_phone=%s\n&quot;,
</span><del>-           CELLIAX_P_LOG, p-&gt;csv_rows,
</del><ins>+           SKYPIAX_P_LOG, p-&gt;csv_rows,
</ins><span class="cx">            strlen(p-&gt;csv_complete_name) ? p-&gt;csv_complete_name : &quot;N/A&quot;,
</span><span class="cx">            strlen(p-&gt;csv_email) ? p-&gt;csv_email : &quot;N/A&quot;,
</span><span class="cx">            strlen(p-&gt;csv_home_phone) ? p-&gt;csv_home_phone : &quot;N/A&quot;,
</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] = &quot;&quot;;
</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(&quot;filename is: %s\n&quot;, CELLIAX_P_LOG, argv[3]);
</del><ins>+      NOTICA(&quot;filename is: %s\n&quot;, SKYPIAX_P_LOG, argv[3]);
</ins><span class="cx">     ast_cli(fd, &quot;\n\nnot yet implemented :P \n&quot;);
</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), &quot;%s/%s&quot;, ast_config_AST_CONFIG_DIR, configfile);
</span><span class="cx">   }
</span><span class="cx">   if (option_debug)
</span><del>-    NOTICA(&quot;Opening '%s'\n&quot;, CELLIAX_P_LOG, fn);
</del><ins>+    NOTICA(&quot;Opening '%s'\n&quot;, SKYPIAX_P_LOG, fn);
</ins><span class="cx">   time(&amp;t);
</span><span class="cx">   ast_copy_string(date, ctime(&amp;t), sizeof(date));
</span><span class="cx"> 
</span><span class="lines">@@ -5617,14 +6106,14 @@
</span><span class="cx">   if (p-&gt;phonebook_writing_fp) {
</span><span class="cx">     if (add_to_celliax_dir_conf) {
</span><span class="cx">       if (option_debug)
</span><del>-        NOTICA(&quot;Opened '%s' for appending \n&quot;, CELLIAX_P_LOG, fn);
</del><ins>+        NOTICA(&quot;Opened '%s' for appending \n&quot;, SKYPIAX_P_LOG, fn);
</ins><span class="cx">       fprintf(p-&gt;phonebook_writing_fp, &quot;;!\n&quot;);
</span><span class="cx">       fprintf(p-&gt;phonebook_writing_fp, &quot;;! Update Date: %s&quot;, date);
</span><span class="cx">       fprintf(p-&gt;phonebook_writing_fp, &quot;;! Updated by: %s, %d\n&quot;, __FILE__, __LINE__);
</span><span class="cx">       fprintf(p-&gt;phonebook_writing_fp, &quot;;!\n&quot;);
</span><span class="cx">     } else {
</span><span class="cx">       if (option_debug)
</span><del>-        NOTICA(&quot;Opened '%s' for writing \n&quot;, CELLIAX_P_LOG, fn);
</del><ins>+        NOTICA(&quot;Opened '%s' for writing \n&quot;, SKYPIAX_P_LOG, fn);
</ins><span class="cx">       fprintf(p-&gt;phonebook_writing_fp, &quot;;!\n&quot;);
</span><span class="cx">       fprintf(p-&gt;phonebook_writing_fp, &quot;;! Automatically generated configuration file\n&quot;);
</span><span class="cx">       fprintf(p-&gt;phonebook_writing_fp, &quot;;! Filename: %s (%s)\n&quot;, configfile, fn);
</span><span class="lines">@@ -5639,7 +6128,7 @@
</span><span class="cx">     //FIXME: if add_to_celliax_dir_conf parse the &quot;old&quot; 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(&quot;filename is: %s\n&quot;, CELLIAX_P_LOG, argv[3]);
</del><ins>+        NOTICA(&quot;filename is: %s\n&quot;, 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-&gt;csv_separator_is_semicolon) {
</span><span class="cx">         if (csv_init(&amp;csvp, options | CSV_USE_SEMICOLON_SEPARATOR) != 0) {
</span><del>-          ERRORA(&quot;Failed to initialize csv parser\n&quot;, CELLIAX_P_LOG);
</del><ins>+          ERRORA(&quot;Failed to initialize csv parser\n&quot;, 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(&amp;csvp, options) != 0) {
</span><del>-          ERRORA(&quot;Failed to initialize csv parser\n&quot;, CELLIAX_P_LOG);
</del><ins>+          ERRORA(&quot;Failed to initialize csv parser\n&quot;, 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], &quot;rb&quot;);
</span><span class="cx">       if (!fp) {
</span><del>-        ERRORA(&quot;Failed to open %s: %s\n&quot;, CELLIAX_P_LOG, argv[3], strerror(errno));
</del><ins>+        ERRORA(&quot;Failed to open %s: %s\n&quot;, 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)) &gt; 0) {
</span><span class="cx">         if (csv_parse(csvp, buf, bytes_read, celliax_cb1, celliax_cb2, p) != bytes_read) {
</span><del>-          ERRORA(&quot;Error while parsing file: %s\n&quot;, CELLIAX_P_LOG,
</del><ins>+          ERRORA(&quot;Error while parsing file: %s\n&quot;, 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(&quot;Error while reading file %s\n&quot;, CELLIAX_P_LOG, argv[3]);
</del><ins>+        ERRORA(&quot;Error while reading file %s\n&quot;, 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(&quot;%s: %d fields, %d rows\n&quot;, CELLIAX_P_LOG, argv[3], p-&gt;csv_fields,
</del><ins>+        NOTICA(&quot;%s: %d fields, %d rows\n&quot;, SKYPIAX_P_LOG, argv[3], p-&gt;csv_fields,
</ins><span class="cx">                p-&gt;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, &quot;AT+CPBS=SM&quot;);
</span><span class="cx">       if (res) {
</span><del>-        WARNINGA(&quot;AT+CPBS=SM failed, continue\n&quot;, CELLIAX_P_LOG);
</del><ins>+        WARNINGA(&quot;AT+CPBS=SM failed, continue\n&quot;, 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, &quot;AT+CPBS=MT&quot;);
</span><span class="cx">       if (res) {
</span><del>-        WARNINGA(&quot;AT+CPBS=MT failed, continue\n&quot;, CELLIAX_P_LOG);
</del><ins>+        WARNINGA(&quot;AT+CPBS=MT failed, continue\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">       }
</span><span class="cx">       /* How many entries in phonebook  */
</span><span class="cx">       p-&gt;phonebook_querying = 1;
</span><span class="cx">       res = celliax_serial_write_AT_ack(p, &quot;AT+CPBR=?&quot;);
</span><span class="cx">       if (res) {
</span><del>-        WARNINGA(&quot;AT+CPBR=? failed, continue\n&quot;, CELLIAX_P_LOG);
</del><ins>+        WARNINGA(&quot;AT+CPBR=? failed, continue\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">       }
</span><span class="cx">       p-&gt;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">         (&quot;About to querying the cellphone phonebook, if the SIM do not answer may stuck here for 20 seconds... Don't worry.\n&quot;,
</span><del>-         CELLIAX_P_LOG);
</del><ins>+         SKYPIAX_P_LOG);
</ins><span class="cx">       sprintf(list_command, &quot;AT+CPBR=%d,%d&quot;, p-&gt;phonebook_first_entry,
</span><span class="cx">               p-&gt;phonebook_last_entry);
</span><span class="cx">       p-&gt;phonebook_listing = 1;
</span><span class="cx">       res = celliax_serial_write_AT_expect_longtime(p, list_command, &quot;OK&quot;);
</span><span class="cx">       if (res) {
</span><del>-        WARNINGA(&quot;AT+CPBR=%d,%d failed, continue\n&quot;, CELLIAX_P_LOG,
</del><ins>+        WARNINGA(&quot;AT+CPBR=%d,%d failed, continue\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                  p-&gt;phonebook_first_entry, p-&gt;phonebook_last_entry);
</span><span class="cx">       }
</span><span class="cx">       p-&gt;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, &quot;\n\nfailed to open the directoriax.conf configuration file: %s\n&quot;, fn);
</span><del>-    ERRORA(&quot;failed to open the directoriax.conf configuration file: %s\n&quot;, CELLIAX_P_LOG,
</del><ins>+    ERRORA(&quot;failed to open the directoriax.conf configuration file: %s\n&quot;, 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 &gt; 1)
</span><del>-    DEBUGA_FBUS2(&quot;asking model, outseqnum %.2X \n&quot;, CELLIAX_P_LOG, MsgBuffer[6]);
</del><ins>+    DEBUGA_FBUS2(&quot;asking model, outseqnum %.2X \n&quot;, 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(&quot;failed celliax_serial_read_FBUS2\n&quot;, CELLIAX_P_LOG);
</del><ins>+    ERRORA(&quot;failed celliax_serial_read_FBUS2\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">     UNLOCKA(&amp;p-&gt;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(&quot;failed celliax_serial_read_FBUS2\n&quot;, CELLIAX_P_LOG);
</del><ins>+      ERRORA(&quot;failed celliax_serial_read_FBUS2\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">       UNLOCKA(&amp;p-&gt;controldev_lock);
</span><span class="cx">       return -1;
</span><span class="cx">     }
</span><span class="cx">     if (how_many_reads &gt; 10) {
</span><del>-      ERRORA(&quot;no expected results in %d celliax_serial_read_FBUS2\n&quot;, CELLIAX_P_LOG,
</del><ins>+      ERRORA(&quot;no expected results in %d celliax_serial_read_FBUS2\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">              how_many_reads);
</span><span class="cx">       UNLOCKA(&amp;p-&gt;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-&gt;controldevfd, &amp;initc, 1);
</span><span class="cx">     if (rt != 1) {
</span><del>-      ERRORA(&quot;serial error: %s&quot;, CELLIAX_P_LOG, strerror(errno));
</del><ins>+      ERRORA(&quot;serial error: %s&quot;, SKYPIAX_P_LOG, strerror(errno));
</ins><span class="cx">       UNLOCKA(&amp;p-&gt;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 &gt; 1)
</span><del>-    DEBUGA_FBUS2(&quot;celliax_serial_answer_FBUS2, outseqnum %.2X \n&quot;, CELLIAX_P_LOG,
</del><ins>+    DEBUGA_FBUS2(&quot;celliax_serial_answer_FBUS2, outseqnum %.2X \n&quot;, 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(&quot;FBUS2: sent commands to answer the call\n&quot;, CELLIAX_P_LOG);
</del><ins>+  DEBUGA_FBUS2(&quot;FBUS2: sent commands to answer the call\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">   p-&gt;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 &gt; 1)
</span><del>-    DEBUGA_FBUS2(&quot;celliax_serial_call_FBUS2, outseqnum %.2X \n&quot;, CELLIAX_P_LOG,
</del><ins>+    DEBUGA_FBUS2(&quot;celliax_serial_call_FBUS2, outseqnum %.2X \n&quot;, 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-&gt;phone_callflow = CALLFLOW_CALL_DIALING;
</span><span class="cx">   p-&gt;interface_state = AST_STATE_DIALING;
</span><span class="cx">   if (option_debug)
</span><del>-    DEBUGA_FBUS2(&quot;FBUS2: sent commands to call\n&quot;, CELLIAX_P_LOG);
</del><ins>+    DEBUGA_FBUS2(&quot;FBUS2: sent commands to call\n&quot;, 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 &gt; 1)
</span><del>-      DEBUGA_FBUS2(&quot;celliax_serial_hangup_FBUS2, outseqnum %.2X \n&quot;, CELLIAX_P_LOG,
</del><ins>+      DEBUGA_FBUS2(&quot;celliax_serial_hangup_FBUS2, outseqnum %.2X \n&quot;, 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(&quot;FBUS2: sent commands to hangup the call\n&quot;, CELLIAX_P_LOG);
</del><ins>+    DEBUGA_FBUS2(&quot;FBUS2: sent commands to hangup the call\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx"> 
</span><span class="cx">   }
</span><span class="cx">   p-&gt;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 &gt; 1)
</span><span class="cx">     DEBUGA_FBUS2(&quot;activating security commands for getting IMEI, outseqnum %.2X \n&quot;,
</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(&quot;failed celliax_serial_read_FBUS2\n&quot;, CELLIAX_P_LOG);
</del><ins>+    ERRORA(&quot;failed celliax_serial_read_FBUS2\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">     return -1;
</span><span class="cx">   }
</span><span class="cx">   while (res != MsgBuffer[5] &amp;&amp; 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(&quot;failed celliax_serial_read_FBUS2\n&quot;, CELLIAX_P_LOG);
</del><ins>+      ERRORA(&quot;failed celliax_serial_read_FBUS2\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">       return -1;
</span><span class="cx">     }
</span><span class="cx">     if (how_many_reads &gt; 10) {
</span><del>-      ERRORA(&quot;no expected results in %d celliax_serial_read_FBUS2\n&quot;, CELLIAX_P_LOG,
</del><ins>+      ERRORA(&quot;no expected results in %d celliax_serial_read_FBUS2\n&quot;, 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 &gt; 1)
</span><del>-    DEBUGA_FBUS2(&quot;celliax_serial_get_IMEI_init_FBUS2, outseqnum %.2X \n&quot;, CELLIAX_P_LOG,
</del><ins>+    DEBUGA_FBUS2(&quot;celliax_serial_get_IMEI_init_FBUS2, outseqnum %.2X \n&quot;, 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(&quot;failed celliax_serial_read_FBUS2\n&quot;, CELLIAX_P_LOG);
</del><ins>+    ERRORA(&quot;failed celliax_serial_read_FBUS2\n&quot;, 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(&quot;failed celliax_serial_read_FBUS2\n&quot;, CELLIAX_P_LOG);
</del><ins>+      ERRORA(&quot;failed celliax_serial_read_FBUS2\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">       return -1;
</span><span class="cx">     }
</span><span class="cx">     if (how_many_reads &gt; 10) {
</span><del>-      ERRORA(&quot;no expected results in %d celliax_serial_read_FBUS2\n&quot;, CELLIAX_P_LOG,
</del><ins>+      ERRORA(&quot;no expected results in %d celliax_serial_read_FBUS2\n&quot;, 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 &gt; 1)
</span><del>-    DEBUGA_FBUS2(&quot;xxxxx GOT IMEI xxxxx res=%d %.2X \n&quot;, CELLIAX_P_LOG, res, res);
</del><ins>+    DEBUGA_FBUS2(&quot;xxxxx GOT IMEI xxxxx res=%d %.2X \n&quot;, 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-&gt;seqnumfbus &gt; FBUS2_SEQNUM_MAX || p-&gt;seqnumfbus &lt; FBUS2_SEQNUM_MIN) {
</span><del>-    ERRORA(&quot;p-&gt;seqnumfbus: %2.X\n&quot;, CELLIAX_P_LOG, p-&gt;seqnumfbus);
</del><ins>+    ERRORA(&quot;p-&gt;seqnumfbus: %2.X\n&quot;, SKYPIAX_P_LOG, p-&gt;seqnumfbus);
</ins><span class="cx">     p-&gt;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-&gt;seqnumfbus++;
</span><span class="cx">   }
</span><span class="cx">   if (option_debug &gt; 10)
</span><del>-    DEBUGA_FBUS2(&quot;sqnum: %2.X\n&quot;, CELLIAX_P_LOG, p-&gt;seqnumfbus);
</del><ins>+    DEBUGA_FBUS2(&quot;sqnum: %2.X\n&quot;, SKYPIAX_P_LOG, p-&gt;seqnumfbus);
</ins><span class="cx">   return p-&gt;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 &gt; 1)
</span><del>-    DEBUGA_FBUS2(&quot;activating security commands, outseqnum %.2X \n&quot;, CELLIAX_P_LOG,
</del><ins>+    DEBUGA_FBUS2(&quot;activating security commands, outseqnum %.2X \n&quot;, 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 &lt; 0) {
</span><span class="cx">       if (actual != len)
</span><del>-        ERRORA(&quot;celliax_serial_write error: %s&quot;, CELLIAX_P_LOG, strerror(errno));
</del><ins>+        ERRORA(&quot;celliax_serial_write error: %s&quot;, SKYPIAX_P_LOG, strerror(errno));
</ins><span class="cx">       UNLOCKA(&amp;p-&gt;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 &gt; ((char *) &amp;debug_buf + 1000))
</span><span class="cx">         break;
</span><span class="cx">     }
</span><del>-    DEBUGA_FBUS2(&quot;%s was sent down the wire\n&quot;, CELLIAX_P_LOG, debug_buf);
</del><ins>+    DEBUGA_FBUS2(&quot;%s was sent down the wire\n&quot;, 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-&gt;fbus2_outgoing_list;
</span><span class="cx">   if (ptr == NULL) {
</span><del>-    ERRORA(&quot;fbus2_outgoing_list is NULL ?\n&quot;, CELLIAX_P_LOG);
</del><ins>+    ERRORA(&quot;fbus2_outgoing_list is NULL ?\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">     return -1;
</span><span class="cx">   }
</span><span class="cx">   PUSHA_UNLOCKA(&amp;p-&gt;fbus2_outgoing_list_lock);
</span><span class="lines">@@ -6100,9 +6589,9 @@
</span><span class="cx">     if (ptr-&gt;seqnum == seqnum) {
</span><span class="cx">       ptr-&gt;acknowledged = 1;
</span><span class="cx">       if (option_debug &gt; 1)
</span><del>-        DEBUGA_FBUS2(&quot;Acknowledgment to %.2X\n&quot;, CELLIAX_P_LOG, seqnum);
</del><ins>+        DEBUGA_FBUS2(&quot;Acknowledgment to %.2X\n&quot;, SKYPIAX_P_LOG, seqnum);
</ins><span class="cx"> 
</span><del>-      DEBUGA_FBUS2(&quot;PREFREE OUTGOING list:\n&quot;, CELLIAX_P_LOG);
</del><ins>+      DEBUGA_FBUS2(&quot;PREFREE OUTGOING list:\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">       celliax_serial_list_print_FBUS2(p, p-&gt;fbus2_outgoing_list);
</span><span class="cx">       if (ptr-&gt;previous) {
</span><span class="cx">         if (ptr-&gt;next) {
</span><span class="lines">@@ -6121,13 +6610,13 @@
</span><span class="cx"> 
</span><span class="cx">       if ((NULL == ptr-&gt;next) &amp;&amp; (NULL == ptr-&gt;previous)) { /* bug catched by Wojciech Andralojc */
</span><span class="cx">         if (option_debug &gt; 1)
</span><del>-          DEBUGA_FBUS2(&quot;FREEING LAST\n&quot;, CELLIAX_P_LOG);
</del><ins>+          DEBUGA_FBUS2(&quot;FREEING LAST\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">         p-&gt;fbus2_outgoing_list = NULL;
</span><span class="cx">         p-&gt;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(&quot;POSTFREE OUTGOING list:\n&quot;, CELLIAX_P_LOG);
</del><ins>+      DEBUGA_FBUS2(&quot;POSTFREE OUTGOING list:\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">       celliax_serial_list_print_FBUS2(p, p-&gt;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">         (&quot;The phone sent us an acknowledgement referring to a msg with a seqnum that is not in our sent list: %.2X\n&quot;,
</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(&amp;tv, &amp;tz);
</span><span class="cx">   ptr = p-&gt;fbus2_outgoing_list;
</span><span class="cx">   if (ptr == NULL) {
</span><del>-    ERRORA(&quot;fbus2_outgoing_list is NULL ?\n&quot;, CELLIAX_P_LOG);
</del><ins>+    ERRORA(&quot;fbus2_outgoing_list is NULL ?\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">     return -1;
</span><span class="cx">   }
</span><span class="cx">   while (ptr-&gt;next != NULL) {
</span><del>-    WARNINGA(&quot;fbus2_outgoing_list-&gt;next is not null ?\n&quot;, CELLIAX_P_LOG);
</del><ins>+    WARNINGA(&quot;fbus2_outgoing_list-&gt;next is not null ?\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">     ptr = ptr-&gt;next;            //FIXME what to do?
</span><span class="cx">   }
</span><span class="cx">   while (ptr-&gt;sent == 0 &amp;&amp; ptr-&gt;acknowledged == 0) {
</span><span class="lines">@@ -6201,13 +6690,13 @@
</span><span class="cx">         if ((tv.tv_sec * 1000 + tv.tv_usec / 1000) &gt; ((ptr-&gt;tv_sec * 1000 + ptr-&gt;tv_usec / 1000) + 1000)) { //retest, maybe has been changed?
</span><span class="cx"> 
</span><span class="cx">           if (option_debug &gt; 1)
</span><del>-            DEBUGA_FBUS2(&quot;RESEND %.2X, passed %ld ms, sent %d times\n&quot;, CELLIAX_P_LOG,
</del><ins>+            DEBUGA_FBUS2(&quot;RESEND %.2X, passed %ld ms, sent %d times\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                          ptr-&gt;seqnum,
</span><span class="cx">                          ((tv.tv_sec * 1000 + tv.tv_usec / 1000) -
</span><span class="cx">                           (ptr-&gt;tv_sec * 1000 + ptr-&gt;tv_usec / 1000)),
</span><span class="cx">                          ptr-&gt;how_many_sent);
</span><span class="cx">           if (ptr-&gt;how_many_sent &gt; 9) {
</span><del>-            ERRORA(&quot;RESEND %.2X, passed %ld ms, sent %d times\n&quot;, CELLIAX_P_LOG,
</del><ins>+            ERRORA(&quot;RESEND %.2X, passed %ld ms, sent %d times\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                    ptr-&gt;seqnum,
</span><span class="cx">                    ((tv.tv_sec * 1000 + tv.tv_usec / 1000) -
</span><span class="cx">                     (ptr-&gt;tv_sec * 1000 + ptr-&gt;tv_usec / 1000)), ptr-&gt;how_many_sent);
</span><span class="lines">@@ -6219,7 +6708,7 @@
</span><span class="cx">           celliax_serial_send_FBUS2(p, ptr-&gt;len, ptr-&gt;buffer);
</span><span class="cx">           if (ptr-&gt;buffer[3] == FBUS2_ACK_BYTE) {
</span><span class="cx">             if (option_debug &gt; 1)
</span><del>-              DEBUGA_FBUS2(&quot;RESEND ACK, passed %ld ms, sent %d times\n&quot;, CELLIAX_P_LOG,
</del><ins>+              DEBUGA_FBUS2(&quot;RESEND ACK, passed %ld ms, sent %d times\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                            ((tv.tv_sec * 1000 + tv.tv_usec / 1000) -
</span><span class="cx">                             (ptr-&gt;tv_sec * 1000 + ptr-&gt;tv_usec / 1000)),
</span><span class="cx">                            ptr-&gt;how_many_sent);
</span><span class="lines">@@ -6231,9 +6720,9 @@
</span><span class="cx">           ptr-&gt;sent = 1;
</span><span class="cx">           ptr-&gt;how_many_sent++;
</span><span class="cx">           if (option_debug &gt; 1) {
</span><del>-            DEBUGA_FBUS2(&quot;OUTGOING list:\n&quot;, CELLIAX_P_LOG);
</del><ins>+            DEBUGA_FBUS2(&quot;OUTGOING list:\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">             celliax_serial_list_print_FBUS2(p, p-&gt;fbus2_outgoing_list);
</span><del>-            DEBUGA_FBUS2(&quot;OUTGOING list END\n&quot;, CELLIAX_P_LOG);
</del><ins>+            DEBUGA_FBUS2(&quot;OUTGOING list END\n&quot;, 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-&gt;sent == 0 &amp;&amp; ptr-&gt;acknowledged == 0 &amp;&amp; ptr-&gt;msg &gt; 0) { //retest, maybe has been changed?
</span><span class="cx"> 
</span><span class="cx">       if (option_debug &gt; 1)
</span><del>-        DEBUGA_FBUS2(&quot;SENDING 1st TIME %.2X\n&quot;, CELLIAX_P_LOG, ptr-&gt;seqnum);
</del><ins>+        DEBUGA_FBUS2(&quot;SENDING 1st TIME %.2X\n&quot;, SKYPIAX_P_LOG, ptr-&gt;seqnum);
</ins><span class="cx">       celliax_serial_send_FBUS2(p, ptr-&gt;len, ptr-&gt;buffer);
</span><span class="cx">       if (ptr-&gt;buffer[3] == FBUS2_ACK_BYTE) {
</span><span class="cx">         if (option_debug &gt; 1)
</span><del>-          DEBUGA_FBUS2(&quot;SENDING 1st TIME ACK\n&quot;, CELLIAX_P_LOG);
</del><ins>+          DEBUGA_FBUS2(&quot;SENDING 1st TIME ACK\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">         ptr-&gt;acknowledged = 1;
</span><span class="cx">         ptr-&gt;msg = FBUS2_OUTGOING_ACK;
</span><span class="cx">       }
</span><span class="lines">@@ -6264,9 +6753,9 @@
</span><span class="cx">       ptr-&gt;sent = 1;
</span><span class="cx">       ptr-&gt;how_many_sent++;
</span><span class="cx">       if (option_debug &gt; 1) {
</span><del>-        DEBUGA_FBUS2(&quot;OUTGOING list:\n&quot;, CELLIAX_P_LOG);
</del><ins>+        DEBUGA_FBUS2(&quot;OUTGOING list:\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">         celliax_serial_list_print_FBUS2(p, p-&gt;fbus2_outgoing_list);
</span><del>-        DEBUGA_FBUS2(&quot;OUTGOING list END\n&quot;, CELLIAX_P_LOG);
</del><ins>+        DEBUGA_FBUS2(&quot;OUTGOING list END\n&quot;, 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(&quot;%s to be written, ACK\n&quot;, CELLIAX_P_LOG, debug_buf);
</del><ins>+      DEBUGA_FBUS2(&quot;%s to be written, ACK\n&quot;, SKYPIAX_P_LOG, debug_buf);
</ins><span class="cx">     } else {
</span><del>-      DEBUGA_FBUS2(&quot;%s to be written\n&quot;, CELLIAX_P_LOG, debug_buf);
</del><ins>+      DEBUGA_FBUS2(&quot;%s to be written\n&quot;, 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-&gt;fbus2_outgoing_list-&gt;seqnum = MsgBuffer[MsgLength - 1];
</span><span class="cx">     if (option_debug &gt; 1) {
</span><del>-      DEBUGA_FBUS2(&quot;OUTGOING LIST seqnum is %2.X\n&quot;, CELLIAX_P_LOG,
</del><ins>+      DEBUGA_FBUS2(&quot;OUTGOING LIST seqnum is %2.X\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                    MsgBuffer[MsgLength - 1]);
</span><span class="cx"> 
</span><del>-      DEBUGA_FBUS2(&quot;OUTGOING list:\n&quot;, CELLIAX_P_LOG);
</del><ins>+      DEBUGA_FBUS2(&quot;OUTGOING list:\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">       celliax_serial_list_print_FBUS2(p, p-&gt;fbus2_outgoing_list);
</span><del>-      DEBUGA_FBUS2(&quot;OUTGOING list END\n&quot;, CELLIAX_P_LOG);
</del><ins>+      DEBUGA_FBUS2(&quot;OUTGOING list END\n&quot;, 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 &gt; 1)
</span><del>-    DEBUGA_FBUS2(&quot;SENDING ACK to %2.X, seqack %2.X \n&quot;, CELLIAX_P_LOG, MsgSequence,
</del><ins>+    DEBUGA_FBUS2(&quot;SENDING ACK to %2.X, seqack %2.X \n&quot;, 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-&gt;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 &gt; 3)
</span><span class="cx">       DEBUGA_FBUS2
</span><span class="cx">         (&quot;PTR msg is: %d, seqnum is %.2X, tv_sec is %d, tv_usec is %d, acknowledged is: %d,&quot;
</span><del>-         &quot; sent is:%d, how_many_sent is: %d\n&quot;, CELLIAX_P_LOG, ptr-&gt;msg, ptr-&gt;seqnum,
</del><ins>+         &quot; sent is:%d, how_many_sent is: %d\n&quot;, SKYPIAX_P_LOG, ptr-&gt;msg, ptr-&gt;seqnum,
</ins><span class="cx">          ptr-&gt;tv_sec, ptr-&gt;tv_usec, ptr-&gt;acknowledged, ptr-&gt;sent, ptr-&gt;how_many_sent);
</span><span class="cx">     ptr = ptr-&gt;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">           (&quot;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&quot;,
</span><del>-           CELLIAX_P_LOG, p-&gt;controldevice_name);
</del><ins>+           SKYPIAX_P_LOG, p-&gt;controldevice_name);
</ins><span class="cx">         p-&gt;controldev_dead = 1;
</span><span class="cx">         close(p-&gt;controldevfd);
</span><span class="cx">         UNLOCKA(&amp;p-&gt;controldev_lock);
</span><span class="lines">@@ -6478,7 +6967,7 @@
</span><span class="cx">           if (debug_buf_pos &gt; (char *) (&amp;debug_buf + 1000))
</span><span class="cx">             break;
</span><span class="cx">         }
</span><del>-        DEBUGA_FBUS2(&quot;%s READ AT seconds=%ld usec=%6ld read_count=%d\n&quot;, CELLIAX_P_LOG,
</del><ins>+        DEBUGA_FBUS2(&quot;%s READ AT seconds=%ld usec=%6ld read_count=%d\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                      debug_buf, p-&gt;fbus2_list_tv.tv_sec, p-&gt;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 &gt; 1)
</span><del>-              DEBUGA_FBUS2(&quot;INCOMING ACK, seqack %.2X \n&quot;, CELLIAX_P_LOG, seqnum);
</del><ins>+              DEBUGA_FBUS2(&quot;INCOMING ACK, seqack %.2X \n&quot;, 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">                 (&quot;seqack was 0x80, interpreting as 0x00, first acknowledgement (session begin?) of our first sent item 0x40\n&quot;,
</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 &gt; 1)
</span><del>-              DEBUGA_FBUS2(&quot;CALL DIVERT SIGNALING seqnum %.2X \n&quot;, CELLIAX_P_LOG, seqnum);
</del><ins>+              DEBUGA_FBUS2(&quot;CALL DIVERT SIGNALING seqnum %.2X \n&quot;, 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-&gt;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">                   (&quot;call is active, I know it's not yet true, but 3310 do not give us remote answer signaling\n&quot;,
</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(&quot;FBUS2 PHONE MODEL is: %s, inseqnum %.2X \n&quot;, CELLIAX_P_LOG,
</del><ins>+              DEBUGA_FBUS2(&quot;FBUS2 PHONE MODEL is: %s, inseqnum %.2X \n&quot;, 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-&gt;owner, AST_STATE_UP)) {
</span><del>-                  ERRORA(&quot;ast_setstate failed, BAD\n&quot;, CELLIAX_P_LOG);
</del><ins>+                  ERRORA(&quot;ast_setstate failed, BAD\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 if (option_debug &gt; 1)
</span><del>-                  DEBUGA_FBUS2(&quot;ANSWERED CALL, inseqnum %.2X \n&quot;, CELLIAX_P_LOG, seqnum);
</del><ins>+                  DEBUGA_FBUS2(&quot;ANSWERED CALL, inseqnum %.2X \n&quot;, 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-&gt;interface_state = AST_STATE_DOWN;
</span><span class="cx">                 p-&gt;phone_callflow = CALLFLOW_CALL_IDLE;
</span><span class="cx">                 if (option_debug &gt; 1)
</span><del>-                  DEBUGA_FBUS2(&quot;RELEASED CALL, inseqnum %.2X \n&quot;, CELLIAX_P_LOG, seqnum);
</del><ins>+                  DEBUGA_FBUS2(&quot;RELEASED CALL, inseqnum %.2X \n&quot;, 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 &gt; 1)
</span><span class="cx">                 DEBUGA_FBUS2(&quot;SECURITY EXTENDED COMMANDS ON, inseqnum %.2X \n&quot;,
</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 &quot;get IMEI&quot; action */
</span><span class="cx">             case FBUS2_SECURIY_IMEI_COMMANDS:
</span><span class="cx">               if (option_debug &gt; 1)
</span><del>-                DEBUGA_FBUS2(&quot;CALLFLOW_GOT_IMEI, inseqnum %.2X \n&quot;, CELLIAX_P_LOG,
</del><ins>+                DEBUGA_FBUS2(&quot;CALLFLOW_GOT_IMEI, inseqnum %.2X \n&quot;, 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 &gt; 1)
</span><del>-                DEBUGA_FBUS2(&quot;SMS, inseqnum %.2X \n&quot;, CELLIAX_P_LOG, seqnum);
</del><ins>+                DEBUGA_FBUS2(&quot;SMS, inseqnum %.2X \n&quot;, 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-&gt;interface_state = AST_STATE_DOWN;
</span><span class="cx">               p-&gt;phone_callflow = CALLFLOW_CALL_IDLE;
</span><span class="cx">               if (option_debug &gt; 1)
</span><del>-                DEBUGA_FBUS2(&quot;REMOTE PARTY HANG UP, inseqnum %.2X \n&quot;, CELLIAX_P_LOG,
</del><ins>+                DEBUGA_FBUS2(&quot;REMOTE PARTY HANG UP, inseqnum %.2X \n&quot;, 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 &gt; 1)
</span><del>-                DEBUGA_FBUS2(&quot;CALLID, inseqnum %.2X \n&quot;, CELLIAX_P_LOG, seqnum);
</del><ins>+                DEBUGA_FBUS2(&quot;CALLID, inseqnum %.2X \n&quot;, SKYPIAX_P_LOG, seqnum);
</ins><span class="cx">               memset(p-&gt;callid_name, 0, sizeof(p-&gt;callid_name));
</span><span class="cx">               memset(p-&gt;callid_number, 0, sizeof(p-&gt;callid_number));
</span><span class="cx">               for (a = 0; a &lt; p-&gt;array[12]; a++) {
</span><span class="lines">@@ -6672,7 +7161,7 @@
</span><span class="cx">               }
</span><span class="cx">               if (option_debug &gt; 1)
</span><span class="cx">                 DEBUGA_FBUS2(&quot;CALLFLOW_INCOMING_CALLID: name is %s, number is %s\n&quot;,
</span><del>-                             CELLIAX_P_LOG,
</del><ins>+                             SKYPIAX_P_LOG,
</ins><span class="cx">                              p-&gt;callid_name[0] != 1 ? p-&gt;callid_name : &quot;not available&quot;,
</span><span class="cx">                              p-&gt;callid_number[0] ? p-&gt;callid_number : &quot;not available&quot;);
</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 &gt; 1)
</span><del>-                DEBUGA_FBUS2(&quot;NETWORK STATUS REGISTERED, inseqnum %.2X \n&quot;, CELLIAX_P_LOG,
</del><ins>+                DEBUGA_FBUS2(&quot;NETWORK STATUS REGISTERED, inseqnum %.2X \n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                              seqnum);
</span><span class="cx">               if (p-&gt;callid_name[0] == 0 &amp;&amp; p-&gt;owner
</span><span class="cx">                   &amp;&amp; p-&gt;interface_state != AST_STATE_DOWN) {
</span><span class="lines">@@ -6703,7 +7192,7 @@
</span><span class="cx">                          &quot; callid_name[0]=1 (also if no callid was transmitted by remote&quot;
</span><span class="cx">                          &quot; party), we use this lack of CALLID as a sign of 3310nness.&quot;
</span><span class="cx">                          &quot; Outside a call, or when CALLID has been signaled, NETWORK STATUS&quot;
</span><del>-                         &quot; REGISTERED is ignored.\n&quot;, CELLIAX_P_LOG);
</del><ins>+                         &quot; REGISTERED is ignored.\n&quot;, 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-&gt;phone_callflow = CALLFLOW_CALL_IDLE;
</span><span class="cx">               if (option_debug &gt; 1)
</span><span class="cx">                 DEBUGA_FBUS2(&quot;STATUS call in progress OFF, inseqnum %.2X \n&quot;,
</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 &gt; 1)
</span><span class="cx">                 DEBUGA_FBUS2(&quot;STATUS call in progress ON, inseqnum %.2X \n&quot;,
</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(&quot;FBUS2 MSG UNKNOWN, inseqnum %.2X\n&quot;, CELLIAX_P_LOG, seqnum);
</del><ins>+            WARNINGA(&quot;FBUS2 MSG UNKNOWN, inseqnum %.2X\n&quot;, 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 &gt; (char *) (&amp;debug_buf + 1000))
</span><span class="cx">                 break;
</span><span class="cx">             }
</span><del>-            DEBUGA_FBUS2(&quot;%s is the RECEIVED FRAME inseqnum %.2X\n&quot;, CELLIAX_P_LOG,
</del><ins>+            DEBUGA_FBUS2(&quot;%s is the RECEIVED FRAME inseqnum %.2X\n&quot;, 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">         (&quot;select returned -1 on %s, marking controldev as dead, errno was: %d, error was: %s\n&quot;,
</span><del>-         CELLIAX_P_LOG, p-&gt;controldevice_name, errno, strerror(errno));
</del><ins>+         SKYPIAX_P_LOG, p-&gt;controldevice_name, errno, strerror(errno));
</ins><span class="cx">       p-&gt;controldev_dead = 1;
</span><span class="cx">       close(p-&gt;controldevfd);
</span><span class="cx">       if (p-&gt;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(&quot;select returned -1 on %s, errno was: %d, EINTR, error was: %s\n&quot;,
</span><del>-               CELLIAX_P_LOG, p-&gt;controldevice_name, errno, strerror(errno));
</del><ins>+               SKYPIAX_P_LOG, p-&gt;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(&quot;celliax_serial_send_if_time_FBUS2 failed!\n&quot;, CELLIAX_P_LOG);
</del><ins>+    ERRORA(&quot;celliax_serial_send_if_time_FBUS2 failed!\n&quot;, 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-&gt;owner) {
</span><span class="cx">       celliax_queue_control(p-&gt;owner, AST_CONTROL_HANGUP);
</span><del>-      DEBUGA_FBUS2(&quot;phone call ended\n&quot;, CELLIAX_P_LOG);
</del><ins>+      DEBUGA_FBUS2(&quot;phone call ended\n&quot;, 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(&amp;p-&gt;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-&gt;interface_state) {
</span><del>-    DEBUGA_CVM(&quot;Sending commands to answer an incomming call...\n&quot;, CELLIAX_P_LOG);
</del><ins>+    DEBUGA_CVM(&quot;Sending commands to answer an incomming call...\n&quot;, 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">       (&quot;SKIPPING Sending commands to answer an incomming call, because: !AST_STATE_RING\n&quot;,
</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(&quot;CVM_BUSMAIL: sent commands to call\n&quot;, CELLIAX_P_LOG);
</del><ins>+    NOTICA(&quot;CVM_BUSMAIL: sent commands to call\n&quot;, 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">                                                &amp;bReason);
</span><span class="cx"> 
</span><del>-    DEBUGA_CVM(&quot;CVM_BUSMAIL: sent commands to hangup the call\n&quot;, CELLIAX_P_LOG);
</del><ins>+    DEBUGA_CVM(&quot;CVM_BUSMAIL: sent commands to hangup the call\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx"> 
</span><span class="cx">   } else {
</span><span class="cx">     DEBUGA_CVM(&quot;CVM_BUSMAIL: sent commands to hangup skipped because: AST_STATE_DOWN\n&quot;,
</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(&amp;p-&gt;controldev_lock);
</span><span class="cx"> 
</span><span class="cx">   if (option_debug &gt; 1)
</span><del>-    DEBUGA_CVM(&quot;Try to init communication with CVM...\n&quot;, CELLIAX_P_LOG);
</del><ins>+    DEBUGA_CVM(&quot;Try to init communication with CVM...\n&quot;, 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(&quot;celliax_serial_read_CVM_BUSMAIL res= %X, expected %X\n&quot;, CELLIAX_P_LOG, res,
</del><ins>+  DEBUGA_CVM(&quot;celliax_serial_read_CVM_BUSMAIL res= %X, expected %X\n&quot;, 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(&quot;failed celliax_serial_read_CVM_BUSMAIL\n&quot;, CELLIAX_P_LOG);
</del><ins>+    ERRORA(&quot;failed celliax_serial_read_CVM_BUSMAIL\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">     CVM_UNLOCKA(&amp;p-&gt;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(&quot;failed celliax_serial_read_CVM_BUSMAIL\n&quot;, CELLIAX_P_LOG);
</del><ins>+      ERRORA(&quot;failed celliax_serial_read_CVM_BUSMAIL\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">       CVM_UNLOCKA(&amp;p-&gt;controldev_lock);
</span><span class="cx">       return -1;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (how_many_reads &gt; 10) {
</span><del>-      ERRORA(&quot;no expected results in %d celliax_serial_read_CVM_BUSMAIL\n&quot;, CELLIAX_P_LOG,
</del><ins>+      ERRORA(&quot;no expected results in %d celliax_serial_read_CVM_BUSMAIL\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">              how_many_reads);
</span><span class="cx"> 
</span><del>-      ERRORA(&quot;Unable to initialize cmmunication with CVM...\n&quot;, CELLIAX_P_LOG);
</del><ins>+      ERRORA(&quot;Unable to initialize cmmunication with CVM...\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx"> 
</span><span class="cx">       CVM_UNLOCKA(&amp;p-&gt;controldev_lock);
</span><span class="cx">       return -1;
</span><span class="cx">     }
</span><span class="cx">   }
</span><span class="cx"> 
</span><del>-  DEBUGA_CVM(&quot;Communication with CVM initialized successfully...\n&quot;, CELLIAX_P_LOG);
</del><ins>+  DEBUGA_CVM(&quot;Communication with CVM initialized successfully...\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx"> 
</span><del>-  DEBUGA_CVM(&quot;Attempt to lock to FP...\n&quot;, CELLIAX_P_LOG);
</del><ins>+  DEBUGA_CVM(&quot;Attempt to lock to FP...\n&quot;, 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(&quot;failed celliax_serial_read_CVM_BUSMAIL\n&quot;, CELLIAX_P_LOG);
</del><ins>+    ERRORA(&quot;failed celliax_serial_read_CVM_BUSMAIL\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">     CVM_UNLOCKA(&amp;p-&gt;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(&quot;Attempt to lock to FP... %d\n&quot;, CELLIAX_P_LOG, how_many_reads/10 );
</del><ins>+      DEBUGA_CVM(&quot;Attempt to lock to FP... %d\n&quot;, 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) ,&amp;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(&quot;failed celliax_serial_read_CVM_BUSMAIL\n&quot;, CELLIAX_P_LOG);
</del><ins>+      ERRORA(&quot;failed celliax_serial_read_CVM_BUSMAIL\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">       CVM_UNLOCKA(&amp;p-&gt;controldev_lock);
</span><span class="cx">       return -1;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (how_many_reads &gt; 50) {
</span><del>-      ERRORA(&quot;no expected results in %d celliax_serial_read_CVM_BUSMAIL\n&quot;, CELLIAX_P_LOG,
</del><ins>+      ERRORA(&quot;no expected results in %d celliax_serial_read_CVM_BUSMAIL\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">              how_many_reads);
</span><span class="cx"> 
</span><del>-      ERRORA(&quot;Unable to lock to FP...\n&quot;, CELLIAX_P_LOG);
</del><ins>+      ERRORA(&quot;Unable to lock to FP...\n&quot;, 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-&gt;cvm_lock_state) {
</span><del>-    DEBUGA_CVM(&quot;CVM locked to FP successfully...\n&quot;, CELLIAX_P_LOG);
</del><ins>+    DEBUGA_CVM(&quot;CVM locked to FP successfully...\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">   } else {
</span><del>-    DEBUGA_CVM(&quot;Lock to FP failed, Attempt to register to FP...\n&quot;, CELLIAX_P_LOG);
</del><ins>+    DEBUGA_CVM(&quot;Lock to FP failed, Attempt to register to FP...\n&quot;, 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(&quot;failed celliax_serial_read_CVM_BUSMAIL\n&quot;, CELLIAX_P_LOG);
</del><ins>+      ERRORA(&quot;failed celliax_serial_read_CVM_BUSMAIL\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">       CVM_UNLOCKA(&amp;p-&gt;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-&gt;cvm_register_state) {
</span><span class="cx"> 
</span><span class="cx">       if (0 == (how_many_reads % 50)) {
</span><del>-        DEBUGA_CVM(&quot;Attempt to register to FP... %d\n&quot;, CELLIAX_P_LOG,
</del><ins>+        DEBUGA_CVM(&quot;Attempt to register to FP... %d\n&quot;, 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(&quot;failed celliax_serial_read_CVM_BUSMAIL\n&quot;, CELLIAX_P_LOG);
</del><ins>+        ERRORA(&quot;failed celliax_serial_read_CVM_BUSMAIL\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">         CVM_UNLOCKA(&amp;p-&gt;controldev_lock);
</span><span class="cx">         return -1;
</span><span class="cx">       }
</span><span class="cx"> 
</span><span class="cx">       if (how_many_reads &gt; 300) {
</span><span class="cx">         ERRORA(&quot;no expected results in %d celliax_serial_read_CVM_BUSMAIL\n&quot;,
</span><del>-               CELLIAX_P_LOG, how_many_reads);
</del><ins>+               SKYPIAX_P_LOG, how_many_reads);
</ins><span class="cx"> 
</span><del>-        ERRORA(&quot;Unable to communication with CVM...\n&quot;, CELLIAX_P_LOG);
</del><ins>+        ERRORA(&quot;Unable to communication with CVM...\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx"> 
</span><span class="cx">         CVM_UNLOCKA(&amp;p-&gt;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-&gt;cvm_register_state) {
</span><del>-      ERRORA(&quot;Unable to register to FP...\n&quot;, CELLIAX_P_LOG);
</del><ins>+      ERRORA(&quot;Unable to register to FP...\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx"> 
</span><span class="cx">       CVM_UNLOCKA(&amp;p-&gt;controldev_lock);
</span><span class="cx">       return -1;
</span><span class="cx"> 
</span><span class="cx">     } else {
</span><del>-      DEBUGA_CVM(&quot;CVM registered to FP successfully...\n&quot;, CELLIAX_P_LOG);
-      DEBUGA_CVM(&quot;Attempt to lock to FP...\n&quot;, CELLIAX_P_LOG);
</del><ins>+      DEBUGA_CVM(&quot;CVM registered to FP successfully...\n&quot;, SKYPIAX_P_LOG);
+      DEBUGA_CVM(&quot;Attempt to lock to FP...\n&quot;, 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(&quot;failed celliax_serial_read_CVM_BUSMAIL\n&quot;, CELLIAX_P_LOG);
</del><ins>+        ERRORA(&quot;failed celliax_serial_read_CVM_BUSMAIL\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">         CVM_UNLOCKA(&amp;p-&gt;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-&gt;cvm_lock_state) {
</span><span class="cx"> 
</span><span class="cx">         if (0 == (how_many_reads % 10)) {
</span><del>-          DEBUGA_CVM(&quot;Attempt to lock to FP... %d\n&quot;, CELLIAX_P_LOG, how_many_reads / 10);
</del><ins>+          DEBUGA_CVM(&quot;Attempt to lock to FP... %d\n&quot;, 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(&quot;failed celliax_serial_read_CVM_BUSMAIL\n&quot;, CELLIAX_P_LOG);
</del><ins>+          ERRORA(&quot;failed celliax_serial_read_CVM_BUSMAIL\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">           CVM_UNLOCKA(&amp;p-&gt;controldev_lock);
</span><span class="cx">           return -1;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (how_many_reads &gt; 100) {
</span><span class="cx">           ERRORA(&quot;no expected results in %d celliax_serial_read_CVM_BUSMAIL\n&quot;,
</span><del>-                 CELLIAX_P_LOG, how_many_reads);
</del><ins>+                 SKYPIAX_P_LOG, how_many_reads);
</ins><span class="cx"> 
</span><del>-          ERRORA(&quot;Unable to communication with CVM...\n&quot;, CELLIAX_P_LOG);
</del><ins>+          ERRORA(&quot;Unable to communication with CVM...\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx"> 
</span><span class="cx">           CVM_UNLOCKA(&amp;p-&gt;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-&gt;cvm_lock_state) {
</span><del>-        ERRORA(&quot;Unable to lock to FP...\n&quot;, CELLIAX_P_LOG);
</del><ins>+        ERRORA(&quot;Unable to lock to FP...\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx"> 
</span><span class="cx">         CVM_UNLOCKA(&amp;p-&gt;controldev_lock);
</span><span class="cx">         return -1;
</span><span class="cx">       } else {
</span><del>-        DEBUGA_CVM(&quot;CVM locked to FP successfully...\n&quot;, CELLIAX_P_LOG);
</del><ins>+        DEBUGA_CVM(&quot;CVM locked to FP successfully...\n&quot;, 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">           (&quot;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&quot;,
</span><del>-           CELLIAX_P_LOG, p-&gt;controldevice_name);
</del><ins>+           SKYPIAX_P_LOG, p-&gt;controldevice_name);
</ins><span class="cx"> 
</span><span class="cx">         p-&gt;controldev_dead = 1;
</span><span class="cx">         close(p-&gt;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(&quot;%s READ AT seconds=%ld usec=%6ld read_count=%d\n&quot;, CELLIAX_P_LOG,
</del><ins>+        DEBUGA_CVM(&quot;%s READ AT seconds=%ld usec=%6ld read_count=%d\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                    debug_buf, p-&gt;cvm_busmail_list_tv.tv_sec,
</span><span class="cx">                    p-&gt;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(&quot;%s was received, Starting to categorize this frame\n&quot;,
</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(&quot;BUSMAIL MSG CRC FAILED!, MsgCrc %.2X, calcd %.2X, dropping frame\n&quot;,
</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-&gt;array[BUSMAIL_OFFSET_HEADER] */
</span><span class="cx">             if (option_debug &gt; 1)
</span><del>-              DEBUGA_CVM(&quot;BUSMAIL MSG CRC, MsgCrc %.2X, calcd %.2X...\n&quot;, CELLIAX_P_LOG,
</del><ins>+              DEBUGA_CVM(&quot;BUSMAIL MSG CRC, MsgCrc %.2X, calcd %.2X...\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                          MsgCrc, busmail_crc);
</span><span class="cx"> 
</span><span class="cx">             MsgHeader = p-&gt;array[BUSMAIL_OFFSET_HEADER];
</span><span class="lines">@@ -7290,14 +7779,14 @@
</span><span class="cx"> 
</span><span class="cx">               if (option_debug &gt; 1)
</span><span class="cx">                 DEBUGA_CVM(&quot;BUSMAIL_HEADER_INFO_FRAME TxSeq %X, RxSeq %X\n&quot;,
</span><del>-                           CELLIAX_P_LOG, MsgTxSeqNo, MsgRxSeqNo);
</del><ins>+                           SKYPIAX_P_LOG, MsgTxSeqNo, MsgRxSeqNo);
</ins><span class="cx"> 
</span><span class="cx">               if (((p-&gt;busmail_rxseq_cvm_last + 1) &amp; 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-&gt;busmail_rxseq_cvm_last + 1, resend it to me, please */
</span><span class="cx"> 
</span><span class="cx">                 WARNINGA(&quot;CVM TxSeq %X, does not match expected value %X\n&quot;,
</span><del>-                         CELLIAX_P_LOG, MsgTxSeqNo,
</del><ins>+                         SKYPIAX_P_LOG, MsgTxSeqNo,
</ins><span class="cx">                          (p-&gt;busmail_rxseq_cvm_last + 1) &amp; 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">                     (&quot;It looks like our ACK to this frame was MIA :), lets ACK the frame one more time...\n&quot;,
</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 &gt; 1)
</span><span class="cx">                 DEBUGA_CVM
</span><span class="cx">                   (&quot;BUSMAIL_HEADER_INFO_FRAME ProgId %X, TaskId %X, Primitive %X %X\n&quot;,
</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(&quot;API_PP_ACCESS_RIGHTS_REJ, FP rejected our registration...\n&quot;,
</span><del>-                         CELLIAX_P_LOG);
</del><ins>+                         SKYPIAX_P_LOG);
</ins><span class="cx"> 
</span><span class="cx">                 p-&gt;cvm_register_state = CVM_UNREGISTERED_TO_FP;
</span><span class="cx">                 p-&gt;cvm_lock_state = CVM_UNKNOWN_LOCK_STATE;
</span><span class="lines">@@ -7384,7 +7873,7 @@
</span><span class="cx">                 if (option_debug &gt; 1)
</span><span class="cx">                   DEBUGA_CVM
</span><span class="cx">                     (&quot;API_PP_ACCESS_RIGHTS_CFM, FP accepted our registration...\n&quot;,
</span><del>-                     CELLIAX_P_LOG);
</del><ins>+                     SKYPIAX_P_LOG);
</ins><span class="cx"> 
</span><span class="cx">                 p-&gt;cvm_register_state = CVM_REGISTERED_TO_FP;
</span><span class="cx">                 p-&gt;cvm_lock_state = CVM_UNKNOWN_LOCK_STATE;
</span><span class="lines">@@ -7394,7 +7883,7 @@
</span><span class="cx">                 if (option_debug &gt; 1)
</span><span class="cx">                   DEBUGA_CVM
</span><span class="cx">                     (&quot;API_PP_ACCESS_RIGHTS_CFM, FP accepted our registration, Our handset no. is %d, CVM? %X\n&quot;,
</span><del>-                     CELLIAX_P_LOG, p-&gt;cvm_handset_no, p-&gt;cvm_fp_is_cvm);
</del><ins>+                     SKYPIAX_P_LOG, p-&gt;cvm_handset_no, p-&gt;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 &gt; 1)
</span><span class="cx">                   DEBUGA_CVM(&quot;API_PP_LOCKED_IND, Connection to FP completed...\n&quot;,
</span><del>-                             CELLIAX_P_LOG);
</del><ins>+                             SKYPIAX_P_LOG);
</ins><span class="cx"> 
</span><span class="cx">                 p-&gt;cvm_register_state = CVM_REGISTERED_TO_FP;
</span><span class="cx">                 p-&gt;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">                   (&quot;API_PP_UNLOCKED_IND, CVM is unlocked with FP, Out of service !!!\n&quot;,
</span><del>-                   CELLIAX_P_LOG);
</del><ins>+                   SKYPIAX_P_LOG);
</ins><span class="cx"> 
</span><span class="cx">                 p-&gt;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 &gt; 1)
</span><span class="cx">                   DEBUGA_CVM
</span><span class="cx">                     (&quot;API_PP_SETUP_ACK_IND, connection to FP established, FP is waiting for a numer to dial...\n&quot;,
</span><del>-                     CELLIAX_P_LOG);
</del><ins>+                     SKYPIAX_P_LOG);
</ins><span class="cx"> 
</span><span class="cx">                 if (AST_STATE_DOWN == p-&gt;interface_state) {
</span><span class="cx">                   p-&gt;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 &gt; 1)
</span><span class="cx">                   DEBUGA_CVM(&quot;API_PP_ALERT_IND, remote end is ringing...\n&quot;,
</span><del>-                             CELLIAX_P_LOG);
</del><ins>+                             SKYPIAX_P_LOG);
</ins><span class="cx"> 
</span><span class="cx">                 if (AST_STATE_DIALING == p-&gt;interface_state) {
</span><span class="cx">                   p-&gt;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 &gt; 1)
</span><span class="cx">                   DEBUGA_CVM(&quot;API_PP_CONNECT_IND, our call was answered...\n&quot;,
</span><del>-                             CELLIAX_P_LOG);
</del><ins>+                             SKYPIAX_P_LOG);
</ins><span class="cx"> 
</span><span class="cx">                 if (AST_STATE_RINGING == p-&gt;interface_state) {
</span><span class="cx"> 
</span><span class="lines">@@ -7486,13 +7975,13 @@
</span><span class="cx">                 if (option_debug &gt; 1)
</span><span class="cx">                   DEBUGA_CVM
</span><span class="cx">                     (&quot;API_PP_REJECT_IND, FP or ther PP rejected our connection...\n&quot;,
</span><del>-                     CELLIAX_P_LOG);
</del><ins>+                     SKYPIAX_P_LOG);
</ins><span class="cx"> 
</span><span class="cx">                 if (AST_STATE_RING == p-&gt;interface_state &amp;&amp; p-&gt;owner) {
</span><span class="cx">                   /* Attempt to answer incoming call rejected by FP or PP */
</span><span class="cx">                   if (option_debug &gt; 1)
</span><span class="cx">                     DEBUGA_CVM(&quot;Was it PAGE_ALL CALL, that we should not answered?\n&quot;,
</span><del>-                               CELLIAX_P_LOG);
</del><ins>+                               SKYPIAX_P_LOG);
</ins><span class="cx"> 
</span><span class="cx">                   p-&gt;interface_state = AST_STATE_DOWN;
</span><span class="cx">                   celliax_queue_control(p-&gt;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 &gt; 1)
</span><span class="cx">                   DEBUGA_CVM(&quot;API_PP_SIGNAL_ON_IND, Ringback, ignore it...\n&quot;,
</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 &gt; 1)
</span><span class="cx">                   DEBUGA_CVM(&quot;API_PP_SIGNAL_OFF_IND, Ringback, ignore it...\n&quot;,
</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 &gt; 1)
</span><span class="cx">                   DEBUGA_CVM(&quot;API_PP_SETUP_IND, somebody is calling us...\n&quot;,
</span><del>-                             CELLIAX_P_LOG);
</del><ins>+                             SKYPIAX_P_LOG);
</ins><span class="cx"> 
</span><span class="cx">                 if (AST_STATE_DOWN == p-&gt;interface_state) {
</span><span class="cx"> 
</span><span class="cx">                   if (API_PP_SETUP_IND_CALL_INT ==
</span><span class="cx">                       p-&gt;array[BUSMAIL_OFFSET_MAIL_PARAMS +
</span><span class="cx">                                API_PP_SETUP_IND_CALL_TYPE_OFFSET]) {
</span><del>-                    DEBUGA_CVM(&quot;INTERNAL CALL, receive it...\n&quot;, CELLIAX_P_LOG);
</del><ins>+                    DEBUGA_CVM(&quot;INTERNAL CALL, receive it...\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx"> 
</span><span class="cx">                     p-&gt;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(&quot;NOT an INTERNAL CALL, CALL TYPE %X, just ignore it...\n&quot;,
</span><del>-                               CELLIAX_P_LOG,
</del><ins>+                               SKYPIAX_P_LOG,
</ins><span class="cx">                                p-&gt;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">                     (&quot;Ignore incoming call, Wrong interface state, current state %X\n&quot;,
</span><del>-                     CELLIAX_P_LOG, p-&gt;interface_state);
</del><ins>+                     SKYPIAX_P_LOG, p-&gt;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 &gt; 1)
</span><span class="cx">                   DEBUGA_CVM
</span><span class="cx">                     (&quot;API_PP_ALERT_OFF_IND, Ringback, stop alerting about incoming call...\n&quot;,
</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 &gt; 1)
</span><span class="cx">                   DEBUGA_CVM
</span><span class="cx">                     (&quot;API_PP_ALERT_ON_IND, Ringback, start alerting about incoming call...\n&quot;,
</span><del>-                     CELLIAX_P_LOG);
</del><ins>+                     SKYPIAX_P_LOG);
</ins><span class="cx"> /*
</span><span class="cx">                 if (AST_STATE_DOWN == p-&gt;interface_state) {
</span><del>-                  DEBUGA_CVM(&quot;Somebody is calling us, we see a PP_ALERT_ON_IND, receive it...\n&quot;, CELLIAX_P_LOG);
</del><ins>+                  DEBUGA_CVM(&quot;Somebody is calling us, we see a PP_ALERT_ON_IND, receive it...\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">                   p-&gt;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 &gt; 1)
</span><span class="cx">                   DEBUGA_CVM
</span><span class="cx">                     (&quot;API_PP_CONNECT_CFM, Confirmation for request to answer incoming call...\n&quot;,
</span><del>-                     CELLIAX_P_LOG);
</del><ins>+                     SKYPIAX_P_LOG);
</ins><span class="cx"> 
</span><span class="cx">                 if (AST_STATE_RING == p-&gt;interface_state &amp;&amp; p-&gt;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">                     (&quot;Ignore connection cfm, Wrong interface state, current state %X\n&quot;,
</span><del>-                     CELLIAX_P_LOG, p-&gt;interface_state);
</del><ins>+                     SKYPIAX_P_LOG, p-&gt;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 &gt; 1)
</span><span class="cx">                   DEBUGA_CVM
</span><span class="cx">                     (&quot;API_PP_RELEASE_CFM, Confirmation for request to hangup a call..\n&quot;,
</span><del>-                     CELLIAX_P_LOG);
</del><ins>+                     SKYPIAX_P_LOG);
</ins><span class="cx"> 
</span><span class="cx">                 if (AST_STATE_UP == p-&gt;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 &gt; 1)
</span><span class="cx">                   DEBUGA_CVM(&quot;API_PP_RELEASE_IND, FP releases connection to CVM...\n&quot;,
</span><del>-                             CELLIAX_P_LOG);
</del><ins>+                             SKYPIAX_P_LOG);
</ins><span class="cx"> 
</span><span class="cx">                 if (AST_STATE_UP == p-&gt;interface_state &amp;&amp; p-&gt;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-&gt;interface_state &amp;&amp; p-&gt;owner) {
</span><span class="cx">                   /* workaround for PAGE ALL CALL, FIXME!!!! */
</span><span class="cx">                   if (option_debug &gt; 1)
</span><del>-                    DEBUGA_CVM(&quot;WAS IT A PAGE ALL ???...\n&quot;, CELLIAX_P_LOG);
</del><ins>+                    DEBUGA_CVM(&quot;WAS IT A PAGE ALL ???...\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx"> 
</span><span class="cx">                   p-&gt;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 &gt; 1)
</span><del>-                  DEBUGA_CVM(&quot;API_PP_READ_RSSI_CFM, RSSI readout...\n&quot;, CELLIAX_P_LOG);
</del><ins>+                  DEBUGA_CVM(&quot;API_PP_READ_RSSI_CFM, RSSI readout...\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx"> 
</span><span class="cx">                 p-&gt;cvm_rssi = p-&gt;array[BUSMAIL_OFFSET_MAIL_PARAMS + 0];
</span><span class="cx">                 int rssi_percent = p-&gt;cvm_rssi * 100 / 0x3F;
</span><span class="cx">                 if (option_debug &gt; 1)
</span><del>-                  DEBUGA_CVM(&quot;RSSI is %X, %d%%...\n&quot;, CELLIAX_P_LOG, p-&gt;cvm_rssi,
</del><ins>+                  DEBUGA_CVM(&quot;RSSI is %X, %d%%...\n&quot;, SKYPIAX_P_LOG, p-&gt;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(&quot;UNKNOWN MsgPrimitive!!! %X\n&quot;, CELLIAX_P_LOG, MsgPrimitive);
</del><ins>+                WARNINGA(&quot;UNKNOWN MsgPrimitive!!! %X\n&quot;, 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 &gt; 1)
</span><del>-                DEBUGA_CVM(&quot;BUSMAIL_HEADER_CTRL_FRAME\n&quot;, CELLIAX_P_LOG);
</del><ins>+                DEBUGA_CVM(&quot;BUSMAIL_HEADER_CTRL_FRAME\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx"> 
</span><span class="cx">               switch (p-&gt;array[BUSMAIL_OFFSET_HEADER] &amp; BUSMAIL_HEADER_SU_BIT_MASK) {
</span><span class="cx">               case BUSMAIL_HEADER_CTRL_SU_FRAME:
</span><span class="cx">                 if (option_debug &gt; 1)
</span><del>-                  DEBUGA_CVM(&quot;BUSMAIL_HEADER_CTRL_SU_FRAME\n&quot;, CELLIAX_P_LOG);
</del><ins>+                  DEBUGA_CVM(&quot;BUSMAIL_HEADER_CTRL_SU_FRAME\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx"> 
</span><span class="cx">                 switch (p-&gt;array[BUSMAIL_OFFSET_HEADER] &amp; 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-&gt;array[BUSMAIL_OFFSET_HEADER] &amp; BUSMAIL_HEADER_RXSEQ_MASK));
</span><span class="cx"> 
</span><span class="cx">                   if (option_debug &gt; 1)
</span><del>-                    DEBUGA_CVM(&quot;BUSMAIL_HEADER_SUID_REJ, RxSeq %X\n&quot;, CELLIAX_P_LOG,
</del><ins>+                    DEBUGA_CVM(&quot;BUSMAIL_HEADER_SUID_REJ, RxSeq %X\n&quot;, 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-&gt;array[BUSMAIL_OFFSET_HEADER] &amp; BUSMAIL_HEADER_RXSEQ_MASK));
</span><span class="cx"> 
</span><span class="cx">                   if (option_debug &gt; 1)
</span><del>-                    DEBUGA_CVM(&quot;BUSMAIL_HEADER_SUID_RNR, RxSeq %X\n&quot;, CELLIAX_P_LOG,
</del><ins>+                    DEBUGA_CVM(&quot;BUSMAIL_HEADER_SUID_RNR, RxSeq %X\n&quot;, 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-&gt;array[BUSMAIL_OFFSET_HEADER] &amp; BUSMAIL_HEADER_RXSEQ_MASK));
</span><span class="cx"> 
</span><span class="cx">                   if (option_debug &gt; 1)
</span><del>-                    DEBUGA_CVM(&quot;BUSMAIL_HEADER_SUID_RR, RxSeq %X\n&quot;, CELLIAX_P_LOG,
</del><ins>+                    DEBUGA_CVM(&quot;BUSMAIL_HEADER_SUID_RR, RxSeq %X\n&quot;, 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(&quot;BUSMAIL_HEADER_SUID_UNKNOWN!!!\n&quot;, CELLIAX_P_LOG);
</del><ins>+                  WARNINGA(&quot;BUSMAIL_HEADER_SUID_UNKNOWN!!!\n&quot;, 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 &gt; 1)
</span><del>-                  DEBUGA_CVM(&quot;BUSMAIL_HEADER_CTRL_UN_FRAME\n&quot;, CELLIAX_P_LOG);
</del><ins>+                  DEBUGA_CVM(&quot;BUSMAIL_HEADER_CTRL_UN_FRAME\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx"> 
</span><span class="cx">                 switch (p-&gt;array[BUSMAIL_OFFSET_HEADER] &amp; BUSMAIL_HEADER_UNID_MASK) {
</span><span class="cx"> 
</span><span class="cx">                 case BUSMAIL_HEADER_UNID_SABM:
</span><span class="cx">                   if (option_debug &gt; 1)
</span><del>-                    DEBUGA_CVM(&quot;BUSMAIL_HEADER_UNID_SABM\n&quot;, CELLIAX_P_LOG);
</del><ins>+                    DEBUGA_CVM(&quot;BUSMAIL_HEADER_UNID_SABM\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">                   /* reset seq counters */
</span><span class="cx">                   p-&gt;busmail_txseq_celliax_last = 0xFF;
</span><span class="cx">                   p-&gt;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(&quot;BUSMAIL_HEADER_UNID_UNKNOWN!!!\n&quot;, CELLIAX_P_LOG);
</del><ins>+                  WARNINGA(&quot;BUSMAIL_HEADER_UNID_UNKNOWN!!!\n&quot;, 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(&quot;BUSMAIL_HEADER_CTRL_UNKNOWN!!!\n&quot;, CELLIAX_P_LOG);
</del><ins>+                WARNINGA(&quot;BUSMAIL_HEADER_CTRL_UNKNOWN!!!\n&quot;, 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(&quot;BUSMAIL_HEADER_UNKNOWN!!!\n&quot;, CELLIAX_P_LOG);
</del><ins>+              WARNINGA(&quot;BUSMAIL_HEADER_UNKNOWN!!!\n&quot;, 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(&quot;BUSMAIL MSG UNKNOWN or REJECTED!\n&quot;, CELLIAX_P_LOG);
</del><ins>+            WARNINGA(&quot;BUSMAIL MSG UNKNOWN or REJECTED!\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">           }
</span><span class="cx">         }
</span><span class="cx">         p-&gt;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">         (&quot;select returned -1 on %s, marking controldev as dead, errno was: %d, error was: %s\n&quot;,
</span><del>-         CELLIAX_P_LOG, p-&gt;controldevice_name, errno, strerror(errno));
</del><ins>+         SKYPIAX_P_LOG, p-&gt;controldevice_name, errno, strerror(errno));
</ins><span class="cx"> 
</span><span class="cx">       p-&gt;controldev_dead = 1;
</span><span class="cx">       close(p-&gt;controldevfd);
</span><span class="lines">@@ -7832,20 +8321,20 @@
</span><span class="cx"> 
</span><span class="cx">     } else {
</span><span class="cx">       WARNINGA(&quot;select returned -1 on %s, errno was: %d, EINTR, error was: %s\n&quot;,
</span><del>-               CELLIAX_P_LOG, p-&gt;controldevice_name, errno, strerror(errno));
</del><ins>+               SKYPIAX_P_LOG, p-&gt;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(&quot;celliax_serial_send_if_time_CVM_BUSMAIL failed!\n&quot;, CELLIAX_P_LOG);
</del><ins>+    ERRORA(&quot;celliax_serial_send_if_time_CVM_BUSMAIL failed!\n&quot;, 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(&amp;p-&gt;controldev_lock);
</span><span class="cx"> 
</span><span class="cx">   if (option_debug &gt; 1)
</span><del>-    DEBUGA_CVM(&quot;Sending RR CTRL frame wit PF bit set\n&quot;, CELLIAX_P_LOG);
</del><ins>+    DEBUGA_CVM(&quot;Sending RR CTRL frame wit PF bit set\n&quot;, 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(&quot;failed celliax_serial_read_CVM_BUSMAIL\n&quot;, CELLIAX_P_LOG);
</del><ins>+    ERRORA(&quot;failed celliax_serial_read_CVM_BUSMAIL\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">     CVM_UNLOCKA(&amp;p-&gt;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(&quot;failed celliax_serial_read_CVM_BUSMAIL\n&quot;, CELLIAX_P_LOG);
</del><ins>+      ERRORA(&quot;failed celliax_serial_read_CVM_BUSMAIL\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">       CVM_UNLOCKA(&amp;p-&gt;controldev_lock);
</span><span class="cx">       return -1;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (how_many_reads &gt; 10) {
</span><del>-      ERRORA(&quot;no expected results in %d celliax_serial_read_CVM_BUSMAIL\n&quot;, CELLIAX_P_LOG,
</del><ins>+      ERRORA(&quot;no expected results in %d celliax_serial_read_CVM_BUSMAIL\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">              how_many_reads);
</span><span class="cx">       CVM_UNLOCKA(&amp;p-&gt;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 &lt; 0) {
</span><span class="cx">       if (actual != len)
</span><del>-        ERRORA(&quot;celliax_serial_write error: %s&quot;, CELLIAX_P_LOG, strerror(errno));
</del><ins>+        ERRORA(&quot;celliax_serial_write error: %s&quot;, SKYPIAX_P_LOG, strerror(errno));
</ins><span class="cx">       CVM_UNLOCKA(&amp;p-&gt;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 &gt; ((char *) &amp;debug_buf + 1000))
</span><span class="cx">         break;
</span><span class="cx">     }
</span><del>-    DEBUGA_CVM(&quot;%s was sent down the wire\n&quot;, CELLIAX_P_LOG, debug_buf);
</del><ins>+    DEBUGA_CVM(&quot;%s was sent down the wire\n&quot;, 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-&gt;cvm_busmail_outgoing_list;
</span><span class="cx"> 
</span><span class="cx">   if (ptr == NULL) {
</span><del>-    ERRORA(&quot;cvm_busmail_outgoing_list is NULL ?\n&quot;, CELLIAX_P_LOG);
</del><ins>+    ERRORA(&quot;cvm_busmail_outgoing_list is NULL ?\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">     return -1;
</span><span class="cx">   }
</span><span class="cx"> 
</span><span class="cx">   PUSHA_UNLOCKA(&amp;p-&gt;cvm_busmail_outgoing_list_lock);
</span><span class="cx">   CVM_LOKKA(&amp;p-&gt;cvm_busmail_outgoing_list_lock);
</span><span class="cx"> /*
</span><del>-  DEBUGA_CVM(&quot;PREFREE OUTGOING list:\n&quot;, CELLIAX_P_LOG);
</del><ins>+  DEBUGA_CVM(&quot;PREFREE OUTGOING list:\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">   celliax_serial_list_print_CVM_BUSMAIL(p, p-&gt;cvm_busmail_outgoing_list);
</span><span class="cx"> */
</span><span class="cx">   while (ptr-&gt;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 &gt; 1) 
</span><del>-      DEBUGA_CVM(&quot;OUTGOING LIST TxSeq is %X, RxSeq is %X\n&quot;, CELLIAX_P_LOG, MsgTxSeqNo, MsgRxSeqNo);
</del><ins>+      DEBUGA_CVM(&quot;OUTGOING LIST TxSeq is %X, RxSeq is %X\n&quot;, 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 &lt;= TxToAck) {
</span><span class="cx"> 
</span><span class="cx">         if (option_debug &gt; 1)
</span><del>-          DEBUGA_CVM(&quot;Msg with TxSeq=%X ACKed with CvmRxSeq=%X\n&quot;, CELLIAX_P_LOG,
</del><ins>+          DEBUGA_CVM(&quot;Msg with TxSeq=%X ACKed with CvmRxSeq=%X\n&quot;, 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-&gt;next) &amp;&amp; (NULL == old-&gt;previous)) {
</span><span class="cx">           if (option_debug &gt; 1) {
</span><del>-            DEBUGA_CVM(&quot;FREEING LAST\n&quot;, CELLIAX_P_LOG);
</del><ins>+            DEBUGA_CVM(&quot;FREEING LAST\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">           }
</span><span class="cx"> 
</span><span class="cx">           p-&gt;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 &gt; 1)
</span><del>-        DEBUGA_CVM(&quot;FREEING TxSeq is %X, RxSeq is %X\n&quot;, CELLIAX_P_LOG, MsgTxSeqNo, MsgRxSeqNo);
</del><ins>+        DEBUGA_CVM(&quot;FREEING TxSeq is %X, RxSeq is %X\n&quot;, 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(&quot;POSTFREE OUTGOING list:\n&quot;, CELLIAX_P_LOG);
</del><ins>+  DEBUGA_CVM(&quot;POSTFREE OUTGOING list:\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">   celliax_serial_list_print_CVM_BUSMAIL(p, p-&gt;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-&gt;cvm_busmail_outgoing_list;
</span><span class="cx"> 
</span><span class="cx">   if (ptr == NULL) {
</span><del>-/*    ERRORA(&quot;cvm_busmail_outgoing_list is NULL ?\n&quot;, CELLIAX_P_LOG); */
-    WARNINGA(&quot;cvm_busmail_outgoing_list is NULL, nothing to send...\n&quot;, CELLIAX_P_LOG);
</del><ins>+/*    ERRORA(&quot;cvm_busmail_outgoing_list is NULL ?\n&quot;, SKYPIAX_P_LOG); */
+    WARNINGA(&quot;cvm_busmail_outgoing_list is NULL, nothing to send...\n&quot;, 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-&gt;next != NULL) {
</span><del>-    WARNINGA(&quot;cvm_busmail_outgoing_list-&gt;next is not null ?\n&quot;, CELLIAX_P_LOG);
</del><ins>+    WARNINGA(&quot;cvm_busmail_outgoing_list-&gt;next is not null ?\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">     ptr = ptr-&gt;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) &gt; ((ptr-&gt;tv_sec * 1000 + ptr-&gt;tv_usec / 1000) + 1000)) { //retest, maybe has been changed?
</span><span class="cx"> 
</span><span class="cx">           if (option_debug &gt; 1)
</span><del>-            DEBUGA_CVM(&quot;RESEND TxSeq=%X, passed %ld ms, sent %d times\n&quot;, CELLIAX_P_LOG,
</del><ins>+            DEBUGA_CVM(&quot;RESEND TxSeq=%X, passed %ld ms, sent %d times\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                        ptr-&gt;txseqno,
</span><span class="cx">                        ((tv.tv_sec * 1000 + tv.tv_usec / 1000) -
</span><span class="cx">                         (ptr-&gt;tv_sec * 1000 + ptr-&gt;tv_usec / 1000)), ptr-&gt;how_many_sent);
</span><span class="cx"> 
</span><span class="cx">           if (ptr-&gt;how_many_sent &gt; 9) {
</span><del>-            ERRORA(&quot;RESEND TxSeq=%X, passed %ld ms, sent %d times\n&quot;, CELLIAX_P_LOG,
</del><ins>+            ERRORA(&quot;RESEND TxSeq=%X, passed %ld ms, sent %d times\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                    ptr-&gt;txseqno,
</span><span class="cx">                    ((tv.tv_sec * 1000 + tv.tv_usec / 1000) -
</span><span class="cx">                     (ptr-&gt;tv_sec * 1000 + ptr-&gt;tv_usec / 1000)), ptr-&gt;how_many_sent);
</span><span class="lines">@@ -8174,9 +8663,9 @@
</span><span class="cx">           ptr-&gt;how_many_sent++;
</span><span class="cx"> /*
</span><span class="cx">           if (option_debug &gt; 1) {
</span><del>-            DEBUGA_CVM(&quot;OUTGOING list:\n&quot;, CELLIAX_P_LOG);
</del><ins>+            DEBUGA_CVM(&quot;OUTGOING list:\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">             celliax_serial_list_print_CVM_BUSMAIL(p, p-&gt;cvm_busmail_outgoing_list);
</span><del>-            DEBUGA_CVM(&quot;OUTGOING list END\n&quot;, CELLIAX_P_LOG);
</del><ins>+            DEBUGA_CVM(&quot;OUTGOING list END\n&quot;, 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-&gt;sent == 0 &amp;&amp; ptr-&gt;acknowledged == 0 &amp;&amp; ptr-&gt;valid == 1) {  //retest, maybe has been changed?
</span><span class="cx"> 
</span><span class="cx">       if (option_debug &gt; 1)
</span><del>-        DEBUGA_CVM(&quot;SENDING 1st TIME TxSeq=%X\n&quot;, CELLIAX_P_LOG, ptr-&gt;txseqno);
</del><ins>+        DEBUGA_CVM(&quot;SENDING 1st TIME TxSeq=%X\n&quot;, SKYPIAX_P_LOG, ptr-&gt;txseqno);
</ins><span class="cx"> 
</span><span class="cx">       celliax_serial_send_CVM_BUSMAIL(p, ptr-&gt;busmail_msg_len, ptr-&gt;busmail_msg_buffer);
</span><span class="cx"> 
</span><span class="lines">@@ -8205,9 +8694,9 @@
</span><span class="cx">       ptr-&gt;how_many_sent++;
</span><span class="cx"> /*
</span><span class="cx">       if (option_debug &gt; 1) {
</span><del>-        DEBUGA_CVM(&quot;OUTGOING list:\n&quot;, CELLIAX_P_LOG);
</del><ins>+        DEBUGA_CVM(&quot;OUTGOING list:\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">         celliax_serial_list_print_CVM_BUSMAIL(p, p-&gt;cvm_busmail_outgoing_list);
</span><del>-        DEBUGA_CVM(&quot;OUTGOING list END\n&quot;, CELLIAX_P_LOG);        
</del><ins>+        DEBUGA_CVM(&quot;OUTGOING list END\n&quot;, 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-&gt;busmail_mail_task_id) + 2;
</span><span class="cx"> 
</span><span class="cx">     if (option_debug &gt; 1)
</span><del>-      DEBUGA_CVM(&quot;INFO frame to send\n&quot;, CELLIAX_P_LOG);
</del><ins>+      DEBUGA_CVM(&quot;INFO frame to send\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx"> 
</span><span class="cx">     buffer2[BUSMAIL_OFFSET_MAIL_PROGRAM_ID] = busmail_frame-&gt;busmail_mail_program_id;
</span><span class="cx">     buffer2[BUSMAIL_OFFSET_MAIL_TASK_ID] = busmail_frame-&gt;busmail_mail_task_id;
</span><span class="lines">@@ -8281,11 +8770,11 @@
</span><span class="cx">     len = BUSMAIL_OFFSET_MAIL + sizeof(busmail_frame-&gt;busmail_crc);
</span><span class="cx"> 
</span><span class="cx">     if (option_debug &gt; 1)
</span><del>-      DEBUGA_CVM(&quot;CTRL frame to send\n&quot;, CELLIAX_P_LOG);
</del><ins>+      DEBUGA_CVM(&quot;CTRL frame to send\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">   }
</span><span class="cx"> 
</span><span class="cx"> /*
</span><del>-  DEBUGA_CVM(&quot;Its len=%d\n&quot;, CELLIAX_P_LOG, len);      
</del><ins>+  DEBUGA_CVM(&quot;Its len=%d\n&quot;, SKYPIAX_P_LOG, len);      
</ins><span class="cx"> */
</span><span class="cx"> 
</span><span class="cx">   busmail_frame-&gt;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 &gt; 1)
</span><del>-        DEBUGA_CVM(&quot;INFO: %s was prepared to send\n&quot;, CELLIAX_P_LOG, debug_buf);
</del><ins>+        DEBUGA_CVM(&quot;INFO: %s was prepared to send\n&quot;, SKYPIAX_P_LOG, debug_buf);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (option_debug &gt; 1) {
</span><del>-      DEBUGA_CVM(&quot;OUTGOING INFO Frame TxSeq is %X, RxSeq is %X\n&quot;, CELLIAX_P_LOG,
</del><ins>+      DEBUGA_CVM(&quot;OUTGOING INFO Frame TxSeq is %X, RxSeq is %X\n&quot;, SKYPIAX_P_LOG,
</ins><span class="cx">                  (buffer2[BUSMAIL_OFFSET_HEADER] &amp; BUSMAIL_HEADER_TXSEQ_MASK) &gt;&gt; 4,
</span><span class="cx">                  buffer2[BUSMAIL_OFFSET_HEADER] &amp; BUSMAIL_HEADER_RXSEQ_MASK);
</span><span class="cx"> /*
</span><del>-      DEBUGA_CVM(&quot;OUTGOING list:\n&quot;, CELLIAX_P_LOG);
</del><ins>+      DEBUGA_CVM(&quot;OUTGOING list:\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">       celliax_serial_list_print_CVM_BUSMAIL(p, p-&gt;cvm_busmail_outgoing_list);
</span><del>-      DEBUGA_CVM(&quot;OUTGOING list END\n&quot;, CELLIAX_P_LOG); */
</del><ins>+      DEBUGA_CVM(&quot;OUTGOING list END\n&quot;, SKYPIAX_P_LOG); */
</ins><span class="cx">     }
</span><span class="cx">     p-&gt;cvm_busmail_outgoing_list-&gt;txseqno =
</span><span class="cx">       (unsigned char) (buffer2[BUSMAIL_OFFSET_HEADER] &amp; BUSMAIL_HEADER_TXSEQ_MASK) &gt;&gt; 4;
</span><span class="lines">@@ -8370,7 +8859,7 @@
</span><span class="cx">           (buffer2[BUSMAIL_OFFSET_HEADER] &amp; BUSMAIL_HEADER_REJ_MASK)) {
</span><span class="cx"> 
</span><span class="cx">         if (option_debug &gt; 1)
</span><del>-          DEBUGA_CVM(&quot;CTRL REJ frame...\n&quot;, CELLIAX_P_LOG);
</del><ins>+          DEBUGA_CVM(&quot;CTRL REJ frame...\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx"> 
</span><span class="cx">         if (0xFF != p-&gt;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 &gt; 1)
</span><span class="cx">             DEBUGA_CVM
</span><span class="cx">               (&quot;Skipping sending REJ, because we just cleared RxSeq counter, and probably it was a packet that is invalid now...\n&quot;,
</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 &gt; 1)
</span><del>-        DEBUGA_CVM(&quot;CTRL: %s was prepared to send\n&quot;, CELLIAX_P_LOG, debug_buf);
</del><ins>+        DEBUGA_CVM(&quot;CTRL: %s was prepared to send\n&quot;, 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(&quot;UNKNOWN CTRL TYPE specified, sending nothing!!!\n&quot;, CELLIAX_P_LOG);
</del><ins>+    WARNINGA(&quot;UNKNOWN CTRL TYPE specified, sending nothing!!!\n&quot;, 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, &amp;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, &amp;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 &gt; 1) {
</span><del>-    DEBUGA_CVM(&quot;START FREEING OUTGOING\n&quot;, CELLIAX_P_LOG);
-    DEBUGA_CVM(&quot;OUTGOING list:\n&quot;, CELLIAX_P_LOG);
</del><ins>+    DEBUGA_CVM(&quot;START FREEING OUTGOING\n&quot;, SKYPIAX_P_LOG);
+    DEBUGA_CVM(&quot;OUTGOING list:\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">     celliax_serial_list_print_CVM_BUSMAIL(p, p-&gt;cvm_busmail_outgoing_list);
</span><del>-    DEBUGA_CVM(&quot;OUTGOING list END\n&quot;, CELLIAX_P_LOG);
</del><ins>+    DEBUGA_CVM(&quot;OUTGOING list END\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">   }
</span><span class="cx"> */
</span><span class="cx">   ptr = p-&gt;cvm_busmail_outgoing_list;
</span><span class="lines">@@ -8494,7 +8983,7 @@
</span><span class="cx">     while (ptr-&gt;previous != NULL) {
</span><span class="cx"> 
</span><span class="cx">       if (option_debug &gt; 1)
</span><del>-        DEBUGA_CVM(&quot;FREED \n&quot;, CELLIAX_P_LOG);
</del><ins>+        DEBUGA_CVM(&quot;FREED \n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx"> 
</span><span class="cx">       prev = ptr-&gt;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 &gt; 1)
</span><del>-    DEBUGA_CVM(&quot;LAST FREED \n&quot;, CELLIAX_P_LOG);
</del><ins>+    DEBUGA_CVM(&quot;LAST FREED \n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx"> 
</span><span class="cx">   p-&gt;cvm_busmail_outgoing_list = NULL;
</span><span class="cx">   p-&gt;cvm_busmail_outgoing_list = celliax_serial_list_init_CVM_BUSMAIL(p);
</span><span class="cx"> 
</span><span class="cx">   if (option_debug &gt; 1) {
</span><del>-    DEBUGA_CVM(&quot;OUTGOING list:\n&quot;, CELLIAX_P_LOG);
</del><ins>+    DEBUGA_CVM(&quot;OUTGOING list:\n&quot;, SKYPIAX_P_LOG);
</ins><span class="cx">     celliax_serial_list_print_CVM_BUSMAIL(p, p-&gt;cvm_busmail_outgoing_list);
</span><del>-    DEBUGA_CVM(&quot;OUTGOING list END\n&quot;, CELLIAX_P_LOG);
-    DEBUGA_CVM(&quot;STARTING FREE INGOING\n&quot;, CELLIAX_P_LOG);
</del><ins>+    DEBUGA_CVM(&quot;OUTGOING list END\n&quot;, SKYPIAX_P_LOG);
+    DEBUGA_CVM(&quot;STARTING FREE INGOING\n&quot;, 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-&gt;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 &gt; 3)
</span><span class="cx">         DEBUGA_CVM
</span><span class="cx">           (&quot;PTR msg is: %d, seqnum is %.2X, tv_sec is %d, tv_usec is %d, acknowledged is: %d,&quot;
</span><del>-           &quot; sent is:%d, how_many_sent is: %d\n&quot;, CELLIAX_P_LOG, ptr-&gt;valid,
</del><ins>+           &quot; sent is:%d, how_many_sent is: %d\n&quot;, SKYPIAX_P_LOG, ptr-&gt;valid,
</ins><span class="cx">            /*ptr-&gt;seqnum */ 44,
</span><span class="cx">            ptr-&gt;tv_sec, ptr-&gt;tv_usec, ptr-&gt;acknowledged, ptr-&gt;sent, ptr-&gt;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 = &quot;default&quot;;
</span><span class="cx">                         char *dialplan = &quot;XML&quot;;
</span><span class="cx">                         char *destination = &quot;5000&quot;;
</span><del>-                        char *tonegroup = NULL;
</del><ins>+                        char *controldevice_name = &quot;/dev/ttyACM0&quot;;
</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, &quot;name&quot;);
</span><span class="cx">                                 char *val = (char *) switch_xml_attr_soft(param, &quot;value&quot;);
</span><span class="cx"> 
</span><del>-                                if (!strcasecmp(var, &quot;tonegroup&quot;)) {
-                                        tonegroup = val;
</del><ins>+                                if (!strcasecmp(var, &quot;controldevice_name&quot;)) {
+                                        controldevice_name = val;
</ins><span class="cx">                                 } else if (!strcasecmp(var, &quot;digit_timeout&quot;) || !strcasecmp(var, &quot;digit-timeout&quot;)) {
</span><span class="cx">                                         digit_timeout = val;
</span><span class="cx">                                 } else if (!strcasecmp(var, &quot;context&quot;)) {
</span><span class="lines">@@ -1184,8 +1185,8 @@
</span><span class="cx">                                 WARNINGA(&quot;interface missing param 'name', not nice, but works\n&quot;, SKYPIAX_P_LOG);
</span><span class="cx">                         }
</span><span class="cx"> 
</span><del>-                        if (!tonegroup) {
-                                tonegroup = &quot;us&quot;;
</del><ins>+                        if (!controldevice_name) {
+                                controldevice_name = &quot;/dev/ttyACM0&quot;;
</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">                                         (&quot;interface_id=%d globals.SKYPIAX_INTERFACES[interface_id].X11_display=%s\n&quot;,
</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(&quot;STARTING interface_id=%d\n&quot;, 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(&amp;globals.SKYPIAX_INTERFACES[interface_id], globals.SKYPIAX_INTERFACES[interface_id].controldevice_speed);
+    if (globals.SKYPIAX_INTERFACES[interface_id].controldevfd &lt; 1) {
+      ERRORA(&quot;celliax_serial_init failed\n&quot;, 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(&amp;globals.SKYPIAX_INTERFACES[interface_id]);
+    if (res) {
+      ERRORA(&quot;celliax_serial_config failed\n&quot;, SKYPIAX_P_LOG);
+      //celliax_sound_shutdown(tmp);
+      //if (tmp)
+        //free(tmp);
+      //return NULL;
+    }
+  }
+
+
+                                switch_sleep(100000);
</ins><span class="cx">                                 switch_threadattr_create(&amp;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(&amp;globals.SKYPIAX_INTERFACES[interface_id].celliax_api_thread, celliax_api_thread_attr, celliax_do_skypeapi_thread, &amp;globals.SKYPIAX_INTERFACES[interface_id], celliax_module_pool);
</span></span></pre>
</div>
</div>
<div id="footer">See you at ClueCon</div>

</body>
</html>