mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-24 14:56:58 +00:00
generate roundtrip delay requests and responses
added response to roundtrip delay requests from opposite side added roundtrip delay request sending to opposite side after answer, added options for sending request (interval between request and count of unreplied requests before forced call hangup) (closes issue #16976) Reported by: vmikhelson Patches: rtdr-1.6.0-2.patch uploaded by may213 (license 454) Tested by: vmikhelson, may213 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@252277 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -611,6 +611,7 @@ int ooSocketGetInterfaceList(OOCTXT *pctxt, OOInterface **ifList)
|
||||
struct ifconf ifc;
|
||||
int ifNum;
|
||||
OOInterface *pIf=NULL;
|
||||
struct sockaddr_in sin;
|
||||
|
||||
OOTRACEDBGA1("Retrieving local interfaces\n");
|
||||
if(ooSocketCreateUDP(&sock)!= ASN_OK)
|
||||
@@ -686,7 +687,8 @@ int ooSocketGetInterfaceList(OOCTXT *pctxt, OOInterface **ifList)
|
||||
memFreePtr(pctxt, pIf);
|
||||
continue;
|
||||
}
|
||||
strcpy(addr, ast_inet_ntoa(((struct sockaddr_in*)&ifReq.ifr_addr)->sin_addr));
|
||||
memcpy(&sin, &ifReq.ifr_addr, sizeof(struct sockaddr_in));
|
||||
strcpy(addr, ast_inet_ntoa(sin.sin_addr));
|
||||
OOTRACEDBGA2("\tIP address is %s\n", addr);
|
||||
pIf->addr = (char*)memAlloc(pctxt, strlen(addr)+1);
|
||||
if(!pIf->addr)
|
||||
@@ -709,7 +711,8 @@ int ooSocketGetInterfaceList(OOCTXT *pctxt, OOInterface **ifList)
|
||||
memFreePtr(pctxt, pIf);
|
||||
continue;
|
||||
}
|
||||
strcpy(mask, ast_inet_ntoa(((struct sockaddr_in *)&ifReq.ifr_netmask)->sin_addr));
|
||||
memcpy(&sin, &ifReq.ifr_netmask, sizeof(struct sockaddr_in));
|
||||
strcpy(mask, ast_inet_ntoa(sin.sin_addr));
|
||||
OOTRACEDBGA2("\tMask is %s\n", mask);
|
||||
pIf->mask = (char*)memAlloc(pctxt, strlen(mask)+1);
|
||||
if(!pIf->mask)
|
||||
|
Reference in New Issue
Block a user