From: <av...@us...> - 2012-05-29 15:21:01
|
Revision: 7444 http://openhpi.svn.sourceforge.net/openhpi/?rev=7444&view=rev Author: avpak Date: 2012-05-29 15:20:51 +0000 (Tue, 29 May 2012) Log Message: ----------- Fix for #3530559 Modified Paths: -------------- openhpi/trunk/clients/hpionIBMblade.c openhpi/trunk/clients/ohhandler.c openhpi/trunk/clients/ohparam.c openhpi/trunk/include/oHpi.h openhpi/trunk/openhpid/ohpi.c Modified: openhpi/trunk/clients/hpionIBMblade.c =================================================================== --- openhpi/trunk/clients/hpionIBMblade.c 2012-05-29 14:02:14 UTC (rev 7443) +++ openhpi/trunk/clients/hpionIBMblade.c 2012-05-29 15:20:51 UTC (rev 7444) @@ -236,9 +236,9 @@ } /* If this resource belongs to the ipmi handler, then display it*/ - if (strcmp(handler_info.plugin_name, "libipmi") == 0) { + if (strcmp((const char*)handler_info.plugin_name, "libipmi") == 0) { return(1); - } else if(strcmp(handler_info.plugin_name, "libsnmp_bc") == 0) { + } else if(strcmp((const char*)handler_info.plugin_name, "libsnmp_bc") == 0) { for (i=0; i<SAHPI_MAX_ENTITY_PATH; i++) { if ((Rpt->Rpt.ResourceEntity.Entry[i].EntityType == SAHPI_ENT_PHYSICAL_SLOT) && (Rpt->Rpt.ResourceEntity.Entry[i].EntityLocation == blade_slot)) Modified: openhpi/trunk/clients/ohhandler.c =================================================================== --- openhpi/trunk/clients/ohhandler.c 2012-05-29 14:02:14 UTC (rev 7443) +++ openhpi/trunk/clients/ohhandler.c 2012-05-29 15:20:51 UTC (rev 7444) @@ -360,7 +360,7 @@ if (copt.domainid==SAHPI_UNSPECIFIED_DOMAIN_ID) printf("\n\nInfo for handler %u in default domain:\n\n",handlerid); else printf("\n\nInfo for handler %u in domain %u:\n\n",handlerid, copt.domainid); - printf("Plugin name: %s\n",handlerinfo.plugin_name); + printf("Plugin name: %s\n",(const char *)handlerinfo.plugin_name); printf("Root "); oh_print_ep (&(handlerinfo.entity_root),0); @@ -368,7 +368,7 @@ printf("Failed attempts to load handler: %u\n",handlerinfo.load_failed); printf("\nHandler configuration:\n"); - printf (" plugin %s\n", handlerinfo.plugin_name); + printf (" plugin %s\n", (const char *)handlerinfo.plugin_name); printf (" entity_root \"%s\"\n",(const char *) g_hash_table_lookup(handlerconfig, "entity_root")); g_hash_table_foreach(handlerconfig, print_pair, NULL); printf("\n\n"); @@ -495,7 +495,7 @@ } else { printf("Handler %u: %s, ", - nexthandlerid, handlerinfo.plugin_name); + nexthandlerid, (const char *)handlerinfo.plugin_name); oh_print_ep (&(handlerinfo.entity_root),0); } g_hash_table_destroy(config); Modified: openhpi/trunk/clients/ohparam.c =================================================================== --- openhpi/trunk/clients/ohparam.c 2012-05-29 14:02:14 UTC (rev 7443) +++ openhpi/trunk/clients/ohparam.c 2012-05-29 15:20:51 UTC (rev 7444) @@ -262,7 +262,7 @@ oh_lookup_error(rv)); return rv; } - printf("OPENHPI_PATH = %s\n",param.u.Path); + printf("OPENHPI_PATH = %s\n",(const char*)param.u.Path); param.Type =OHPI_VARPATH; rv = oHpiGlobalParamGet (sessionid, ¶m); @@ -271,7 +271,7 @@ oh_lookup_error(rv)); return rv; } - printf("OPENHPI_VARPATH = %s\n",param.u.VarPath); + printf("OPENHPI_VARPATH = %s\n",(const char*)param.u.VarPath); param.Type =OHPI_CONF; rv = oHpiGlobalParamGet (sessionid, ¶m); @@ -280,7 +280,7 @@ oh_lookup_error(rv)); return rv; } - printf("OPENHPI_CONF = %s\n",param.u.Conf); + printf("OPENHPI_CONF = %s\n",(const char*)param.u.Conf); return SA_OK; } @@ -300,9 +300,9 @@ param.Type = ptype; switch (ptype){ //strings - case OHPI_PATH: strcpy(param.u.Path, setparam);break; - case OHPI_VARPATH: strcpy(param.u.VarPath, setparam);break; - case OHPI_CONF: strcpy(param.u.Conf, setparam);break; + case OHPI_PATH: strcpy((char*)param.u.Path, setparam);break; + case OHPI_VARPATH: strcpy((char*)param.u.VarPath, setparam);break; + case OHPI_CONF: strcpy((char*)param.u.Conf, setparam);break; //severity case OHPI_LOG_ON_SEV: strncpy((char *)buffer.Data, setparam, SAHPI_MAX_TEXT_BUFFER_LENGTH); @@ -358,9 +358,9 @@ if (param.u.DatSave) printf("TRUE\n"); else printf("FALSE\n"); break; - case OHPI_PATH: printf("OHPENPI_PATH = %s\n",param.u.Path);break; - case OHPI_VARPATH: printf("OPENHPI_VARPATH = %s\n",param.u.VarPath);break; - case OHPI_CONF: printf("OPENHPI_CONF = %s\n",param.u.Conf);break; + case OHPI_PATH: printf("OHPENPI_PATH = %s\n",(const char*)param.u.Path);break; + case OHPI_VARPATH: printf("OPENHPI_VARPATH = %s\n",(const char*)param.u.VarPath);break; + case OHPI_CONF: printf("OPENHPI_CONF = %s\n",(const char*)param.u.Conf);break; default: return SA_ERR_HPI_UNSUPPORTED_PARAMS; } return SA_OK; Modified: openhpi/trunk/include/oHpi.h =================================================================== --- openhpi/trunk/include/oHpi.h 2012-05-29 14:02:14 UTC (rev 7443) +++ openhpi/trunk/include/oHpi.h 2012-05-29 15:20:51 UTC (rev 7444) @@ -47,9 +47,9 @@ typedef struct { oHpiHandlerIdT id; - char plugin_name[MAX_PLUGIN_NAME_LENGTH]; + SaHpiUint8T plugin_name[MAX_PLUGIN_NAME_LENGTH]; SaHpiEntityPathT entity_root; - int load_failed; + SaHpiInt32T load_failed; } oHpiHandlerInfoT; @@ -92,9 +92,9 @@ //unsigned char Debug; /* 1 = YES, 0 = NO */ //unsigned char DebugTrace; /* !0 = YES, 0 = NO */ //unsigned char DebugLock; /* !0 = YES, 0 = NO */ - char Path[OH_PATH_PARAM_MAX_LENGTH]; /* Dir path to openhpi plugins */ - char VarPath[OH_PATH_PARAM_MAX_LENGTH]; /* Dir path for openhpi data */ - char Conf[OH_PATH_PARAM_MAX_LENGTH]; /* File path of openhpi configuration */ + SaHpiUint8T Path[OH_PATH_PARAM_MAX_LENGTH]; /* Dir path to openhpi plugins */ + SaHpiUint8T VarPath[OH_PATH_PARAM_MAX_LENGTH]; /* Dir path for openhpi data */ + SaHpiUint8T Conf[OH_PATH_PARAM_MAX_LENGTH]; /* File path of openhpi configuration */ } oHpiGlobalParamUnionT; Modified: openhpi/trunk/openhpid/ohpi.c =================================================================== --- openhpi/trunk/openhpid/ohpi.c 2012-05-29 14:02:14 UTC (rev 7443) +++ openhpi/trunk/openhpid/ohpi.c 2012-05-29 15:20:51 UTC (rev 7444) @@ -191,7 +191,7 @@ } info->id = id; - strncpy(info->plugin_name, h->plugin_name, MAX_PLUGIN_NAME_LENGTH); + strncpy((char*)info->plugin_name, h->plugin_name, MAX_PLUGIN_NAME_LENGTH); oh_encode_entitypath((const char *)g_hash_table_lookup(h->config, "entity_root"), &info->entity_root); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |