Avoid use of interface in struct because cygwin compilers apparently object (go figure)
This commit was SVN r29388.
Этот коммит содержится в:
родитель
2d2307b6eb
Коммит
13cd112fb4
@ -172,12 +172,12 @@ OBJ_CLASS_INSTANCE(opal_diskstats_t,
|
||||
|
||||
static void netstat_cons(opal_netstats_t *ptr)
|
||||
{
|
||||
ptr->interface = NULL;
|
||||
ptr->net_interface = NULL;
|
||||
}
|
||||
static void netstat_dest(opal_netstats_t *ptr)
|
||||
{
|
||||
if (NULL != ptr->interface) {
|
||||
free(ptr->interface);
|
||||
if (NULL != ptr->net_interface) {
|
||||
free(ptr->net_interface);
|
||||
}
|
||||
}
|
||||
OBJ_CLASS_INSTANCE(opal_netstats_t,
|
||||
|
@ -530,7 +530,7 @@ static int pack_net_stats(opal_buffer_t *buffer, opal_netstats_t *ns)
|
||||
uint64_t i64;
|
||||
int ret;
|
||||
|
||||
if (OPAL_SUCCESS != (ret = opal_dss_pack_buffer(buffer, &ns->interface, 1, OPAL_STRING))) {
|
||||
if (OPAL_SUCCESS != (ret = opal_dss_pack_buffer(buffer, &ns->net_interface, 1, OPAL_STRING))) {
|
||||
return ret;
|
||||
}
|
||||
i64 = (uint64_t)ns->num_bytes_recvd;
|
||||
|
@ -178,7 +178,7 @@ typedef struct {
|
||||
OPAL_DECLSPEC OBJ_CLASS_DECLARATION(opal_diskstats_t);
|
||||
typedef struct {
|
||||
opal_list_item_t super;
|
||||
char *interface;
|
||||
char *net_interface;
|
||||
unsigned long num_bytes_recvd;
|
||||
unsigned long num_packets_recvd;
|
||||
unsigned long num_recv_errs;
|
||||
|
@ -719,7 +719,7 @@ static int unpack_net_stats(opal_buffer_t *buffer, opal_node_stats_t *ns)
|
||||
for (i=0; i < n; i++) {
|
||||
net = OBJ_NEW(opal_netstats_t);
|
||||
m=1;
|
||||
if (OPAL_SUCCESS != (ret = opal_dss_unpack_buffer(buffer, &net->interface, &m, OPAL_STRING))) {
|
||||
if (OPAL_SUCCESS != (ret = opal_dss_unpack_buffer(buffer, &net->net_interface, &m, OPAL_STRING))) {
|
||||
OPAL_ERROR_LOG(ret);
|
||||
OBJ_RELEASE(net);
|
||||
return ret;
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user