mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-04 17:51:03 +00:00
gsmopen: indented
This commit is contained in:
parent
8a1508d669
commit
44fd0de8ff
@ -420,7 +420,7 @@ int gsmopen_serial_config_AT(private_t *tech_pvt)
|
|||||||
WARNINGA("AT+CSMP do not got OK from the phone, continuing\n", GSMOPEN_P_LOG);
|
WARNINGA("AT+CSMP do not got OK from the phone, continuing\n", GSMOPEN_P_LOG);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif// NOTDEF //GSMLIB? XXX
|
#endif // NOTDEF //GSMLIB? XXX
|
||||||
|
|
||||||
#ifdef NOTDEF //GSMLIB? XXX
|
#ifdef NOTDEF //GSMLIB? XXX
|
||||||
|
|
||||||
@ -2737,7 +2737,7 @@ int gsmopen_sendsms(private_t *tech_pvt, char *dest, char *text)
|
|||||||
|
|
||||||
if (tech_pvt->no_ucs2 || tech_pvt->sms_pdu_not_supported == 0) {
|
if (tech_pvt->no_ucs2 || tech_pvt->sms_pdu_not_supported == 0) {
|
||||||
try {
|
try {
|
||||||
int bad_8859=0;
|
int bad_8859 = 0;
|
||||||
|
|
||||||
memset(mesg_test, '\0', sizeof(mesg_test));
|
memset(mesg_test, '\0', sizeof(mesg_test));
|
||||||
sprintf(mesg_test, ":) ciao belè новости לק ראת ﺎﻠﺠﻤﻋﺓ 人大aèéàòçù"); //let's test the beauty of utf8
|
sprintf(mesg_test, ":) ciao belè новости לק ראת ﺎﻠﺠﻤﻋﺓ 人大aèéàòçù"); //let's test the beauty of utf8
|
||||||
@ -2745,7 +2745,7 @@ int bad_8859=0;
|
|||||||
//text=mesg_test;
|
//text=mesg_test;
|
||||||
|
|
||||||
bad_8859 = utf8_to_iso_8859_1(tech_pvt, text, strlen(text), smscommand, sizeof(smscommand));
|
bad_8859 = utf8_to_iso_8859_1(tech_pvt, text, strlen(text), smscommand, sizeof(smscommand));
|
||||||
if(!bad_8859){
|
if (!bad_8859) {
|
||||||
err = gsmopen_serial_write_AT_ack(tech_pvt, "AT+CMGF=0");
|
err = gsmopen_serial_write_AT_ack(tech_pvt, "AT+CMGF=0");
|
||||||
if (err) {
|
if (err) {
|
||||||
ERRORA("AT+CMGF=0 (set message sending to PDU (as opposed to TEXT) do not got OK from the phone\n", GSMOPEN_P_LOG);
|
ERRORA("AT+CMGF=0 (set message sending to PDU (as opposed to TEXT) do not got OK from the phone\n", GSMOPEN_P_LOG);
|
||||||
@ -2765,10 +2765,10 @@ int bad_8859=0;
|
|||||||
POPPA_UNLOCKA(&tech_pvt->controldev_lock);
|
POPPA_UNLOCKA(&tech_pvt->controldev_lock);
|
||||||
|
|
||||||
tech_pvt->no_ucs2 = 0;
|
tech_pvt->no_ucs2 = 0;
|
||||||
tech_pvt->sms_pdu_not_supported =1;
|
tech_pvt->sms_pdu_not_supported = 1;
|
||||||
ok= gsmopen_sendsms(tech_pvt, dest, text);
|
ok = gsmopen_sendsms(tech_pvt, dest, text);
|
||||||
tech_pvt->no_ucs2 = 1;
|
tech_pvt->no_ucs2 = 1;
|
||||||
tech_pvt->sms_pdu_not_supported =0;
|
tech_pvt->sms_pdu_not_supported = 0;
|
||||||
|
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
@ -2834,7 +2834,7 @@ int bad_8859=0;
|
|||||||
if (tech_pvt->no_ucs2 || tech_pvt->sms_pdu_not_supported == 0) {
|
if (tech_pvt->no_ucs2 || tech_pvt->sms_pdu_not_supported == 0) {
|
||||||
memset(smscommand, '\0', sizeof(smscommand));
|
memset(smscommand, '\0', sizeof(smscommand));
|
||||||
sprintf(smscommand, "%s", pdu2);
|
sprintf(smscommand, "%s", pdu2);
|
||||||
}else{
|
} else {
|
||||||
memset(mesg_test, '\0', sizeof(mesg_test));
|
memset(mesg_test, '\0', sizeof(mesg_test));
|
||||||
sprintf(mesg_test, ":) ciao belè новости לק ראת ﺎﻠﺠﻤﻋﺓ 人大aèéàòçù"); //let's test the beauty of utf8
|
sprintf(mesg_test, ":) ciao belè новости לק ראת ﺎﻠﺠﻤﻋﺓ 人大aèéàòçù"); //let's test the beauty of utf8
|
||||||
//text=mesg_test;
|
//text=mesg_test;
|
||||||
@ -2873,7 +2873,7 @@ int bad_8859=0;
|
|||||||
ERRORA("Error de-activating echo from modem\n", GSMOPEN_P_LOG);
|
ERRORA("Error de-activating echo from modem\n", GSMOPEN_P_LOG);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
uscita:
|
uscita:
|
||||||
gsmopen_sleep(1000);
|
gsmopen_sleep(1000);
|
||||||
|
|
||||||
if (tech_pvt->at_cmgw[0]) {
|
if (tech_pvt->at_cmgw[0]) {
|
||||||
@ -3040,9 +3040,9 @@ int gsmopen_serial_getstatus_AT(private_t *tech_pvt)
|
|||||||
if (res) {
|
if (res) {
|
||||||
ERRORA("AT+CMGR (read SMS) do not got OK from the phone, message sent was:|||%s|||\n", GSMOPEN_P_LOG, at_command);
|
ERRORA("AT+CMGR (read SMS) do not got OK from the phone, message sent was:|||%s|||\n", GSMOPEN_P_LOG, at_command);
|
||||||
}
|
}
|
||||||
res = gsmopen_serial_write_AT_ack(p, "AT+CSCS=\"CIAPALO2\"");
|
res = gsmopen_serial_write_AT_ack(p, "AT+CSCS=\"GSM\"");
|
||||||
if (res) {
|
if (res) {
|
||||||
ERRORA("AT+CSCS=\"CIAPALO2\" (set TE messages to GSM) do not got OK from the phone\n", GSMOPEN_P_LOG);
|
ERRORA("AT+CSCS=\"GSM\" (set TE messages to GSM) do not got OK from the phone\n", GSMOPEN_P_LOG);
|
||||||
}
|
}
|
||||||
memset(at_command, 0, sizeof(at_command));
|
memset(at_command, 0, sizeof(at_command));
|
||||||
sprintf(at_command, "AT+CMGD=%d", p->unread_sms_msg_id); /* delete the message */
|
sprintf(at_command, "AT+CMGD=%d", p->unread_sms_msg_id); /* delete the message */
|
||||||
|
@ -3073,7 +3073,7 @@ int sms_incoming(private_t *tech_pvt)
|
|||||||
//switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "to_host", "to_host");
|
//switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "to_host", "to_host");
|
||||||
switch_event_add_body(event, "%s\n", tech_pvt->sms_body);
|
switch_event_add_body(event, "%s\n", tech_pvt->sms_body);
|
||||||
//switch_core_chat_send("GLOBAL", event); /* mod_sms */
|
//switch_core_chat_send("GLOBAL", event); /* mod_sms */
|
||||||
switch_core_chat_send("GLOBAL", event); /* mod_sms */
|
switch_core_chat_send("GLOBAL", event); /* mod_sms */
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
ERRORA("cannot create event on interface %s. WHY?????\n", GSMOPEN_P_LOG, tech_pvt->name);
|
ERRORA("cannot create event on interface %s. WHY?????\n", GSMOPEN_P_LOG, tech_pvt->name);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user