* \brief This thread runs during a call, and monitor the interface for signaling, like hangup, caller id, etc most of signaling is handled inside the skypopen_signaling_read function
@@ -2518,7 +2524,10 @@ int skypopen_partner_handle_ring(private_t * tech_pvt)
giovatech=&globals.SKYPOPEN_INTERFACES[i];
if((giovatech->interface_state!=SKYPOPEN_STATE_DOWN)&&(!strcmp(giovatech->skype_user,tech_pvt->skype_user))&&(!strcmp(giovatech->ring_value,value))&&((((timenow.tv_sec-giovatech->ring_time.tv_sec)*1000000)+(timenow.tv_usec-giovatech->ring_time.tv_usec))<1000000)){//XXX 1.0sec - can have a max of 1 call coming from the same skypename to the same skypename each 1.0 seconds
@@ -2593,7 +2602,7 @@ int skypopen_partner_handle_ring(private_t * tech_pvt)
return0;
}
intskypopen_answer(private_t*tech_pvt)
intskypopen_answer(private_t*tech_pvt)
{
charmsg_to_skype[1024];
inti;
...
...
@@ -2616,7 +2625,10 @@ int skypopen_answer(private_t * tech_pvt)
giovatech=&globals.SKYPOPEN_INTERFACES[i];
if(strlen(giovatech->skype_call_id)&&(giovatech->interface_state!=SKYPOPEN_STATE_DOWN)&&(!strcmp(giovatech->skype_user,tech_pvt->skype_user))&&(!strcmp(giovatech->callid_number,value))&&((((timenow.tv_sec-giovatech->answer_time.tv_sec)*1000000)+(timenow.tv_usec-giovatech->answer_time.tv_usec))<1000000)){//XXX 1.0sec - can have a max of 1 call coming from the same skypename to the same skypename each 1.0 seconds
@@ -2712,15 +2725,16 @@ int skypopen_transfer(private_t * tech_pvt)
/* let's look for a RINGING one */
if((giovatech->interface_state!=SKYPOPEN_STATE_DOWN)&&(!strcmp(giovatech->skype_user,tech_pvt->skype_user))&&(!strcmp(giovatech->ring_value,value))&&((((timenow.tv_sec-giovatech->ring_time.tv_sec)*1000000)+(timenow.tv_usec-giovatech->ring_time.tv_usec))<1000000)){//XXX 1.0sec - can have a max of 1 call coming from the same skypename to the same skypename each 1.0 seconds
else if (tech_pvt->interface_state != 0 && tech_pvt->interface_state != SKYPOPEN_STATE_DOWN) {
WARNINGA("Why an interface_state %d HERE?\n", SKYPOPEN_P_LOG, tech_pvt->interface_state);
tech_pvt->interface_state = SKYPOPEN_STATE_DOWN;
...
...
@@ -2762,15 +2776,16 @@ int skypopen_transfer(private_t * tech_pvt)
/* let's look for a DOWN one */
if((giovatech->interface_state==SKYPOPEN_STATE_DOWN||giovatech->interface_state==0)&&(!strcmp(giovatech->skype_user,tech_pvt->skype_user))){//XXX 1.0sec - can have a max of 1 call coming from the same skypename to the same skypename each 1.0 seconds
("A begin atom while the previous message is not closed???? value of previous message (between vertical bars) is=|||%s|||, will be lost\n",
SKYPOPEN_P_LOG,buffer);
memset(buffer,'\0',17000);
}
if(continue_is_broken){
continue_is_broken=0;
there_were_continues=1;
}
}
if(an_event.xclient.message_type==atom_continue){
if(!strlen(buffer)){
WARNINGA
("Got a 'continue' XAtom without a previous 'begin'. It's value (between vertical bars) is=|||%s|||, let's store it and hope next 'begin' will be the good one\n",
SKYPOPEN_P_LOG,buf);
strcat(continuebuffer,buf);
continue_is_broken=1;
if(!strncmp(buf,"ognised identity",15)){
WARNINGA
("Got a 'continue' XAtom without a previous 'begin'. It's value (between vertical bars) is=|||%s|||. Let's introduce a 1 second delay.\n",
("A begin atom while the previous message is not closed???? value of previous message (between vertical bars) is=|||%s|||, will be lost\n",
SKYPOPEN_P_LOG,buffer);
memset(buffer,'\0',17000);
}
if(continue_is_broken){
continue_is_broken=0;
there_were_continues=1;
}
}
if(an_event.xclient.message_type==atom_continue){
if(!strlen(buffer)){
WARNINGA
("Got a 'continue' XAtom without a previous 'begin'. It's value (between vertical bars) is=|||%s|||, let's store it and hope next 'begin' will be the good one\n",
SKYPOPEN_P_LOG,buf);
strcat(continuebuffer,buf);
continue_is_broken=1;
if(!strncmp(buf,"ognised identity",15)){
WARNINGA
("Got a 'continue' XAtom without a previous 'begin'. It's value (between vertical bars) is=|||%s|||. Let's introduce a 1 second delay.\n",
SKYPOPEN_P_LOG,buf);
skypopen_sleep(1000000);//1 sec
}
skypopen_sleep(1000);//0.1 msec
break;
}
}
if(continue_is_broken){
XFlush(disp);
skypopen_sleep(1000);//0.1 msec
continue;
}
strcat(buffer,buf);
strcat(buffer,continuebuffer);
memset(continuebuffer,'\0',17000);
if(i<20||there_were_continues){/* last fragment */