[omniORB] NameClt list code!., It does not work!!!.

Ceyhun ÖZGÜN ceyhun_ozgun@hotmail.com
Thu, 02 Mar 2000 23:54:05 PST


Sampled code below is from nameclt.cc
While second turn of while loop
Binding_var frees previous result and program crashes.

Have anybody any idea?.
Thanks.

      CosNaming::NamingContext_var context;

      CosNaming::BindingIterator_var bi;
      CosNaming::BindingList_var bl;
      CosNaming::Binding_var b;

      context->list(0, bl, bi);

      while (bi->next_one(b))
      {

	    cout << (char*)b->binding_name[0].id;
	    if (strcmp(b->binding_name[0].kind, "") != 0)
    	    cout << "." << (char*)b->binding_name[0].kind;
    	if (b->binding_type == CosNaming::ncontext)
    	  cout << "/";
    	cout << endl;
      }

      bi->destroy();


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com