timeout.tv_sec=timeout_sec;//reset the timeout, linux modify it
timeout.tv_sec=timeout_sec;//reset the timeout, linux modify it
timeout.tv_usec=timeout_usec;//reset the timeout, linux modify it
timeout.tv_usec=timeout_usec;//reset the timeout, linux modify it
...
@@ -658,7 +658,8 @@ int gsmopen_serial_read_AT(private_t *tech_pvt, int look_for_ack, int timeout_us
...
@@ -658,7 +658,8 @@ int gsmopen_serial_read_AT(private_t *tech_pvt, int look_for_ack, int timeout_us
la_counter++;
la_counter++;
if(la_counter==AT_MESG_MAX_LINES){
if(la_counter==AT_MESG_MAX_LINES){
ERRORA("Too many lines in result (>%d). la_counter=%d. tech_pvt->reading_sms_msg=%d. Stop accumulating lines.\n",GSMOPEN_P_LOG,AT_MESG_MAX_LINES,la_counter,tech_pvt->reading_sms_msg);
ERRORA("Too many lines in result (>%d). la_counter=%d. tech_pvt->reading_sms_msg=%d. Stop accumulating lines.\n",GSMOPEN_P_LOG,
// match expected string -> accept it withtout CRLF
// match expected string -> accept it withtout CRLF
la_counter++;
la_counter++;
if(la_counter==AT_MESG_MAX_LINES){
if(la_counter==AT_MESG_MAX_LINES){
ERRORA("Too many lines in result (>%d). la_counter=%d. tech_pvt->reading_sms_msg=%d. Stop accumulating lines.\n",GSMOPEN_P_LOG,AT_MESG_MAX_LINES,la_counter,tech_pvt->reading_sms_msg);
ERRORA("Too many lines in result (>%d). la_counter=%d. tech_pvt->reading_sms_msg=%d. Stop accumulating lines.\n",GSMOPEN_P_LOG,
WARNINGA("read was %d bytes, tmp_answer3= --|%s|--\n",GSMOPEN_P_LOG,read_count,tmp_answer3);
WARNINGA("read was %d bytes, tmp_answer3= --|%s|--\n",GSMOPEN_P_LOG,read_count,tmp_answer3);
at_ack=AT_ERROR;
at_ack=AT_ERROR;
break;
break;
...
@@ -692,12 +694,13 @@ int gsmopen_serial_read_AT(private_t *tech_pvt, int look_for_ack, int timeout_us
...
@@ -692,12 +694,13 @@ int gsmopen_serial_read_AT(private_t *tech_pvt, int look_for_ack, int timeout_us
la_counter--;
la_counter--;
/* let's list the complete lines read so far, without re-listing the lines that has yet been listed */
/* let's list the complete lines read so far, without re-listing the lines that has yet been listed */
for(i=la_read;i<la_counter;i++){
for(i=la_read;i<la_counter;i++){
DEBUGA_GSMOPEN("Read line %d: |%s| la_counter=%d\n",GSMOPEN_P_LOG,i,tech_pvt->line_array.result[i],la_counter);
DEBUGA_GSMOPEN("Read line %d: |%s| la_counter=%d\n",GSMOPEN_P_LOG,i,tech_pvt->line_array.result[i],la_counter);
}
}
if(la_counter==AT_MESG_MAX_LINES){
if(la_counter==AT_MESG_MAX_LINES){
ERRORA("Too many lines in result (>%d). la_counter=%d. tech_pvt->reading_sms_msg=%d. Stop accumulating lines.\n",GSMOPEN_P_LOG,AT_MESG_MAX_LINES,la_counter,tech_pvt->reading_sms_msg);
ERRORA("Too many lines in result (>%d). la_counter=%d. tech_pvt->reading_sms_msg=%d. Stop accumulating lines.\n",GSMOPEN_P_LOG,
@@ -1730,7 +1732,8 @@ int gsmopen_serial_read_AT(private_t *tech_pvt, int look_for_ack, int timeout_us
...
@@ -1730,7 +1732,8 @@ int gsmopen_serial_read_AT(private_t *tech_pvt, int look_for_ack, int timeout_us
break;
break;
if(la_counter==AT_MESG_MAX_LINES){
if(la_counter==AT_MESG_MAX_LINES){
ERRORA("Too many lines in result (>%d). la_counter=%d. tech_pvt->reading_sms_msg=%d. Stop accumulating lines.\n",GSMOPEN_P_LOG,AT_MESG_MAX_LINES,la_counter,tech_pvt->reading_sms_msg);
ERRORA("Too many lines in result (>%d). la_counter=%d. tech_pvt->reading_sms_msg=%d. Stop accumulating lines.\n",GSMOPEN_P_LOG,