@brief search for available sessions an return index. * @return return index of free session in anRegisteredSessions. * kInvalidSession .. no free session available */
| 751 | * kInvalidSession .. no free session available |
| 752 | */ |
| 753 | int GetFreeSessionIndex(void) { |
| 754 | for (size_t session_index = 0; |
| 755 | session_index < OPENER_NUMBER_OF_SUPPORTED_SESSIONS; |
| 756 | session_index++) { |
| 757 | if (kEipInvalidSocket == g_registered_sessions[session_index]) { |
| 758 | return session_index; |
| 759 | } |
| 760 | } |
| 761 | return kSessionStatusInvalid; |
| 762 | } |
| 763 | |
| 764 | /** @brief copy data from pa_buf in little endian to host in structure. |
| 765 | * @param receive_buffer Received message |
no outgoing calls
no test coverage detected