[Issue#] SSDWSSP-433
[Bug] N/A
[Cause] Changed API of libsmack.
[Problem] Function smack_new_label_from_socket() is now returning value greater than 0 on success, not 0 as it was before.
[Solution] Changes of expected function results
[Verification] Run tests.
Change-Id: I89aa91e69fccb0091dfb1eccd2fc2d6347cfcf3b
if (smack_check())
{
ret = smack_new_label_from_socket(sockfd, &smack_label);
- if (ret != 0)
+ if (ret < 0)
{
SEC_SVR_ERR("Error checking peer label: %d", ret);
free(added);
return SECURITY_SERVER_API_ERROR_INPUT_PARAM;
ret = smack_new_label_from_socket(sockfd, &subject);
- if (ret == 0) {
+ if (ret >= 0) {
subjectPtr.reset(subject);
subject = NULL;
} else {
return label;
}
- if (smack_new_label_from_socket(fd, &label) != 0)
+ if (smack_new_label_from_socket(fd, &label) < 0)
{
LogError("Client ERROR: Unable to get socket SMACK label");
return NULL;
}
retval = smack_new_label_from_socket(sockfd, &label);
- if (retval != 0) {
+ if (retval < 0) {
SEC_SVR_ERR("%s", "Error in getting label from socket");
retval = -1;
goto end;