⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dodiff.out

📁 mgcp协议源代码。支持多种编码:g711
💻 OUT
📖 第 1 页 / 共 5 页
字号:
2050,2099c1992<             /* Set ComponentID. We have to use the random generator<                because there is no transaction id yet.<             */< <             numbytesrandom = OSPPUtilGetRandom(random, 0);<             numbytescounter = OSPM_SPRINTF(counter, "%d", OSPPTransactionGetCounter(ospvTrans));< <             OSPM_MALLOC((ospvTrans->AuthReq)->ospmAuthReqComponentId, <                         unsigned char, <                         numbytesrandom + numbytescounter +1);<             OSPM_MEMSET((ospvTrans->AuthReq)->ospmAuthReqComponentId, <                         0, <                         numbytesrandom + numbytescounter +1);<             OSPM_MEMCPY((ospvTrans->AuthReq)->ospmAuthReqComponentId, <                         random, <                         numbytesrandom);<             OSPM_MEMCPY(((ospvTrans->AuthReq)->ospmAuthReqComponentId + numbytesrandom), <                         counter, <                         numbytescounter);< <             /* Update the componentId Unique counter */<             OSPPTransactionUpdateCounter(ospvTrans);< <             /* Set MessageId. The reasons are the same as for componentId */<             numbytesrandom = OSPPUtilGetRandom(random, 0);<             numbytescounter = OSPM_SPRINTF(counter, "%d", OSPPTransactionGetCounter(ospvTrans));< <             OSPM_MALLOC((ospvTrans->AuthReq)->ospmAuthReqMessageId, <                         unsigned char, <                         numbytesrandom + numbytescounter +1);<             OSPM_MEMSET((ospvTrans->AuthReq)->ospmAuthReqMessageId, <                         0, <                         numbytesrandom + numbytescounter +1);<             OSPM_MEMCPY((ospvTrans->AuthReq)->ospmAuthReqMessageId, <                         random, <                         numbytesrandom);<             OSPM_MEMCPY(((ospvTrans->AuthReq)->ospmAuthReqMessageId + numbytesrandom), <                         counter, <                         numbytescounter);< <             /* Update the ComponentId Unique counter again to <              * keep the MessageId and ComponentId values unique. <              */<             OSPPTransactionUpdateCounter(ospvTrans);<         }<         else<         {<             errorcode = OSPC_ERR_TRAN_TXID_NOT_FOUND;<             OSPM_DBGERRORLOG(errorcode, "Transaction id not found");<         }--->         } /* end if errorcode... */2347c2240,2241<                 fprintf(stderr, "CN:%s\nHN:%s\n", (char *)commonname, (char *)svcpt->HostName);---> 		/* wbr: comment the fprintf() to avoid mangling the dbg display */>                 /* fprintf(stderr, "CN:%s\nHN:%s\n", (char *)commonname, (char *)svcpt->HostName); */********** end osptrans.c********** begin osptransapi.c23a24> 351,352c352,353<                                 &(trans->TNStatistics->ospmRoundTrip), <                                 sizeof(OSPTDELAY));--->                 				&(trans->TNStatistics->ospmRoundTrip), >                 				sizeof(OSPTDELAY));508,509c509,526<                 tranindex.Index = OSPM_GET_TRANSACTION_INDEX(ospvTransaction);<                 OSPPTransactionCollectionRemoveItem(trancoll, tranindex);--->                 /* 8/28/00 - add mutex around trancoll before removing a transaction*/> 		OSPM_MUTEX_LOCK(trancoll->TransactionMutex, errorcode);> 		if (errorcode == OSPC_ERR_NO_ERROR)> 		{>                     tranindex.Index = OSPM_GET_TRANSACTION_INDEX(ospvTransaction);>                     OSPPTransactionCollectionRemoveItem(trancoll, tranindex);> 		    OSPM_MUTEX_UNLOCK( trancoll->TransactionMutex, errorcode );>                     if(trans != (OSPTTRANS *)NULL)>                     {>                         OSPM_FREE(trans);>                         trans = NULL;>                     }> 		}> 	        else> 		{> 		    OSPM_DBGERRORLOG(tranindex, > 		       "unable to obtain mutex, trans not removed from trancoll");> 		}512,516d528<             if(trans != (OSPTTRANS *)NULL)<             {<                 OSPM_FREE(trans);<                 trans = NULL;<             }611c623<     unsigned        ospvSizeOfTimestamp,    /* In  - Max size for timestamp string */--->     unsigned        ospvSizeOfTimestamp, 		/* In  - Max size for timestamp string */1013c1025<      * move data into authreq & authrsp, (OGW) struct so ---> 		 * move data into authreq & authrsp, (OGW) struct so 1637,1646d1648<                 if(OSPPDestHasTNFailReason(trans->CurrentDest))<                 {< <                     /* Set failure reason */<                     OSPPUsageIndSetTNFailReason(usage, OSPPDestGetTNFailReason(trans->CurrentDest));<                 }<             }< <             if(errorcode == OSPC_ERR_NO_ERROR)<             {1821c1823<     unsigned        *ospvSizeOfDetailLog,       /* In/Out - Max size of detail log Actual size of detail log */---> 		unsigned        *ospvSizeOfDetailLog,       /* In/Out - Max size of detail log Actual size of detail log */2109,2110c2111,2112<     OSPTTRANHANDLE  ospvTransaction,  /* In - Transaction handle */<     unsigned        ospvDuration,     /* In - duration of in-progress call */--->     OSPTTRANHANDLE  ospvTransaction, 	/* In - Transaction handle */>     unsigned        ospvDuration, 		/* In - duration of in-progress call */2261c2263<                         if (*ospvSizeOfToken < (unsigned)OSPPTokenGetSize(token))--->                         if (*ospvSizeOfToken < OSPPTokenGetSize(token))2407d2408<     OSPTDEST            *dest       = OSPC_OSNULL;2451d2451<  2471,2497d2470<                  /* create the destination object */<                     dest = OSPPDestNew(); < <                     if (dest == OSPC_OSNULL)<                     {<                         errorcode = OSPC_ERR_DATA_NO_DEST;<                     }<                     else<                     {<                         OSPPDestSetCallId(dest, <                                           (const unsigned char *)ospvCallId,<                                           ospvSizeOfCallId);< <                         OSPPDestSetNumber(dest, (const unsigned char *)ospvCalledNumber);< <                         OSPPAuthIndSetDest(authind, dest);< <                         trans->CurrentDest = dest;<                         dest = OSPC_OSNULL;< <                     }<                 }<                 < < <                 if (errorcode == OSPC_ERR_NO_ERROR)<                 {2810d2782<                     trans->HasTransactionID = OSPC_TRUE;********** end osptransapi.c********** begin osptransids.c260c260<     errorcode = OSPPProviderLockTransIdMutex(ospvProvider);---> 	errorcode = OSPPProviderLockTransIdMutex(ospvProvider);280c280,281<         OSPPTransIdPurge(OSPPProviderGetTransIdSentinel(ospvProvider));--->         OSPPTransIdPurge(OSPPProviderGetTransIdSentinel(ospvProvider),> 			ospvProvider);318c319<                 errorcode = OSPPProviderUnLockTransIdMutex(ospvProvider);---> 	            errorcode = OSPPProviderUnLockTransIdMutex(ospvProvider);326a328,332> #ifdef TN_TRANSDBD>     /* wbr debug: */> 	tnTransById( ospvProvider );> #endif> 350,351c356,357<     /*initialize transaction tracking<      * initialize the doubly-linked list sentinel */---> 	/*initialize transaction tracking> 	 * initialize the doubly-linked list sentinel */399c405,407<     OSPTTRANSID *ospvSentinel)--->     OSPTTRANSID *ospvSentinel,>     OSPTPROVIDER *ospvProvider> )402a411,413> #ifdef TN_TRANSDBG>     char          buf[20];> #endif414a426,431> #ifdef TN_TRANSDBG> 	OSPM_MEMSET(&buf, 0, sizeof(buf));> 	sprintf(buf, "%u", ptransid->ospmTransactionId);> 	fprintf(stderr, "\n ****del TID: %s, @=0x%p\n", buf, ptransid);> #endif> 416c433<         OSPPTransIdRemove(ptransid);--->         OSPPTransIdRemove(ptransid, ospvProvider);427c444,445<     OSPTTRANSID *ospvTransId        /* transaction ID to remove */--->     OSPTTRANSID *ospvTransId,       /* transaction ID to remove */>     OSPTPROVIDER *ospvProvider      /* osp provider object */432a451>     OSPTTRANSID** root      = OSPC_OSNULL;          /* tree's root */570a590,600>         /* wbr: double check to see if splice is root, if so, update the root:> 	 */> 	root = OSPPProviderGetTransIdRoot( ospvProvider );> 	if (*root == splice)   /* about to prune off the root */> 	{> 	   *root = child;> #ifdef TN_TRANSDBG> 	   fprintf( stderr, "\n ********** updating new root to point to 0x%p\n", > 			   *root);> #endif> 	}583,584c613,614< <     time(&now);---> 	> 	time(&now);659c689<     OSPPProviderLockTransIdMutex(ospvProvider);---> 	OSPPProviderLockTransIdMutex(ospvProvider);672c702<             OSPPTransIdRemove(ptransid);--->             OSPPTransIdRemove(ptransid, ospvProvider);676c706<     OSPPProviderUnLockTransIdMutex(ospvProvider);---> 	OSPPProviderUnLockTransIdMutex(ospvProvider);692c722<     OSPPProviderLockTransIdMutex(ospvProvider);---> 	OSPPProviderLockTransIdMutex(ospvProvider);701c731<     OSPPProviderUnLockTransIdMutex(ospvProvider);---> 	OSPPProviderUnLockTransIdMutex(ospvProvider);727,731c757,761< #ifdef _DEBUG<         OSPM_MEMSET(&buf, 0, sizeof(buf));<         sprintf(buf, "%016I64x", pTrans->ospmTransactionId);<         fprintf(stderr, "\nTID:%s\n", buf);< #endif---> /* #ifdef _DEBUG */> 		OSPM_MEMSET(&buf, 0, sizeof(buf));> 		sprintf(buf, "%u", pTrans->ospmTransactionId);>         fprintf(stderr, "\n** TID:%s, @=0x%p\n", buf, pTrans);> /* #endif */751c781<     OSPPProviderLockTransIdMutex(ospvProvider);---> 	OSPPProviderLockTransIdMutex(ospvProvider);761c791<         sprintf(buf, "%016I64x", pTrans->ospmTransactionId); ---> 		sprintf(buf, "%d", pTrans->ospmTransactionId); 768c798<     OSPPProviderUnLockTransIdMutex(ospvProvider);---> 	OSPPProviderUnLockTransIdMutex(ospvProvider);********** end osptransids.c********** begin ospusage.c24a25> 157,158c158<     /* now add the children - start with the service */<     /* the service is blank for basic service */--->     /* now add the children - start with the amount (which is the usage) */161,165c161,162<         elem = OSPPXMLElemNew(OSPPMsgGetElemName(ospeElemService), "");<         if (elem == OSPC_OSNULL)<         {<             ospvErrCode = OSPC_ERR_XML_NO_ELEMENT;<         }--->         ospvErrCode = OSPPMsgNumToElement(ospvUsage,>             (const unsigned char *)OSPPMsgGetElemName(ospeElemAmount), &elem);172c169<     /* now add the amount (which is the usage) */--->     /* now add the increment - for us always 1 */175,176c172,173<         ospvErrCode = OSPPMsgNumToElement(ospvUsage,<             (const unsigned char *)OSPPMsgGetElemName(ospeElemAmount), &elem);--->         ospvErrCode = OSPPMsgNumToElement(1,>             (const unsigned char *)OSPPMsgGetElemName(ospeElemIncrement), &elem);183c180<     /* now add the increment - for us always 1 */--->     /* the service is blank for basic service */186,187c183,187<         ospvErrCode = OSPPMsgNumToElement(1,<             (const unsigned char *)OSPPMsgGetElemName(ospeElemIncrement), &elem);--->         elem = OSPPXMLElemNew(OSPPMsgGetElemName(ospeElemService), "");>         if (elem == OSPC_OSNULL)>         {>             ospvErrCode = OSPC_ERR_XML_NO_ELEMENT;>         }********** end ospusage.c********** begin ospusagecnf.c74,78d73<         if((*ospvUsageCnf)->ospmUsageCnfMessageId != OSPC_OSNULL)<         {<             OSPM_FREE((*ospvUsageCnf)->ospmUsageCnfMessageId);<         }< 225c220<         OSPPListLinkNew (&(usagecnf->ospmUsageCnfLink));---> 			  OSPPListLinkNew (&(usagecnf->ospmUsageCnfLink));232d226<         usagecnf->ospmUsageCnfMessageId = OSPC_OSNULL;274c268<     const unsigned char **ospvComponentId--->     unsigned char **ospvComponentId288c282<             *ospvComponentId = (const unsigned char *)OSPPXMLAttrGetValue(attr);--->             *ospvComponentId = (unsigned char *)OSPPXMLAttrGetValue(attr);312,313d305<     unsigned char   *messageId  = OSPC_OSNULL;<     OSPTXMLELEM     *ospvParent = OSPC_OSNULL;330,342d321<             if(OSPPMsgGetElemPart(OSPPXMLElemGetName(ospvElem))==ospeElemMessage)<             {<                 OSPPUsageCnfMessageIdFromElement(ospvElem, &messageId);< <                 /* ospvElem is pointing to the Message element. <                  * The first child contains the Component element. <                  * The following two lines of code change ospvElem from <                  * pointing to the Message element to the Component element.<                  */<                 ospvParent = ospvElem;<                 ospvElem = (OSPTXMLELEM *)OSPPXMLElemFirstChild(ospvParent);<             }< 355,361d333<                 else<                 {<                     /*<                      * The Usage Confirmation element should consist of several child<                      * elements. We'll run through what's there and pick out<                      * the information we need.<                      */363c335,343<                     if(messageId != OSPC_OSNULL)--->                 /*>                  * The Usage Confirmation element should consist of several child>                  * elements. We'll run through what's there and pick out>                  * the information we need.>                  */>                 if(OSPPMsgGetElemPart(OSPPXMLElemGetName(elem1)) == ospeElemUsageCnf)>                 {>                     /* Get ComponentId */>                     if(elem1 != OSPC_OSNULL)365c345,349<                         OSPPUsageCnfSetMessageId(usagecnf, messageId);--->         

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -