SNMP Subagent Programmer's Guide
Programming Tutorials
SNMP Subagent Programmer’s Guide—119728 2-91
Security Checker
      /*
     *  print whatever the message currently is,
     *  keeping a count, of course.
     */
     helloText.val[helloText.len] = '\0';
     (void) fputs((char *) helloText.val, stderr);
     (void) fputs("\n", stderr);
     helloPrintCnt++;
    } /* end if agent filenumber */
    else {
    /* handle AWAITIO completion on other files... */
    (void) fprintf(stderr, "%s:AWAITIO completed on file number %i\n",
           argv[0], event_fileno);
    } /* end if .. else .. */
   } /* end while */
   /*
    *    We encountered an unrecoverable condition. Clean
   *  up and go away.
    */
   if (mgmt_env)                          
<--13
   {
       if (mgmt_hello_handle)
       {
          mgmt_del_instance(mgmt_env, mgmt_hello_handle);
          mgmt_hello_handle = NULL;
       }
       mgmt_term_env(mgmt_env);
       mgmt_env = NULL;
   }
   return(0);
}
Example 2-18. Security Checker Main Program (page 5 of 5)










