Modified: freeswitch/branches/gmaruzz/mod_celliax/celliax_protocol.c (14722 => 14723)
--- 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)
@@ -577,7 +577,7 @@
}
} else {
DEBUGA_CELLIAX("|%s| got first RING, but not sending AT+CLCC? as this device "
- "seems not to support\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
+ "seems not to support\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
}
}
tech_pvt->phone_callflow = CALLFLOW_INCOMING_RING;
@@ -613,9 +613,9 @@
tech_pvt->phone_callflow = CALLFLOW_INCOMING_RING;
DEBUGA_CELLIAX("|%s| CLCC CALLID: name is %s, number is %s\n", CELLIAX_P_LOG,
- 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");
+ 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");
}
if ((strncmp(tech_pvt->line_array.result[i], "+CLIP", 5) == 0)) {
@@ -655,24 +655,22 @@
tech_pvt->interface_state = CELLIAX_STATE_RING;
tech_pvt->phone_callflow = CALLFLOW_INCOMING_RING;
DEBUGA_CELLIAX("|%s| CLIP INCOMING CALLID: name is %s, number is %s\n", CELLIAX_P_LOG,
- 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");
+ 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");
- if(!strlen(tech_pvt->callid_number)){
- strcpy(tech_pvt->callid_number, "not available") ;
+ if (!strlen(tech_pvt->callid_number)) {
+ strcpy(tech_pvt->callid_number, "not available");
}
- 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)) ;
+ 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));
//strncpy(tech_pvt->callid_name, tech_pvt->callid_number, sizeof(tech_pvt->callid_name)) ;
snprintf(tech_pvt->callid_name, sizeof(tech_pvt->callid_name), "Celliax: %s", tech_pvt->callid_number);
}
DEBUGA_CELLIAX("|%s| CLIP INCOMING CALLID: NOW name is %s, number is %s\n", CELLIAX_P_LOG,
- tech_pvt->line_array.result[i],
- tech_pvt->callid_name,
- tech_pvt->callid_number);
+ tech_pvt->line_array.result[i], tech_pvt->callid_name, tech_pvt->callid_number);
}
if ((strcmp(tech_pvt->line_array.result[i], "BUSY") == 0)) {
@@ -722,7 +720,7 @@
err = sscanf(&tech_pvt->line_array.result[i][5], "%d,%d", &power_supply, &battery_strenght);
DEBUGA_CELLIAX("|%s| +CBC: Powered by %s, battery strenght=%d\n", CELLIAX_P_LOG,
- tech_pvt->line_array.result[i], power_supply ? "power supply" : "battery", battery_strenght);
+ tech_pvt->line_array.result[i], power_supply ? "power supply" : "battery", battery_strenght);
}
@@ -733,7 +731,7 @@
else {
if (option_debug > 1)
DEBUGA_CELLIAX("|%s| +CBC: Powered by %s, battery strenght=%d\n", CELLIAX_P_LOG,
- tech_pvt->line_array.result[i], power_supply ? "power supply" : "battery", battery_strenght);
+ tech_pvt->line_array.result[i], power_supply ? "power supply" : "battery", battery_strenght);
if (!power_supply) {
if (battery_strenght < 10) {
ERRORA("|%s| BATTERY ALMOST EXHAUSTED\n", CELLIAX_P_LOG, tech_pvt->line_array.result[i]);
@@ -1129,9 +1127,9 @@
DEBUGA_CELLIAX("incoming callid: Text: %s, Number: %s\n", CELLIAX_P_LOG, tech_pvt->callid_name, tech_pvt->callid_number);
DEBUGA_CELLIAX("|%s| CPBR INCOMING CALLID: name is %s, number is %s\n",
- 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");
+ 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");
/* mark the time of RING */
gettimeofday(&(tech_pvt->ringtime), NULL);
@@ -1838,7 +1836,7 @@
iconv_res = iconv(iconv_format, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
if (iconv_res == (size_t) -1) {
DEBUGA_CELLIAX("ciao in=%s, inleft=%d, out=%s, outleft=%d, converted=%s, utf8_out=%s\n",
- CELLIAX_P_LOG, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, converted, utf8_out);
+ CELLIAX_P_LOG, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, converted, utf8_out);
DEBUGA_CELLIAX("error: %s %d\n", CELLIAX_P_LOG, strerror(errno), errno);
return -1;
}
@@ -1875,7 +1873,7 @@
outbytesleft = 16000;
DEBUGA_CELLIAX("in=%s, inleft=%d, out=%s, outleft=%d, utf_in=%s, converted=%s\n",
- CELLIAX_P_LOG, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, utf_in, converted);
+ CELLIAX_P_LOG, inbuf, (int) inbytesleft, outbuf, (int) outbytesleft, utf_in, converted);
iconv_res = iconv(iconv_format, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
if (iconv_res == (size_t) -1) {
ERRORA("error: %s %d\n", CELLIAX_P_LOG, strerror(errno), errno);
Modified: freeswitch/branches/gmaruzz/mod_celliax/mod_celliax.c (14722 => 14723)
--- 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)
@@ -1374,7 +1374,7 @@
("interface_id=%d globals.CELLIAX_INTERFACES[interface_id].tcp_srv_port=%d\n",
CELLIAX_P_LOG, interface_id, globals.CELLIAX_INTERFACES[interface_id].tcp_srv_port);
DEBUGA_CELLIAX("interface_id=%d globals.CELLIAX_INTERFACES[interface_id].name=%s\n",
- CELLIAX_P_LOG, interface_id, globals.CELLIAX_INTERFACES[interface_id].name);
+ CELLIAX_P_LOG, interface_id, globals.CELLIAX_INTERFACES[interface_id].name);
DEBUGA_CELLIAX
("interface_id=%d globals.CELLIAX_INTERFACES[interface_id].context=%s\n",
CELLIAX_P_LOG, interface_id, globals.CELLIAX_INTERFACES[interface_id].context);
@@ -1762,9 +1762,9 @@
//DEBUGA_CELLIAX("celliax interface: %d, name: %s, state: %d\n", CELLIAX_P_LOG, interface_id, globals.CELLIAX_INTERFACES[interface_id].name, celliax_state);
if ((tech_pvt_calling ? strcmp(tech_pvt->celliax_user, tech_pvt_calling->celliax_user) : 1)
&& (CELLIAX_STATE_DOWN == celliax_state || 0 == celliax_state) && (tech_pvt->phone_callflow == CALLFLOW_STATUS_FINISHED
- || 0 == tech_pvt->phone_callflow)) {
+ || 0 == tech_pvt->phone_callflow)) {
DEBUGA_CELLIAX("returning as available celliax interface name: %s, state: %d callflow: %d\n", CELLIAX_P_LOG, tech_pvt->name, celliax_state,
- tech_pvt->phone_callflow);
+ tech_pvt->phone_callflow);
/*set to Dialing state to avoid other thread fint it, don't know if it is safe */
//XXX no, it's not safe
if (tech_pvt_calling == NULL) {
@@ -2013,7 +2013,8 @@
found = 1;
DEBUGA_CELLIAX
("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",
- CELLIAX_P_LOG, giovatech->name, giovatech->interface_state, giovatech->celliax_user, tech_pvt->celliax_user, giovatech->callid_number, value)
+ CELLIAX_P_LOG, giovatech->name, giovatech->interface_state, giovatech->celliax_user, tech_pvt->celliax_user, giovatech->callid_number,
+ value)
break;
}
}
@@ -2137,7 +2138,7 @@
} else if (tech_pvt->controldevprotocol != PROTOCOL_NO_SERIAL && tech_pvt->interface_state == CELLIAX_STATE_DIALING) {
WARNINGA("WE'RE DIALING, let's take the earlymedia\n", CELLIAX_P_LOG);
-tech_pvt->interface_state = CALLFLOW_STATUS_EARLYMEDIA;
+ tech_pvt->interface_state = CALLFLOW_STATUS_EARLYMEDIA;
remote_party_is_early_media(tech_pvt);
//new_inbound_channel(tech_pvt);
//FIXME if (!celliax_new(p, AST_STATE_RING, tech_pvt->context)) {