projects
/
lcr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
some fixes, check README
[lcr.git]
/
mISDN.cpp
diff --git
a/mISDN.cpp
b/mISDN.cpp
index
5129519
..
3c4c23d
100644
(file)
--- a/
mISDN.cpp
+++ b/
mISDN.cpp
@@
-1382,7
+1382,9
@@
int PmISDN::handler(void)
p_m_load = 0;
/* to send data, tone must be active OR crypt messages must be on */
p_m_load = 0;
/* to send data, tone must be active OR crypt messages must be on */
- if ((p_tone_name[0] || p_m_crypt_msg_loops) && p_m_load < ISDN_LOAD)
+ if ((p_tone_name[0] || p_m_crypt_msg_loops)
+ && (p_m_load < ISDN_LOAD)
+ && (p_state==PORT_STATE_CONNECT || p_m_mISDNport->tones))
{
int tosend = ISDN_LOAD - p_m_load, length;
#ifdef SOCKET_MISDN
{
int tosend = ISDN_LOAD - p_m_load, length;
#ifdef SOCKET_MISDN
@@
-1415,6
+1417,7
@@
int PmISDN::handler(void)
/* next loop */
p_m_crypt_msg_current = 0;
p_m_crypt_msg_loops--;
/* next loop */
p_m_crypt_msg_current = 0;
p_m_crypt_msg_loops--;
+// puts("eine loop weniger");
}
/* new length */
}
/* new length */
@@
-1914,7
+1917,7
@@
void PmISDN::message_crypt(unsigned long epoint_id, int message_id, union parame
break;
}
p_m_crypt_msg_current = 0; /* reset */
break;
}
p_m_crypt_msg_current = 0; /* reset */
- p_m_crypt_msg_loops =
3
; /* enable */
+ p_m_crypt_msg_loops =
6
; /* enable */
#if 0
/* disable txmix, or we get corrupt data due to audio process */
if (p_m_txmix && p_m_b_index>=0)
#if 0
/* disable txmix, or we get corrupt data due to audio process */
if (p_m_txmix && p_m_b_index>=0)
@@
-1970,7
+1973,7
@@
int PmISDN::message_epoint(unsigned long epoint_id, int message_id, union parame
#ifdef SOCKET_MISDN
int mISDN_handler(void)
{
#ifdef SOCKET_MISDN
int mISDN_handler(void)
{
- int ret;
+ int ret
, work = 0
;
struct mISDNport *mISDNport;
class PmISDN *isdnport;
int i;
struct mISDNport *mISDNport;
class PmISDN *isdnport;
int i;
@@
-2049,6
+2052,7
@@
int mISDN_handler(void)
ret = recv(mISDNport->b_stack[i], buffer, sizeof(buffer), 0);
if (ret >= MISDN_HEADER_LEN)
{
ret = recv(mISDNport->b_stack[i], buffer, sizeof(buffer), 0);
if (ret >= MISDN_HEADER_LEN)
{
+ work = 1;
switch(hh->prim)
{
/* we don't care about confirms, we use rx data to sync tx */
switch(hh->prim)
{
/* we don't care about confirms, we use rx data to sync tx */
@@
-2059,6
+2063,7
@@
int mISDN_handler(void)
/* we receive audio data, we respond to it AND we send tones */
case PH_DATA_IND:
case DL_DATA_IND:
/* we receive audio data, we respond to it AND we send tones */
case PH_DATA_IND:
case DL_DATA_IND:
+ case PH_SIGNAL_IND:
case PH_CONTROL_IND:
if (mISDNport->b_port[i])
mISDNport->b_port[i]->bchannel_receive(hh, buffer+MISDN_HEADER_LEN, ret-MISDN_HEADER_LEN);
case PH_CONTROL_IND:
if (mISDNport->b_port[i])
mISDNport->b_port[i]->bchannel_receive(hh, buffer+MISDN_HEADER_LEN, ret-MISDN_HEADER_LEN);
@@
-2119,6
+2124,8
@@
int mISDN_handler(void)
mISDNport = mISDNport->next;
}
mISDNport = mISDNport->next;
}
+ /* if we received at least one b-frame, we will return 1 */
+ return(work);
}
#else
int mISDN_handler(void)
}
#else
int mISDN_handler(void)