Annotation of 43BSDReno/contrib/isode-beta/quipu/oper_error.c, revision 1.1.1.1

1.1       root        1: /* oper_error.c - deal with return of error to an operation */
                      2: 
                      3: #ifndef        lint
                      4: static char *rcsid = "$Header: /f/osi/quipu/RCS/oper_error.c,v 7.1 90/07/09 14:46:23 mrose Exp $";
                      5: #endif
                      6: 
                      7: /* 
                      8:  * $Header: /f/osi/quipu/RCS/oper_error.c,v 7.1 90/07/09 14:46:23 mrose Exp $
                      9:  *
                     10:  *
                     11:  * $Log:       oper_error.c,v $
                     12:  * Revision 7.1  90/07/09  14:46:23  mrose
                     13:  * sync
                     14:  * 
                     15:  * Revision 7.0  89/11/23  22:17:51  mrose
                     16:  * Release 6.0
                     17:  * 
                     18:  */
                     19: 
                     20: /*
                     21:  *                               NOTICE
                     22:  *
                     23:  *    Acquisition, use, and distribution of this module and related
                     24:  *    materials are subject to the restrictions of a license agreement.
                     25:  *    Consult the Preface in the User's Manual for the full terms of
                     26:  *    this agreement.
                     27:  *
                     28:  */
                     29: 
                     30: 
                     31: /* LINTLIBRARY */
                     32: 
                     33: #include "rosap.h"
                     34: #include "quipu/util.h"
                     35: #include "quipu/connection.h"
                     36: #include "quipu/ds_error.h"
                     37: 
                     38: extern LLog    * log_dsap;
                     39: 
                     40: oper_error(conn, di)
                     41: struct connection      * conn;
                     42: struct DSAPindication  * di;
                     43: {
                     44:     struct DSAPerror   * de = &(di->di_error);
                     45:     struct oper_act *   oper;
                     46: 
                     47:     DLOG(log_dsap, LLOG_TRACE, ("net_wait_ro_error"));
                     48: 
                     49:     for(oper=conn->cn_operlist; oper != NULLOPER; oper=oper->on_next_conn)
                     50:        if(oper->on_id == de->de_id)
                     51:            break;
                     52: 
                     53:     if(oper == NULLOPER)
                     54:     {
                     55:        LLOG(log_dsap, LLOG_FATAL, ("oper_error: Cannot locate operation for error"));
                     56:        send_ro_ureject(conn->cn_ad, &(de->de_id), ROS_REP_UNRECOG);
                     57:        return;
                     58:     }
                     59: 
                     60:     if(oper->on_state == ON_ABANDONED)
                     61:     {
                     62:        LLOG(log_dsap, LLOG_NOTICE, ("oper_error: operation had been abandoned"));
                     63:        oper_extract(oper);
                     64:        return;
                     65:     }
                     66: 
                     67:     if(!ds_recog_err(de->de_err.dse_type))
                     68:     {
                     69:        LLOG(log_dsap, LLOG_EXCEPTIONS, ("oper_error - Unrecognised error"));
                     70:        send_ro_ureject(conn->cn_ad, &(de->de_id), ROS_REP_RECERR);
                     71:        oper_fail_wakeup(oper);
                     72:     }
                     73: 
                     74:     oper->on_resp = (*di); /* struct copy */
                     75: 
                     76:     /* Need to check type of operation here! */
                     77:     switch(oper->on_type)
                     78:     {
                     79:     case ON_TYPE_X500:
                     80:        task_error_wakeup(oper);
                     81:        break;
                     82:     case ON_TYPE_SUBTASK:
                     83:        subtask_error_wakeup(oper);
                     84:        break;
                     85:     case ON_TYPE_BIND_COMPARE:
                     86:        bind_compare_error_wakeup(oper);
                     87:        break;
                     88:     case ON_TYPE_GET_DSA_INFO:
                     89:        dsa_info_error_wakeup(oper);
                     90:        break;
                     91:     case ON_TYPE_GET_EDB:
                     92:        get_edb_fail_wakeup(oper);
                     93:        break;
                     94:     default:
                     95:        LLOG(log_dsap, LLOG_EXCEPTIONS, ("oper_error - on_type invalid"));
                     96:        break;
                     97:     }
                     98: 
                     99: }
                    100: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.