Mercurial > hg > freeDiameter
comparison freeDiameter/sctp.c @ 192:acf6ffad7dbf
Added a small check
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Fri, 05 Feb 2010 18:38:08 +0900 |
parents | e81a27807172 |
children | ee247ce69349 |
comparison
equal
deleted
inserted
replaced
191:de80f6a76c4f | 192:acf6ffad7dbf |
---|---|
970 socklen_t sz = sizeof(status); | 970 socklen_t sz = sizeof(status); |
971 int ret; | 971 int ret; |
972 | 972 |
973 memset(&status, 0, sizeof(status)); | 973 memset(&status, 0, sizeof(status)); |
974 /* Attempt to use SCTP_STATUS message to retrieve the primary address */ | 974 /* Attempt to use SCTP_STATUS message to retrieve the primary address */ |
975 ret = getsockopt(sock, IPPROTO_SCTP, SCTP_STATUS, &status, &sz); | 975 CHECK_SYS_DO( ret = getsockopt(sock, IPPROTO_SCTP, SCTP_STATUS, &status, &sz), /* continue */); |
976 if (sz != sizeof(status)) | 976 if (sz != sizeof(status)) |
977 ret = -1; | 977 ret = -1; |
978 sz = sizeof(sSS); | 978 sz = sizeof(sSS); |
979 if (ret < 0) | 979 if (ret < 0) |
980 { | 980 { |