1 |
/* |
/* |
2 |
* Copyright (C) 2004-2006 Anders Gavare. All rights reserved. |
* Copyright (C) 2004-2007 Anders Gavare. All rights reserved. |
3 |
* |
* |
4 |
* Redistribution and use in source and binary forms, with or without |
* Redistribution and use in source and binary forms, with or without |
5 |
* modification, are permitted provided that the following conditions are met: |
* modification, are permitted provided that the following conditions are met: |
25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: net_ip.c,v 1.4 2006/09/05 06:13:28 debug Exp $ |
* $Id: net_ip.c,v 1.6 2007/06/15 17:02:40 debug Exp $ |
29 |
* |
* |
30 |
* Internet Protocol related networking stuff. |
* Internet Protocol related networking stuff. |
31 |
*/ |
*/ |
1375 |
continue; |
continue; |
1376 |
} |
} |
1377 |
|
|
1378 |
if (net->tcp_connections[con_id].incoming_buf == NULL) { |
if (net->tcp_connections[con_id].incoming_buf == NULL) |
1379 |
net->tcp_connections[con_id].incoming_buf = |
CHECK_ALLOCATION(net->tcp_connections[con_id]. |
1380 |
malloc(TCP_INCOMING_BUF_LEN); |
incoming_buf = malloc(TCP_INCOMING_BUF_LEN)); |
|
if (net->tcp_connections[con_id].incoming_buf == NULL) { |
|
|
printf("out of memory allocating " |
|
|
"incoming_buf for con_id %i\n", con_id); |
|
|
exit(1); |
|
|
} |
|
|
} |
|
1381 |
|
|
1382 |
if (net->tcp_connections[con_id].state >= |
if (net->tcp_connections[con_id].state >= |
1383 |
TCP_OUTSIDE_DISCONNECTED) |
TCP_OUTSIDE_DISCONNECTED) |