|
@@ -256,6 +256,18 @@ cmUdpRC_t cmUdpInit(
|
256
|
256
|
|
257
|
257
|
}
|
258
|
258
|
|
|
259
|
+ // if broadcast option was requested.
|
|
260
|
+ if( cmIsFlag(flags,kBroadcastUdpFl) )
|
|
261
|
+ {
|
|
262
|
+ int bcastFl = 1;
|
|
263
|
+ if( setsockopt( p->sockH, SOL_SOCKET, SO_BROADCAST, &bcastFl, sizeof(bcastFl) ) == cmUdp_SYS_ERR )
|
|
264
|
+ {
|
|
265
|
+ rc = cmErrSysMsg(&p->err,kSockOptSetFailUdpRC,errno, "Attempt to set the socket broadcast attribute failed." );
|
|
266
|
+ goto errLabel;
|
|
267
|
+ }
|
|
268
|
+
|
|
269
|
+ }
|
|
270
|
+
|
259
|
271
|
if( recvBufByteCnt != 0 )
|
260
|
272
|
p->tempBuf = cmMemAlloc(char,recvBufByteCnt );
|
261
|
273
|
|