Return true if we found it, or false if not found. This is called from a separate thread, so we set the flag and wait for the service loop to handle it.
| 1073 | // Return true if we found it, or false if not found. |
| 1074 | // This is called from a separate thread, so we set the flag and wait for the service loop to handle it. |
| 1075 | bool NewTransactionTable::ttTerminate(TranEntryId tid) |
| 1076 | { |
| 1077 | bool bRet = true; |
| 1078 | rwLock.rlock(); |
| 1079 | NewTransactionMap::iterator itr = mTable.find(tid); |
| 1080 | if (itr==mTable.end()) bRet = false; |
| 1081 | else |
| 1082 | { |
| 1083 | TranEntry *tran = itr->second; |
| 1084 | ScopedLock lock2(tran->mAnotherLock,__FILE__,__LINE__); |
| 1085 | tran->mTerminationRequested = true; |
| 1086 | } |
| 1087 | rwLock.unlock(); |
| 1088 | return bRet; |
| 1089 | } |
| 1090 | |
| 1091 | // Does the TranEntry referenced by this id still pointer to its SipDialog? |
| 1092 | // We use the TranEntryId so we can delete the TranEntry completely separately from the SipDialog. |