mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-09 11:28:25 +00:00
Revert 355700 and 355701
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@355711 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1104,12 +1104,14 @@ struct H245AudioCapability* ooCapabilityCreateNonStandardCapability
|
||||
(ooH323EpCapability *epCap, OOCTXT* pctxt, int dir)
|
||||
{
|
||||
H245AudioCapability *pAudio=NULL;
|
||||
OOCapParams *params;
|
||||
if(!epCap || !epCap->params)
|
||||
{
|
||||
OOTRACEERR1("Error:Invalid capability parameters to "
|
||||
"ooCapabilityCreateSimpleCapability.\n");
|
||||
return NULL;
|
||||
}
|
||||
params =(OOCapParams*)epCap->params;
|
||||
pAudio = (H245AudioCapability*)memAlloc(pctxt,
|
||||
sizeof(H245AudioCapability));
|
||||
if(!pAudio)
|
||||
@@ -1226,6 +1228,7 @@ struct H245DataApplicationCapability* ooCapabilityCreateT38Capability
|
||||
(ooH323EpCapability *epCap, OOCTXT* pctxt, int dir)
|
||||
{
|
||||
H245DataApplicationCapability *pT38=NULL;
|
||||
OOCapParams *params;
|
||||
H245DataMode_application *pT38app;
|
||||
if(!epCap || !epCap->params)
|
||||
{
|
||||
@@ -1233,6 +1236,7 @@ struct H245DataApplicationCapability* ooCapabilityCreateT38Capability
|
||||
"ooCapabilityCreateSimpleCapability.\n");
|
||||
return NULL;
|
||||
}
|
||||
params =(OOCapParams*)epCap->params;
|
||||
pT38 = (H245DataApplicationCapability*)memAlloc(pctxt,
|
||||
sizeof(H245DataApplicationCapability));
|
||||
if(!pT38)
|
||||
|
||||
@@ -234,6 +234,7 @@ int ooSocketCreate (OOSOCKET* psocket)
|
||||
int ooSocketCreateUDP (OOSOCKET* psocket)
|
||||
{
|
||||
int on;
|
||||
struct linger linger;
|
||||
|
||||
OOSOCKET sock = socket (AF_INET,
|
||||
SOCK_DGRAM,
|
||||
@@ -251,6 +252,8 @@ int ooSocketCreateUDP (OOSOCKET* psocket)
|
||||
OOTRACEERR1("Error:Failed to set socket option SO_REUSEADDR\n");
|
||||
return ASN_E_INVSOCKET;
|
||||
}
|
||||
linger.l_onoff = 1;
|
||||
linger.l_linger = 0;
|
||||
/*if (setsockopt (sock, SOL_SOCKET, SO_LINGER,
|
||||
(const char* ) &linger, sizeof (linger)) == -1)
|
||||
return ASN_E_INVSOCKET;
|
||||
|
||||
@@ -101,6 +101,7 @@ OOBOOL ooTimerExpired (OOTimer* pTimer)
|
||||
void ooTimerFireExpired (OOCTXT* pctxt, DList *pList)
|
||||
{
|
||||
OOTimer* pTimer;
|
||||
int stat;
|
||||
|
||||
while (pList->count > 0) {
|
||||
pTimer = (OOTimer*) pList->head->data;
|
||||
@@ -112,6 +113,8 @@ void ooTimerFireExpired (OOCTXT* pctxt, DList *pList)
|
||||
*/
|
||||
if (pTimer->reRegister) ooTimerReset (pctxt, pList, pTimer);
|
||||
|
||||
stat = (*pTimer->timeoutCB)(pTimer->cbData);
|
||||
|
||||
if (!pTimer->reRegister) {
|
||||
ooTimerDelete (pctxt, pList, pTimer);
|
||||
}
|
||||
|
||||
@@ -2183,7 +2183,7 @@ int ooH323HandleCallFwdRequest(OOH323CallData *call)
|
||||
ooAliases *pNewAlias=NULL, *alias=NULL;
|
||||
struct timespec ts;
|
||||
struct timeval tv;
|
||||
int i=0, irand=0;
|
||||
int i=0, irand=0, ret = OO_OK;
|
||||
/* Note: We keep same callToken, for new call which is going
|
||||
to replace an existing call, thus treating it as a single call.*/
|
||||
|
||||
@@ -2235,7 +2235,7 @@ int ooH323HandleCallFwdRequest(OOH323CallData *call)
|
||||
{
|
||||
/* No need to check registration status here as it is already checked for
|
||||
MakeCall command */
|
||||
ooGkClientSendAdmissionRequest(gH323ep.gkClient, fwdedCall, FALSE);
|
||||
ret = ooGkClientSendAdmissionRequest(gH323ep.gkClient, fwdedCall, FALSE);
|
||||
fwdedCall->callState = OO_CALL_WAITING_ADMISSION;
|
||||
ast_mutex_lock(&fwdedCall->Lock);
|
||||
tv = ast_tvnow();
|
||||
@@ -2249,7 +2249,7 @@ int ooH323HandleCallFwdRequest(OOH323CallData *call)
|
||||
}
|
||||
if (fwdedCall->callState < OO_CALL_CLEAR) {
|
||||
ast_mutex_lock(&fwdedCall->Lock);
|
||||
ooH323CallAdmitted (fwdedCall);
|
||||
ret = ooH323CallAdmitted (fwdedCall);
|
||||
ast_mutex_unlock(&fwdedCall->Lock);
|
||||
}
|
||||
|
||||
@@ -2276,6 +2276,7 @@ int ooH323NewCall(char *callToken) {
|
||||
|
||||
int ooH323MakeCall(char *dest, char *callToken, ooCallOptions *opts)
|
||||
{
|
||||
OOCTXT *pctxt;
|
||||
OOH323CallData *call;
|
||||
int ret=OO_OK, i=0, irand=0;
|
||||
char tmp[30]="\0";
|
||||
@@ -2302,6 +2303,7 @@ int ooH323MakeCall(char *dest, char *callToken, ooCallOptions *opts)
|
||||
return OO_FAILED;
|
||||
}
|
||||
|
||||
pctxt = call->pctxt;
|
||||
if(opts)
|
||||
{
|
||||
if(opts->fastStart)
|
||||
|
||||
@@ -168,7 +168,7 @@ Asn1SizeCnst* getSizeConstraint (OOCTXT* pctxt, ASN1BOOL extbit)
|
||||
int checkSizeConstraint(OOCTXT* pctxt, int size)
|
||||
{
|
||||
Asn1SizeCnst* pSize;
|
||||
ASN1UINT upper;
|
||||
ASN1UINT lower, upper;
|
||||
ASN1BOOL extbit;
|
||||
int stat;
|
||||
|
||||
@@ -186,6 +186,7 @@ int checkSizeConstraint(OOCTXT* pctxt, int size)
|
||||
|
||||
pSize = getSizeConstraint (pctxt, extbit);
|
||||
|
||||
lower = (pSize) ? pSize->lower : 0;
|
||||
upper = (pSize) ? pSize->upper : ASN1UINT_MAX;
|
||||
|
||||
if (upper < (ASN1UINT)size) {
|
||||
|
||||
@@ -82,6 +82,7 @@ void* ooh323c_call_thread(void* dummy)
|
||||
struct callthread* mycthread = (struct callthread *)dummy;
|
||||
struct pollfd pfds[1];
|
||||
char c;
|
||||
int res;
|
||||
|
||||
do {
|
||||
|
||||
@@ -100,7 +101,7 @@ void* ooh323c_call_thread(void* dummy)
|
||||
pfds[0].events = POLLIN;
|
||||
ooSocketPoll(pfds, 1, SEC_TO_HOLD_THREAD * 1000);
|
||||
if (ooPDRead(pfds, 1, mycthread->thePipe[0]))
|
||||
read(mycthread->thePipe[0], &c, 1);
|
||||
res = read(mycthread->thePipe[0], &c, 1);
|
||||
|
||||
ast_mutex_lock(&callThreadsLock);
|
||||
ast_mutex_lock(&mycthread->lock);
|
||||
@@ -128,6 +129,7 @@ void* ooh323c_call_thread(void* dummy)
|
||||
|
||||
int ooh323c_start_call_thread(ooCallData *call) {
|
||||
char c = 'c';
|
||||
int res;
|
||||
struct callthread *cur = callThreads;
|
||||
|
||||
ast_mutex_lock(&callThreadsLock);
|
||||
@@ -180,7 +182,7 @@ int ooh323c_start_call_thread(ooCallData *call) {
|
||||
ast_debug(1,"using existing call thread for call %s\n", call->callToken);
|
||||
cur->inUse = TRUE;
|
||||
cur->call = call;
|
||||
write(cur->thePipe[1], &c, 1);
|
||||
res = write(cur->thePipe[1], &c, 1);
|
||||
ast_mutex_unlock(&cur->lock);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user