Menu

#1399 Unitialized parameters when connecting to OA

2.13.2
closed-fixed
5
2009-02-09
2008-12-15
Anonymous
No

In oa_soap_event.c in the function process_oa_out_of_access when the timeout is reached and the connection is NULL there is an attempt to initialize new connection (line 470)
But in this place the user_name and password variables are both set to NULL.
These values should be taken from configuration file.
I think the possible fix could be to add these two lines
before calling initialize_oa_con function:

user_name = (char*) g_hash_table_lookup(oh_handler->config, "OA_User_Name");
password = (char *)
g_hash_table_lookup(oh_handler->config, "OA_Password");

This should set the right values.

Discussion

  • Bryan Sutula

    Bryan Sutula - 2008-12-15

    Updated category, owner, and group. The comments above seem to reference the current top of trunk as of today, svn revision 6919.

     
  • Bryan Sutula

    Bryan Sutula - 2008-12-15
    • labels: 622325 --> HP c-Class Plugin
    • milestone: --> 896522
    • assigned_to: nobody --> pgraghu
     
  • Nobody/Anonymous

    I have this problem in the openhpi 2.12.0 version and I think this could be a patch for this issue.

    --- openhpi-2.11.3/plugins/oa_soap/oa_soap_event.c.pre-patched 2008-12-04 17:48:41.000000000 +0100
    +++ openhpi-2.11.3/plugins/oa_soap/oa_soap_event.c 2008-12-04 17:48:13.000000000 +0100
    @@ -447,6 +447,10 @@
    */
    if (time_elapsed >= timeout) {
    if (oa->event_con == NULL) {
    + /* Get the user_name and password from config file */
    + user_name = (char *) g_hash_table_lookup(oh_handler->config,"OA_User_Name");
    + password = (char *) g_hash_table_lookup(oh_handler->config,"OA_Password");
    +
    rv = initialize_oa_con(oa, user_name, password);
    if (rv != SA_OK) {
    /* OA is not accessible.

     
  • Raghavendra PG

    Raghavendra PG - 2008-12-17
     
  • Raghavendra PG

    Raghavendra PG - 2008-12-17

    Moved the user_name and password variable initialization to beginning of the function.

    Modified patch is attached
    File Added: uninitialize_params.patch

     
  • Raghavendra PG

    Raghavendra PG - 2008-12-17

    Fixed in SVN revision 6922

     
  • Raghavendra PG

    Raghavendra PG - 2008-12-17
    • status: open --> closed-fixed
     
  • Ric White

    Ric White - 2009-02-09
    • milestone: 896522 --> 2.13.2