[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference azur::mcc

Title:DECmcc user notes file. Does not replace IPMT.
Notice:Use IPMT for problems. Newsletter location in note 6187
Moderator:TAEC::BEROUD
Created:Mon Aug 21 1989
Last Modified:Wed Jun 04 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:6497
Total number of notes:27359

3590.0. "mcc_dns_create_instance under MCC hierarchy???" by TAEC::HAYES (Tu quoque mi fili ! C.Hayes SVP @VBE) Wed Aug 19 1992 13:08

Hello ,


My customer is developing a PBX AM using DECmcc Ultrix (V1.2.7 he said !).


He both tried with MCC_DNS_SELCTION DNS or/and MIR and gets the same error.

He is trying to create a subclass instance in DNS below the MCC class, 
but he is getting the message MCC_NO-PARENT when I try. 

The instance he is creating looks like this:

	CREATE MCC 0 PBX_AM Communication Server 24


    LEVEL		CLASS			INSTANCE

    0			MCC             	0
    1			PBX_AM			<no instance> 
    2			Communication Server    24


He uses  mcc_dns_create_instance giving as a p_in_entity
this AES, see attached entry point in C.

There is no instance at level 1 as there is only one PBX_AM
in each system (like we usually do for a SINK for example).
Thus I do not know how dns reacts with this AES.

Does the fact that there is no instance at level 1 PBX_AM
could be the problem ?and how to solve it ?  

Or does the problem occur because we are working in the
dns hierarchy under the specific global entity DNS ?
Thus, how is it possible to create a subclass instance below the MCC class? 
Do I have to change something in DNS?



	Thanks to answer



		Catherine


	

#line 2 "CS_CREATE VER 1.108"  /* TAB-S1,3 PROG-  WHEN 920818 11:14:49 */
/*****************************************************************************
 *
 *  FILE:  MCC_PBX__CS_CREATE.C  - Comm. Server Create Directive
 *
 *  MODIFICATION HISTORY:    
 *
 *   Version     Date          Reviser         Reason
 *   --------    -----------   -------------   ----------------------------
 *    T1.1.0     18-AUG-1992   GUN28/jrj       Creation
 ******************************************************************************/

#include <mcc_descrip.h>
#include <mcc_interface_def.h>       /*  MCC Interface Defintions File       */
#include <mcc_vea_def.h>             /*  MCC verb, entity, attrib constants  */
#include <mcc_msg.h>                 /*  MCC message definitions file        */
#include <mcc_desframe.h>            /*  MCC Design Framework                */

#include "mcc_a2600.h"                /*  General PBX Header File            */
#include "mcc_a2600_dt_table.h"

extern long int mcc_PBX__cs_create(

   unsigned long int       *verb,
   MCC_A_AES               in_entity,
   unsigned long int       *attribute,
   MCC_A_TIMEFRAME         time_spec,
   MCC_T_Descriptor        *in_q,
   MCC_T_Descriptor        *in_p,
   MCC_A_HANDLE            handle,
   MCC_A_AES               out_entity,
   MCC_T_Descriptor        *time_stamp,
   MCC_T_Descriptor        *out_p,
   MCC_T_Descriptor        *out_q)
{
   MCC_T_UNSLONG           cvr;
   MCC_T_UNSLONG           status = MCC_S_NORMAL;
   MCC_T_UNSLONG           icpu;
   MCC_T_UNSLONG           itime;
   MCC_T_UNSLONG           icpu2;
   MCC_T_UNSLONG           itime2;
   MCC_T_Boolean           more = FALSE;
   dt__LocalContext        *p_context = { 0 };
   dt_callargs             call_args;
   
   if (!more)
   {
      gettime(&itime2,"DIRECTIVE TOTAL");
      getcpu(&icpu2,"DIRECTIVE TOTAL");
   }
   gettime(&itime,"DIRECTIVE");
   getcpu(&icpu,"DIRECTIVE");
  
   if (PBX_GM_LOGICAL & PBX_M_LOG_ENTRY_PT_PRINTFS) _SIGNAL_DEBUGGER;
  
   if (status == MCC_S_NORMAL)
      status = mcc_desframe_package_call_args(verb, in_entity, attribute, time_spec, in_q, in_p, 
                                              handle, out_entity, time_stamp, out_p, out_q, &call_args);

   if (status == MCC_S_NORMAL)
      status = begin_directive(&call_args, &p_context, am_ep_dir_cs_create); /*handle initialization*/

   if (status == MCC_S_NORMAL)
   {
      status = do_directive(&call_args, &p_context);   /*work with real entity*/
   }

   more = p_context->flags.more_data;
   cvr = end_directive(&call_args, &p_context, &status, am_ep_dir_cs_create);
  
   getcpu(&icpu,NULL);
   gettime(&itime,NULL);
   if (!more)
   {
      getcpu(&icpu2,NULL);
      gettime(&itime2,NULL);
   }
   return(cvr);

} 

/*****************************************************************************
 *
 *  do_directive()
 *
 */

static long int do_directive(

   dt_callargs              *p_callargs,
   dt__LocalContext         **p_context)
{
   dt__map_cb_data            *cd            = NULL;
   MCC_T_UNSLONG              status         = MCC_S_NORMAL;
   MCC_T_UNSLONG              alert_state;
   MCC_T_UNSLONG              icpu0;
   MCC_T_UNSLONG              itime;
   MCC_T_UNSLONG              dns_status;
   MCC_T_Descriptor           charval;

   getcpu(&icpu0,"Do Directive");
 
   if (status == MCC_S_NORMAL)
   {
      cd = (dt__map_cb_data *) mcc_calloc(1, sizeof(dt__map_cb_data));
      if (!cd) status = MCC_S_MEM_ALLOC_FAILED;
   }

   if (status == MCC_S_NORMAL)
   {
      (*p_context)->cblock_buffer = (MCC_T_UNSBYTE *) mcc_calloc(1, CBLOCK_BUFFER_SIZE);
      if (!(*p_context)->cblock_buffer) status = MCC_S_MEM_ALLOC_FAILED;
   }

   if (status == MCC_S_NORMAL)
      status = decode_mcc_input(p_callargs, p_context, cd);   

   if (status == MCC_S_NORMAL && !(*p_context)->no_class_id && !(*p_context)->global_id)
   {
      print_cblock("AM->MAPPING",&cd->a_cb);

      bprint("  -  Mapping Call \n");
      gettime(&itime,"Mapping Call");
      mcc_thread_defer_alert(&alert_state);

      if (!(PBX_GM_LOGICAL & PBX_M_LOG_PSEUDO))
         status = control_block_to_NMP_mapping(&cd->a_cb, p_context);
  
      mcc_thread_restore_alert(&alert_state);
      gettime(&itime,NULL);
      bprint("  -  Mapping Called \n");
      if (status != MCC_S_NORMAL) status = MCC_S_INVPROTOCOL;
      dprints("call_mapping");

      /* Update multiple response flag */
      if (status == MCC_S_NORMAL)
         (*p_context)->flags.more_data = ((cd->a_cb.flags & CF_LINKED) == CF_LINKED);

      /* Test if cancel during send */
      if (mcc_thread_test_alert()) 
      {
         status = MCC_S_ALERT_TERMREQ;
         dprint("  -  Cancel \n");
      }  

      if (status == MCC_S_NORMAL)
         print_cblock("AM<-MAPPING",&cd->a_cb);
   }

   if (status == MCC_S_NORMAL)
      status = code_mcc_output(p_callargs, p_context, &cd->a_cb);   

   if (status == MCC_S_NORMAL)
   {
       /*!!!! Here is the call which fails, Catherine!!! */
      status = mcc_PBX_dns_create_instance(p_callargs->p_in_entity, NULL, (*p_context)->class_code,NULL);
      dprints("dns_create_instance");
   }

   if (status == MCC_S_NORMAL)
   {
      dprintd("  * Store TCP/IP in DNS: %d\n",(*p_context)->tcp_ip);
      init_mcc_descr(&charval,&(*p_context)->tcp_ip,sizeof((*p_context)->tcp_ip),MCC_K_DT_INTEGER16,FALSE);
      charval.mcc_l_id = MCC_K_ATTR_TCP_IP_Address;
      status = mcc_dns_write_attr_data(p_callargs->p_in_entity,&charval.mcc_l_id,&charval,&dns_status);
      dprints("DNS Write Attr Data");
   }

   /* Set response to appropriate value */
   status = mcc_PBX_get_response(p_context,status);
   
   /* Free directive data memory */
   if (cd) mcc_free(cd);
   if ((*p_context)->cblock_buffer) mcc_free((*p_context)->cblock_buffer);

   getcpu(&icpu0,NULL);
   return(status);
}








T.RTitleUserPersonal
Name
DateLines
3590.1TRM::KWAKWed Aug 19 1992 14:397
    
    RE: .0
    
    Were "MCC 0" and "MCC 0 PBX_AM" registered when the
    mcc_dns_create_instance() was called?
    
    William
3590.2mcc_dns gurus help needed !!TAEC::HAYESTu quoque mi fili ! C.Hayes SVP @VBEThu Aug 20 1992 08:2561
Hello William and all mcc_dns fans,
    
    


Here's some more information ...


- We have tried to REGISTER PBX_AM, but it didn't help. 

- I'm not sure, but I think we got the same problem on VMS.

- Here is the code of the mcc_PBX_dns_create_instance.

    
    Thanks for any help or hint...
    
    
    
    		Catherine
    

 
    	
    
MCC_T_UNSLONG mcc_PBX_dns_create_instance(
   MCC_A_AES         entity,
   MCC_T_Descriptor  *dns_descr,
   MCC_T_UNSLONG     class_code,
   MCC_A_AES         *ret_entity)
{
   MCC_T_UNSLONG            dns_status;
   MCC_T_UNSLONG            status              = MCC_S_NORMAL;
   MCC_T_UNSLONG            wild_type           = MCC_K_AES_NOT_WILD;
   MCC_A_AES                t_entity            = MCC_K_NULL_PTR;

   if (status == MCC_S_NORMAL)
      status = mcc_aes_copy(&entity,&t_entity);

   if (status == MCC_S_NORMAL && dns_descr)
   {
      dns_descr->mcc_l_id = MCC_K_ATTR_NAME_ID;
      status = mcc_aes_create(&t_entity, &class_code, dns_descr, &wild_type);
      dprints("aes_create");
   }

   if (status == MCC_S_NORMAL)
   {
      status = mcc_dns_create_instance(t_entity,&dns_status);
      dprints("dns_create_instance");
   }

   if (status == MCC_S_NORMAL && ret_entity)
      status = mcc_aes_copy(&t_entity,ret_entity);

   if (t_entity) mcc_aes_delete(&t_entity);

   return(status);
}

3590.3We got it !TAEC::HAYESTu quoque mi fili ! C.Hayes SVP @VBEThu Aug 20 1992 12:0714
Hello ,

We managed to create an instance in DNS below MCC with the command:

CREATE MCC A2600.0 A2600_AM COMM SERVER 24
           ^^^^^^

where A2600. is an existing directory path in DNS as for the A2600 class.


Bye

Catherine
3590.4what did you change?TOOK::MCPHERSONLife is hard. Play short.Thu Aug 20 1992 12:416
Congrats.

Just in case someone else hits the same problem, would you post here what you
fixed to get it to work?

/doug