| 249 | m_pFunction->Execute(NULL); |
| 250 | } |
| 251 | void RunThinkPart() |
| 252 | { |
| 253 | /* Create a Handle for our query */ |
| 254 | HandleSecurity sec(me->GetIdentity(), g_pCoreIdent); |
| 255 | |
| 256 | Handle_t qh = BAD_HANDLE; |
| 257 | |
| 258 | if (m_pQuery) |
| 259 | { |
| 260 | CombinedQuery *c = new CombinedQuery(m_pQuery, m_pDatabase); |
| 261 | |
| 262 | qh = CreateLocalHandle(hCombinedQueryType, c, &sec); |
| 263 | if (qh != BAD_HANDLE) |
| 264 | { |
| 265 | m_pQuery = NULL; |
| 266 | } else { |
| 267 | g_pSM->Format(error, sizeof(error), "Could not alloc handle"); |
| 268 | delete c; |
| 269 | } |
| 270 | } |
| 271 | |
| 272 | if (m_pFunction->IsRunnable()) |
| 273 | { |
| 274 | m_pFunction->PushCell(m_MyHandle); |
| 275 | m_pFunction->PushCell(qh); |
| 276 | m_pFunction->PushString(qh == BAD_HANDLE ? error : ""); |
| 277 | m_pFunction->PushCell(m_Data); |
| 278 | m_pFunction->Execute(NULL); |
| 279 | } |
| 280 | |
| 281 | if (qh != BAD_HANDLE) |
| 282 | { |
| 283 | handlesys->FreeHandle(qh, &sec); |
| 284 | } |
| 285 | } |
| 286 | void Destroy() |
| 287 | { |
| 288 | delete this; |
no test coverage detected