Revision 6214e30a transmissionHandler.c

View differences:

transmissionHandler.c
375 375

  
376 376
	// check if that connection already exist
377 377

  
378
	con_id = connection_exist(external_socketID);
378
	con_id = connection_exist(external_socketID, false);
379 379
	if (con_id >= 0) {
380 380
		// if so check if it is ready to use	
381 381
		if (connectbuf[con_id]->status == READY) {
......
1793 1793
}
1794 1794

  
1795 1795

  
1796
int connection_exist(socketID_handle socketID) {
1796
int connection_exist(socketID_handle socketID, bool ready) {
1797 1797
    /*
1798 1798
     * check if another connection for the external connectionID exist
1799 1799
     * that was established \ within the last 2 seconds
......
1801 1801
	int i;
1802 1802
	for (i = 0; i < CONNECTBUFSIZE; i++)
1803 1803
		if (connectbuf[i] != NULL)
1804
			if (compare_socketIDs(&(connectbuf[i]->external_socketID), socketID) == 0)
1804
			if (compare_socketIDs(&(connectbuf[i]->external_socketID), socketID) == 0) {
1805
				if (ready) return (connectbuf[i]->status == READY ? i : -1);;
1805 1806
				return i;
1807
				}
1806 1808

  
1807 1809
    return -1;
1808 1810
}

Also available in: Unified diff