Lines Matching refs:trans

174 	sip_xaction_t		*trans;
184 trans = (sip_xaction_t *)xaction_list->obj;
185 if (ctrans != trans) {
208 sip_xaction_t *trans;
227 trans = (sip_xaction_t *)xaction_list->obj;
228 assert(trans != NULL);
229 if (ctrans != NULL && ctrans != trans) {
234 (void) pthread_mutex_lock(&trans->sip_xaction_mutex);
235 assert(trans->sip_xaction_conn_obj == obj);
237 trans->sip_xaction_conn_obj = NULL;
239 (void) pthread_mutex_unlock(&trans->sip_xaction_mutex);
331 sip_xaction_t *trans;
347 trans = (sip_xaction_t *)malloc(sizeof (sip_xaction_t));
348 if (trans == NULL) {
353 bzero(trans, sizeof (sip_xaction_t));
355 trans->sip_xaction_branch_id = (char *)sip_branchid(NULL);
356 if (trans->sip_xaction_branch_id == NULL) {
357 free(trans);
363 trans->sip_xaction_branch_id = (char *)malloc(strlen(branchid)
365 if (trans->sip_xaction_branch_id == NULL) {
366 free(trans);
371 (void) strncpy(trans->sip_xaction_branch_id, branchid,
373 trans->sip_xaction_branch_id[strlen(branchid)] = '\0';
375 (void) pthread_mutex_init(&trans->sip_xaction_mutex, NULL);
377 trans->sip_xaction_orig_msg = msg;
385 free(trans->sip_xaction_branch_id);
386 free(trans);
396 trans->sip_xaction_method = method;
397 trans->sip_xaction_state = state;
409 SIP_INIT_TIMER(trans->sip_xaction_TA, 2 * timer1);
410 SIP_INIT_TIMER(trans->sip_xaction_TB, 64 * timer1)
411 SIP_INIT_TIMER(trans->sip_xaction_TD, timerd);
412 SIP_INIT_TIMER(trans->sip_xaction_TE, timer1);
413 SIP_INIT_TIMER(trans->sip_xaction_TF, 64 * timer1);
414 SIP_INIT_TIMER(trans->sip_xaction_TG, 2 * timer1);
415 SIP_INIT_TIMER(trans->sip_xaction_TH, 64 * timer1);
416 SIP_INIT_TIMER(trans->sip_xaction_TI, timer4);
417 SIP_INIT_TIMER(trans->sip_xaction_TJ, 64 * timer1);
418 SIP_INIT_TIMER(trans->sip_xaction_TK, timer4);
420 if ((ret = sip_xaction_add(trans, branchid, msg, method)) != 0) {
421 (void) pthread_mutex_destroy(&trans->sip_xaction_mutex);
422 free(trans->sip_xaction_branch_id);
423 free(trans);
429 prev_state != trans->sip_xaction_state) {
430 sip_xaction_ulp_state_cb((sip_transaction_t)trans,
431 (sip_msg_t)msg, prev_state, trans->sip_xaction_state);
433 return (trans);
552 sip_xaction_delete(sip_xaction_t *trans)
556 (void) pthread_mutex_lock(&trans->sip_xaction_mutex);
557 hindex = SIP_DIGEST_TO_HASH(trans->sip_xaction_hash_digest);
558 if (trans->sip_xaction_ref_cnt != 0) {
559 (void) pthread_mutex_unlock(&trans->sip_xaction_mutex);
562 (void) pthread_mutex_unlock(&trans->sip_xaction_mutex);
563 sip_hash_delete(sip_xaction_hash, trans->sip_xaction_hash_digest,
571 sip_xaction_add(sip_xaction_t *trans, char *branchid, _sip_msg_t *msg,
580 * trans is not in the list as yet, so no need to hold the lock
582 bcopy(hash_index, trans->sip_xaction_hash_digest, sizeof (hash_index));
584 if (sip_hash_add(sip_xaction_hash, (void *)trans,