Revision 028bda1f

View differences:

ml.c
195 195

  
196 196
void register_recv_localsocketID_cb(receive_localsocketID_cb local_socketID_cb)
197 197
{
198
	if (local_socketID_cb == NULL)
198
	if (local_socketID_cb == NULL) {
199 199
		error("ML : Register receive_localsocketID_cb: NULL ptr \n");
200
	else
201
	receive_SocketID_cb = local_socketID_cb;
200
	} else {
201
		receive_SocketID_cb = local_socketID_cb;
202
	}
202 203
}
203 204

  
204 205

  
......
1325 1326
/* register callbacks  */
1326 1327
void mlRegisterGetRecvPktInf(get_recv_pkt_inf_cb recv_pkt_inf_cb){
1327 1328

  
1328
	if (recv_pkt_inf_cb == NULL)
1329
	if (recv_pkt_inf_cb == NULL) {
1329 1330
		error("ML: Register get_recv_pkt_inf_cb failed: NULL ptr  \n");
1330
	else
1331
	} else {
1331 1332
		get_Recv_pkt_inf_cb = recv_pkt_inf_cb;
1332

  
1333
	}
1333 1334
}
1334 1335

  
1335 1336
void mlRegisterGetSendPktInf(get_send_pkt_inf_cb  send_pkt_inf_cb){
1336 1337

  
1337
	if (send_pkt_inf_cb == NULL)
1338
	if (send_pkt_inf_cb == NULL) {
1338 1339
		error("ML: Register get_send_pkt_inf_cb: NULL ptr  \n");
1339
	else
1340
	} else {
1340 1341
		get_Send_pkt_inf_cb = send_pkt_inf_cb;
1341

  
1342
	}
1342 1343
}
1343 1344

  
1344 1345

  
1345 1346
void mlRegisterSetMonitoringHeaderPktCb(set_monitoring_header_pkt_cb monitoring_header_pkt_cb ){
1346 1347

  
1347
	if (monitoring_header_pkt_cb == NULL)
1348
	if (monitoring_header_pkt_cb == NULL) {
1348 1349
		error("ML: Register set_monitoring_header_pkt_cb: NULL ptr  \n");
1349
	else
1350
	} else {
1350 1351
		set_Monitoring_header_pkt_cb = monitoring_header_pkt_cb;
1351

  
1352
	}
1352 1353
}
1353 1354

  
1354 1355
void mlRegisterGetRecvDataInf(get_recv_data_inf_cb recv_data_inf_cb){
1355 1356

  
1356
	if (recv_data_inf_cb == NULL)
1357
	if (recv_data_inf_cb == NULL) {
1357 1358
		error("ML: Register get_recv_data_inf_cb: NULL ptr  \n");
1358
	else
1359
	} else {
1359 1360
		get_Recv_data_inf_cb = recv_data_inf_cb;
1360

  
1361
	}
1361 1362
}
1362 1363

  
1363 1364
void mlRegisterGetSendDataInf(get_send_data_inf_cb  send_data_inf_cb){
1364 1365

  
1365
	if (send_data_inf_cb == NULL)
1366
	if (send_data_inf_cb == NULL) {
1366 1367
		error("ML: Register get_send_data_inf_cb: NULL ptr  \n");
1367
	else
1368
	} else {
1368 1369
		get_Send_data_inf_cb = send_data_inf_cb;
1369

  
1370
	}
1370 1371
}
1371 1372

  
1372 1373
void mlRegisterSetMonitoringHeaderDataCb(set_monitoring_header_data_cb monitoring_header_data_cb){
1373 1374

  
1374
	if (monitoring_header_data_cb == NULL)
1375
	if (monitoring_header_data_cb == NULL) {
1375 1376
		error("ML: Register set_monitoring_header_data_cb : NULL ptr  \n");
1376
	else
1377
	set_Monitoring_header_data_cb = monitoring_header_data_cb;
1378

  
1377
	} else {
1378
		set_Monitoring_header_data_cb = monitoring_header_data_cb;
1379
	}
1379 1380
}
1380 1381

  
1381 1382
void mlSetRecvTimeout(struct timeval timeout_value){
......
1409 1410

  
1410 1411
void mlRegisterRecvConnectionCb(receive_connection_cb recv_conn_cb){
1411 1412

  
1412
	if (recv_conn_cb == NULL)
1413
	if (recv_conn_cb == NULL) {
1413 1414
		error("ML: Register receive_connection_cb: NULL ptr  \n");
1414
	else
1415
	}else {
1415 1416
		receive_Connection_cb = recv_conn_cb;
1416

  
1417
	}
1417 1418
}
1418 1419

  
1419 1420
void mlRegisterErrorConnectionCb(connection_failed_cb conn_failed){
1420 1421

  
1421
	if (conn_failed == NULL)
1422
	if (conn_failed == NULL) {
1422 1423
		error("ML: Register connection_failed_cb: NULL ptr  \n");
1423
	else
1424
	failed_Connection_cb = conn_failed;
1425

  
1424
	} else {
1425
		failed_Connection_cb = conn_failed;
1426
	}
1426 1427
}
1427 1428

  
1428 1429
void mlRegisterRecvDataCb(receive_data_cb data_cb,unsigned char msgtype){

Also available in: Unified diff