Handle zero-length iovecs in multicast messages
This commit was SVN r22507.
Этот коммит содержится в:
родитель
5dc71d85ed
Коммит
86dd1d41af
@ -383,10 +383,12 @@ process:
|
|||||||
ORTE_ERROR_LOG(rc);
|
ORTE_ERROR_LOG(rc);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
/* pack the bytes */
|
if (0 < tmp32) {
|
||||||
if (ORTE_SUCCESS != (rc = opal_dss.pack(&buf, snd->iovec_array[sz].iov_base, tmp32, OPAL_UINT8))) {
|
/* pack the bytes */
|
||||||
ORTE_ERROR_LOG(rc);
|
if (ORTE_SUCCESS != (rc = opal_dss.pack(&buf, snd->iovec_array[sz].iov_base, tmp32, OPAL_UINT8))) {
|
||||||
goto cleanup;
|
ORTE_ERROR_LOG(rc);
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -978,14 +980,17 @@ static void process_recv(int fd, short event, void *cbdata)
|
|||||||
ORTE_ERROR_LOG(rc);
|
ORTE_ERROR_LOG(rc);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
/* allocate the space */
|
iovec_array[i].iov_base = NULL;
|
||||||
iovec_array[i].iov_base = (uint8_t*)malloc(sz);
|
|
||||||
iovec_array[i].iov_len = sz;
|
iovec_array[i].iov_len = sz;
|
||||||
/* unpack the data */
|
if (0 < sz) {
|
||||||
if (ORTE_SUCCESS != (rc = opal_dss.unpack(buf, iovec_array[i].iov_base, &sz, OPAL_UINT8))) {
|
/* allocate the space */
|
||||||
ORTE_ERROR_LOG(rc);
|
iovec_array[i].iov_base = (uint8_t*)malloc(sz);
|
||||||
goto cleanup;
|
/* unpack the data */
|
||||||
}
|
if (ORTE_SUCCESS != (rc = opal_dss.unpack(buf, iovec_array[i].iov_base, &sz, OPAL_UINT8))) {
|
||||||
|
ORTE_ERROR_LOG(rc);
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (1 == flag && NULL == recvd_buf) {
|
} else if (1 == flag && NULL == recvd_buf) {
|
||||||
/* buffer was included */
|
/* buffer was included */
|
||||||
|
@ -872,14 +872,17 @@ static void process_recv(int fd, short event, void *cbdata)
|
|||||||
ORTE_ERROR_LOG(rc);
|
ORTE_ERROR_LOG(rc);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
/* allocate the space */
|
iovec_array[i].iov_base = NULL;
|
||||||
iovec_array[i].iov_base = (uint8_t*)malloc(sz);
|
|
||||||
iovec_array[i].iov_len = sz;
|
iovec_array[i].iov_len = sz;
|
||||||
/* unpack the data */
|
if (0 < sz) {
|
||||||
if (ORTE_SUCCESS != (rc = opal_dss.unpack(&buf, iovec_array[i].iov_base, &sz, OPAL_UINT8))) {
|
/* allocate the space */
|
||||||
ORTE_ERROR_LOG(rc);
|
iovec_array[i].iov_base = (uint8_t*)malloc(sz);
|
||||||
goto cleanup;
|
/* unpack the data */
|
||||||
}
|
if (ORTE_SUCCESS != (rc = opal_dss.unpack(&buf, iovec_array[i].iov_base, &sz, OPAL_UINT8))) {
|
||||||
|
ORTE_ERROR_LOG(rc);
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (1 == flag && NULL == recvd_buf) {
|
} else if (1 == flag && NULL == recvd_buf) {
|
||||||
/* buffer was included */
|
/* buffer was included */
|
||||||
@ -1220,10 +1223,12 @@ static void xmit_data(int sd, short flags, void* send_req)
|
|||||||
ORTE_ERROR_LOG(rc);
|
ORTE_ERROR_LOG(rc);
|
||||||
goto CLEANUP;
|
goto CLEANUP;
|
||||||
}
|
}
|
||||||
/* pack the bytes */
|
if (0 < tmp32) {
|
||||||
if (ORTE_SUCCESS != (rc = opal_dss.pack(&buf, snd->iovec_array[sz].iov_base, tmp32, OPAL_UINT8))) {
|
/* pack the bytes */
|
||||||
ORTE_ERROR_LOG(rc);
|
if (ORTE_SUCCESS != (rc = opal_dss.pack(&buf, snd->iovec_array[sz].iov_base, tmp32, OPAL_UINT8))) {
|
||||||
goto CLEANUP;
|
ORTE_ERROR_LOG(rc);
|
||||||
|
goto CLEANUP;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user