|
|
1.1 ! root 1: /* task_result.c - */ ! 2: ! 3: #ifndef lint ! 4: static char *rcsid = "$Header: /f/osi/quipu/RCS/task_result.c,v 7.0 89/11/23 22:18:14 mrose Rel $"; ! 5: #endif ! 6: ! 7: /* ! 8: * $Header: /f/osi/quipu/RCS/task_result.c,v 7.0 89/11/23 22:18:14 mrose Rel $ ! 9: * ! 10: * ! 11: * $Log: task_result.c,v $ ! 12: * Revision 7.0 89/11/23 22:18:14 mrose ! 13: * Release 6.0 ! 14: * ! 15: */ ! 16: ! 17: /* ! 18: * NOTICE ! 19: * ! 20: * Acquisition, use, and distribution of this module and related ! 21: * materials are subject to the restrictions of a license agreement. ! 22: * Consult the Preface in the User's Manual for the full terms of ! 23: * this agreement. ! 24: * ! 25: */ ! 26: ! 27: ! 28: /* LINTLIBRARY */ ! 29: ! 30: #include "rosap.h" ! 31: #include "quipu/util.h" ! 32: #include "quipu/connection.h" ! 33: ! 34: extern LLog * log_dsap; ! 35: void ros_log (); ! 36: ! 37: /* ! 38: * The DSA has produced a result for the task, encode the result, ! 39: * generate an RO-RESULT.REQUEST and update the task block. ! 40: */ ! 41: task_result(task) ! 42: register struct task_act * task; ! 43: { ! 44: int result; ! 45: struct DSAPindication di_s; ! 46: struct DSAPindication * di = &(di_s); ! 47: struct ds_op_res * res; ! 48: struct connection * cn = task->tk_conn; ! 49: ! 50: #ifndef NO_STATS ! 51: extern LLog * log_stat; ! 52: LLOG (log_stat, LLOG_TRACE,("Result sent (%d)",cn->cn_ad)); ! 53: #endif ! 54: ! 55: DLOG(log_dsap, LLOG_TRACE, ("task_result")); ! 56: ! 57: if(task == NULLTASK) ! 58: { ! 59: LLOG(log_dsap, LLOG_FATAL, ("Task memerr 5")); ! 60: return; ! 61: } ! 62: ! 63: res = task->tk_result; ! 64: ! 65: switch (cn->cn_ctx) ! 66: { ! 67: case DS_CTX_X500_DAP: ! 68: watch_dog("DapResultRequest"); ! 69: result = DapResultRequest (cn->cn_ad, task->tk_dx.dx_id, ! 70: &(res->dcr_dsres), di); ! 71: watch_dog_reset(); ! 72: break; ! 73: case DS_CTX_X500_DSP: ! 74: watch_dog("DspResultRequest"); ! 75: result = DspResultRequest (cn->cn_ad, task->tk_dx.dx_id, res, di); ! 76: watch_dog_reset(); ! 77: break; ! 78: case DS_CTX_QUIPU_DSP: ! 79: watch_dog("QspResultRequest"); ! 80: result = QspResultRequest (cn->cn_ad, task->tk_dx.dx_id, res, di); ! 81: watch_dog_reset(); ! 82: break; ! 83: default: ! 84: LLOG (log_dsap, LLOG_EXCEPTIONS, ("task_result(): Unknown context %d", cn->cn_ctx)); ! 85: break; ! 86: } ! 87: ! 88: if (result != OK) ! 89: { ! 90: if(di->di_type == DI_ABORT) ! 91: { ! 92: LLOG(log_dsap, LLOG_FATAL, ("D-RESULT.REQUEST: fatal reject - fail the connection")); ! 93: cn->cn_state = CN_FAILED; ! 94: } ! 95: else ! 96: { ! 97: send_ro_ureject(cn->cn_ad, &(task->tk_dx.dx_id), ROS_IP_RELEASE); ! 98: } ! 99: } ! 100: ! 101: if(cn->cn_state == CN_FAILED) ! 102: { ! 103: DLOG(log_dsap, LLOG_DEBUG, ("task_result(): extracting conn:")); ! 104: conn_log(cn); ! 105: conn_extract(cn); ! 106: } ! 107: } ! 108:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.