<!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][14723] </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=14723">14723</a></dd>
<dt>Author</dt> <dd>gmaruzz</dd>
<dt>Date</dt> <dd>2009-09-01 15:14:58 -0500 (Tue, 01 Sep 2009)</dd>
</dl>
<h3>Log Message</h3>
<pre>celliax: indented</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 (14722 => 14723)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/gmaruzz/mod_celliax/celliax.h        2009-09-01 20:14:09 UTC (rev 14722)
+++ freeswitch/branches/gmaruzz/mod_celliax/celliax.h        2009-09-01 20:14:58 UTC (rev 14723)
</span><span class="lines">@@ -267,7 +267,7 @@
</span><span class="cx">         char celliax_fullname[512];
</span><span class="cx">         char celliax_displayname[512];
</span><span class="cx">         int phone_callflow;                        /*!< \brief 'callflow' of the celliax interface (as opposed to phone interface) */
</span><del>-        int celliax;                                        /*!< \brief config flag, bool, GSM support on this interface (0 if false, -1 if true) */
</del><ins>+        int celliax;                                /*!< \brief config flag, bool, GSM support on this interface (0 if false, -1 if true) */
</ins><span class="cx">         int control_to_send;
</span><span class="cx"> #ifdef WIN32
</span><span class="cx">         switch_file_t *audiopipe[2];
</span></span></pre></div>
<a id="freeswitchbranchesgmaruzzmod_celliaxcelliax_protocolc"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/gmaruzz/mod_celliax/celliax_protocol.c (14722 => 14723)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/gmaruzz/mod_celliax/celliax_protocol.c        2009-09-01 20:14:09 UTC (rev 14722)
+++ freeswitch/branches/gmaruzz/mod_celliax/celliax_protocol.c        2009-09-01 20:14:58 UTC (rev 14723)
</span><span class="lines">@@ -577,7 +577,7 @@
</span><span class="cx">                                                 }
</span><span class="cx">                                         } else {
</span><span class="cx">                                                 DEBUGA_CELLIAX("|%s| got first RING, but not sending AT+CLCC? as this device "
</span><del>-                                                                         "seems not to support\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
</del><ins>+                                                                         "seems not to support\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
</ins><span class="cx">                                         }
</span><span class="cx">                                 }
</span><span class="cx">                                 tech_pvt->phone_callflow = CALLFLOW_INCOMING_RING;
</span><span class="lines">@@ -613,9 +613,9 @@
</span><span class="cx">
</span><span class="cx">                                 tech_pvt->phone_callflow = CALLFLOW_INCOMING_RING;
</span><span class="cx">                                 DEBUGA_CELLIAX("|%s| CLCC CALLID: name is %s, number is %s\n", CELLIAX_P_LOG,
</span><del>-                                                         tech_pvt->line_array.result[i],
-                                                         tech_pvt->callid_name[0] ? tech_pvt->callid_name : "not available",
-                                                         tech_pvt->callid_number[0] ? tech_pvt->callid_number : "not available");
</del><ins>+                                                         tech_pvt->line_array.result[i],
+                                                         tech_pvt->callid_name[0] ? tech_pvt->callid_name : "not available",
+                                                         tech_pvt->callid_number[0] ? tech_pvt->callid_number : "not available");
</ins><span class="cx">                         }
</span><span class="cx">
</span><span class="cx">                         if ((strncmp(tech_pvt->line_array.result[i], "+CLIP", 5) == 0)) {
</span><span class="lines">@@ -655,24 +655,22 @@
</span><span class="cx">                                 tech_pvt->interface_state = CELLIAX_STATE_RING;
</span><span class="cx">                                 tech_pvt->phone_callflow = CALLFLOW_INCOMING_RING;
</span><span class="cx">                                 DEBUGA_CELLIAX("|%s| CLIP INCOMING CALLID: name is %s, number is %s\n", CELLIAX_P_LOG,
</span><del>-                                                tech_pvt->line_array.result[i],
-                                                (strlen(tech_pvt->callid_name) && tech_pvt->callid_name[0] != 1) ? tech_pvt->callid_name : "not available",
-                                                strlen(tech_pvt->callid_number) ? tech_pvt->callid_number : "not available");
</del><ins>+                                                         tech_pvt->line_array.result[i],
+                                                         (strlen(tech_pvt->callid_name) && tech_pvt->callid_name[0] != 1) ? tech_pvt->callid_name : "not available",
+                                                         strlen(tech_pvt->callid_number) ? tech_pvt->callid_number : "not available");
</ins><span class="cx">
</span><del>-                                if(!strlen(tech_pvt->callid_number)){
-                                        strcpy(tech_pvt->callid_number, "not available") ;
</del><ins>+                                if (!strlen(tech_pvt->callid_number)) {
+                                        strcpy(tech_pvt->callid_number, "not available");
</ins><span class="cx">                                 }
</span><span class="cx">
</span><del>-                                if( !strlen(tech_pvt->callid_name) && tech_pvt->callid_name[0] != 1) {
-                                        strncpy(tech_pvt->callid_name, tech_pvt->callid_number, sizeof(tech_pvt->callid_name)) ;
</del><ins>+                                if (!strlen(tech_pvt->callid_name) && tech_pvt->callid_name[0] != 1) {
+                                        strncpy(tech_pvt->callid_name, tech_pvt->callid_number, sizeof(tech_pvt->callid_name));
</ins><span class="cx">                                         //strncpy(tech_pvt->callid_name, tech_pvt->callid_number, sizeof(tech_pvt->callid_name)) ;
</span><span class="cx">                                         snprintf(tech_pvt->callid_name, sizeof(tech_pvt->callid_name), "Celliax: %s", tech_pvt->callid_number);
</span><span class="cx">                                 }
</span><span class="cx">
</span><span class="cx">                                 DEBUGA_CELLIAX("|%s| CLIP INCOMING CALLID: NOW name is %s, number is %s\n", CELLIAX_P_LOG,
</span><del>-                                                tech_pvt->line_array.result[i],
-                                                tech_pvt->callid_name,
-                                                tech_pvt->callid_number);
</del><ins>+                                                         tech_pvt->line_array.result[i], tech_pvt->callid_name, tech_pvt->callid_number);
</ins><span class="cx">                         }
</span><span class="cx">
</span><span class="cx">                         if ((strcmp(tech_pvt->line_array.result[i], "BUSY") == 0)) {
</span><span class="lines">@@ -722,7 +720,7 @@
</span><span class="cx">
</span><span class="cx">                                         err = sscanf(&tech_pvt->line_array.result[i][5], "%d,%d", &power_supply, &battery_strenght);
</span><span class="cx">                                         DEBUGA_CELLIAX("|%s| +CBC: Powered by %s, battery strenght=%d\n", CELLIAX_P_LOG,
</span><del>-                                                                 tech_pvt->line_array.result[i], power_supply ? "power supply" : "battery", battery_strenght);
</del><ins>+                                                                 tech_pvt->line_array.result[i], power_supply ? "power supply" : "battery", battery_strenght);
</ins><span class="cx">
</span><span class="cx">                                 }
</span><span class="cx">
</span><span class="lines">@@ -733,7 +731,7 @@
</span><span class="cx">                                 else {
</span><span class="cx">                                         if (option_debug > 1)
</span><span class="cx">                                                 DEBUGA_CELLIAX("|%s| +CBC: Powered by %s, battery strenght=%d\n", CELLIAX_P_LOG,
</span><del>-                                                                         tech_pvt->line_array.result[i], power_supply ? "power supply" : "battery", battery_strenght);
</del><ins>+                                                                         tech_pvt->line_array.result[i], power_supply ? "power supply" : "battery", battery_strenght);
</ins><span class="cx">                                         if (!power_supply) {
</span><span class="cx">                                                 if (battery_strenght < 10) {
</span><span class="cx">                                                         ERRORA("|%s| BATTERY ALMOST EXHAUSTED\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
</span><span class="lines">@@ -1129,9 +1127,9 @@
</span><span class="cx">                                                                 DEBUGA_CELLIAX("incoming callid: Text: %s, Number: %s\n", CELLIAX_P_LOG, tech_pvt->callid_name, tech_pvt->callid_number);
</span><span class="cx">
</span><span class="cx">                                                         DEBUGA_CELLIAX("|%s| CPBR INCOMING CALLID: name is %s, number is %s\n",
</span><del>-                                                                                 CELLIAX_P_LOG, tech_pvt->line_array.result[i],
-                                                                                 tech_pvt->callid_name[0] != 1 ? tech_pvt->callid_name : "not available",
-                                                                                 tech_pvt->callid_number[0] ? tech_pvt->callid_number : "not available");
</del><ins>+                                                                                 CELLIAX_P_LOG, tech_pvt->line_array.result[i],
+                                                                                 tech_pvt->callid_name[0] != 1 ? tech_pvt->callid_name : "not available",
+                                                                                 tech_pvt->callid_number[0] ? tech_pvt->callid_number : "not available");
</ins><span class="cx">
</span><span class="cx">                                                         /* mark the time of RING */
</span><span class="cx">                                                         gettimeofday(&(tech_pvt->ringtime), NULL);
</span><span class="lines">@@ -1838,7 +1836,7 @@
</span><span class="cx">         iconv_res = iconv(iconv_format, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
</span><span class="cx">         if (iconv_res == (size_t) -1) {
</span><span class="cx">                 DEBUGA_CELLIAX("ciao in=%s, inleft=%d, out=%s, outleft=%d, converted=%s, utf8_out=%s\n",
</span><del>-                                         CELLIAX_P_LOG, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, converted, utf8_out);
</del><ins>+                                         CELLIAX_P_LOG, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, converted, utf8_out);
</ins><span class="cx">                 DEBUGA_CELLIAX("error: %s %d\n", CELLIAX_P_LOG, strerror(errno), errno);
</span><span class="cx">                 return -1;
</span><span class="cx">         }
</span><span class="lines">@@ -1875,7 +1873,7 @@
</span><span class="cx">         outbytesleft = 16000;
</span><span class="cx">
</span><span class="cx">         DEBUGA_CELLIAX("in=%s, inleft=%d, out=%s, outleft=%d, utf_in=%s, converted=%s\n",
</span><del>-                                 CELLIAX_P_LOG, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, utf_in, converted);
</del><ins>+                                 CELLIAX_P_LOG, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, utf_in, converted);
</ins><span class="cx">         iconv_res = iconv(iconv_format, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
</span><span class="cx">         if (iconv_res == (size_t) -1) {
</span><span class="cx">                 ERRORA("error: %s %d\n", CELLIAX_P_LOG, strerror(errno), errno);
</span></span></pre></div>
<a id="freeswitchbranchesgmaruzzmod_celliaxmod_celliaxc"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/gmaruzz/mod_celliax/mod_celliax.c (14722 => 14723)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/gmaruzz/mod_celliax/mod_celliax.c        2009-09-01 20:14:09 UTC (rev 14722)
+++ freeswitch/branches/gmaruzz/mod_celliax/mod_celliax.c        2009-09-01 20:14:58 UTC (rev 14723)
</span><span class="lines">@@ -1374,7 +1374,7 @@
</span><span class="cx">                                         ("interface_id=%d globals.CELLIAX_INTERFACES[interface_id].tcp_srv_port=%d\n",
</span><span class="cx">                                          CELLIAX_P_LOG, interface_id, globals.CELLIAX_INTERFACES[interface_id].tcp_srv_port);
</span><span class="cx">                                 DEBUGA_CELLIAX("interface_id=%d globals.CELLIAX_INTERFACES[interface_id].name=%s\n",
</span><del>-                                                         CELLIAX_P_LOG, interface_id, globals.CELLIAX_INTERFACES[interface_id].name);
</del><ins>+                                                         CELLIAX_P_LOG, interface_id, globals.CELLIAX_INTERFACES[interface_id].name);
</ins><span class="cx">                                 DEBUGA_CELLIAX
</span><span class="cx">                                         ("interface_id=%d globals.CELLIAX_INTERFACES[interface_id].context=%s\n",
</span><span class="cx">                                          CELLIAX_P_LOG, interface_id, globals.CELLIAX_INTERFACES[interface_id].context);
</span><span class="lines">@@ -1762,9 +1762,9 @@
</span><span class="cx">                         //DEBUGA_CELLIAX("celliax interface: %d, name: %s, state: %d\n", CELLIAX_P_LOG, interface_id, globals.CELLIAX_INTERFACES[interface_id].name, celliax_state);
</span><span class="cx">                         if ((tech_pvt_calling ? strcmp(tech_pvt->celliax_user, tech_pvt_calling->celliax_user) : 1)
</span><span class="cx">                                 && (CELLIAX_STATE_DOWN == celliax_state || 0 == celliax_state) && (tech_pvt->phone_callflow == CALLFLOW_STATUS_FINISHED
</span><del>-                                                                                                                                                         || 0 == tech_pvt->phone_callflow)) {
</del><ins>+                                                                                                                                                                 || 0 == tech_pvt->phone_callflow)) {
</ins><span class="cx">                                 DEBUGA_CELLIAX("returning as available celliax interface name: %s, state: %d callflow: %d\n", CELLIAX_P_LOG, tech_pvt->name, celliax_state,
</span><del>-                                                         tech_pvt->phone_callflow);
</del><ins>+                                                         tech_pvt->phone_callflow);
</ins><span class="cx">                                 /*set to Dialing state to avoid other thread fint it, don't know if it is safe */
</span><span class="cx">                                 //XXX no, it's not safe
</span><span class="cx">                                 if (tech_pvt_calling == NULL) {
</span><span class="lines">@@ -2013,7 +2013,8 @@
</span><span class="cx">                                 found = 1;
</span><span class="cx">                                 DEBUGA_CELLIAX
</span><span class="cx">                                         ("FOUND (name=%s, giovatech->interface_state=%d != CELLIAX_STATE_DOWN) && (giovatech->celliax_user=%s == tech_pvt->celliax_user=%s) && (giovatech->callid_number=%s == value=%s)\n",
</span><del>-                                         CELLIAX_P_LOG, giovatech->name, giovatech->interface_state, giovatech->celliax_user, tech_pvt->celliax_user, giovatech->callid_number, value)
</del><ins>+                                         CELLIAX_P_LOG, giovatech->name, giovatech->interface_state, giovatech->celliax_user, tech_pvt->celliax_user, giovatech->callid_number,
+                                         value)
</ins><span class="cx">                                         break;
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="lines">@@ -2137,7 +2138,7 @@
</span><span class="cx">
</span><span class="cx">                         } else if (tech_pvt->controldevprotocol != PROTOCOL_NO_SERIAL && tech_pvt->interface_state == CELLIAX_STATE_DIALING) {
</span><span class="cx">                                 WARNINGA("WE'RE DIALING, let's take the earlymedia\n", CELLIAX_P_LOG);
</span><del>-tech_pvt->interface_state = CALLFLOW_STATUS_EARLYMEDIA;
</del><ins>+                                tech_pvt->interface_state = CALLFLOW_STATUS_EARLYMEDIA;
</ins><span class="cx">                                 remote_party_is_early_media(tech_pvt);
</span><span class="cx">                                 //new_inbound_channel(tech_pvt);
</span><span class="cx">                                 //FIXME if (!celliax_new(p, AST_STATE_RING, tech_pvt->context)) {
</span></span></pre>
</div>
</div>
<div id="footer">See you at ClueCon</div>
</body>
</html>