]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
gsmopen: indented
authorGiovanni Maruzzelli <gmaruzz@gmail.com>
Sun, 13 May 2012 23:59:33 +0000 (01:59 +0200)
committerGiovanni Maruzzelli <gmaruzz@gmail.com>
Mon, 14 May 2012 00:04:36 +0000 (02:04 +0200)
src/mod/endpoints/mod_gsmopen/gsmopen_protocol.cpp
src/mod/endpoints/mod_gsmopen/mod_gsmopen.cpp

index 5e5cadd9b64ef895e2fa3a5e9d4e471a12e24343..391dade93a0da72e347ce3872773e819cf6461ec 100644 (file)
@@ -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);
                }
        }
-#endif// NOTDEF                                        //GSMLIB? XXX
+#endif // 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) {
                        try {
-int bad_8859=0;
+                               int bad_8859 = 0;
 
                                memset(mesg_test, '\0', sizeof(mesg_test));
                                sprintf(mesg_test, ":) ciao belè новости לק ראת ﺎﻠﺠﻤﻋﺓ 人大aèéàòçù");  //let's test the beauty of utf8
@@ -2745,7 +2745,7 @@ int bad_8859=0;
                                //text=mesg_test;
 
                                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");
                                        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);
@@ -2765,10 +2765,10 @@ int bad_8859=0;
                                        POPPA_UNLOCKA(&tech_pvt->controldev_lock);
 
                                        tech_pvt->no_ucs2 = 0;
-                                       tech_pvt->sms_pdu_not_supported =1;
-                                       ok= gsmopen_sendsms(tech_pvt, dest, text);
+                                       tech_pvt->sms_pdu_not_supported = 1;
+                                       ok = gsmopen_sendsms(tech_pvt, dest, text);
                                        tech_pvt->no_ucs2 = 1;
-                                       tech_pvt->sms_pdu_not_supported =0;
+                                       tech_pvt->sms_pdu_not_supported = 0;
 
                                        return ok;
                                }
@@ -2834,7 +2834,7 @@ int bad_8859=0;
                if (tech_pvt->no_ucs2 || tech_pvt->sms_pdu_not_supported == 0) {
                        memset(smscommand, '\0', sizeof(smscommand));
                        sprintf(smscommand, "%s", pdu2);
-               }else{
+               } else {
                        memset(mesg_test, '\0', sizeof(mesg_test));
                        sprintf(mesg_test, ":) ciao belè новости לק ראת ﺎﻠﺠﻤﻋﺓ 人大aèéàòçù");  //let's test the beauty of utf8
                        //text=mesg_test;
@@ -2873,7 +2873,7 @@ int bad_8859=0;
                                ERRORA("Error de-activating echo from modem\n", GSMOPEN_P_LOG);
                        }
                }
-uscita:
+         uscita:
                gsmopen_sleep(1000);
 
                if (tech_pvt->at_cmgw[0]) {
@@ -3040,9 +3040,9 @@ int gsmopen_serial_getstatus_AT(private_t *tech_pvt)
                                if (res) {
                                        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) {
-                                       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));
                                sprintf(at_command, "AT+CMGD=%d", p->unread_sms_msg_id);        /* delete the message */
index d1443afc50a549af62688f6897888f480822803e..f48d299e0a3585f7953b7099aba8d30c1ede868d 100644 (file)
@@ -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_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 */
        } else {
 
                ERRORA("cannot create event on interface %s. WHY?????\n", GSMOPEN_P_LOG, tech_pvt->name);