ha_ReConnectAttach()

Reopen a connection while performing recovery

Synopsis:

#include <ha/neutrino.h>
    
int ha_ReConnectAttach(int oldcoid,
                       uint32_t nd, 
                       pid_t pid,
                       int chid,
                       unsigned index,
                       unsigned flags);

Library:

libha

Description:

You can use the ha_ReConnectAttach() convenience function to reopen a connection while in the recovery phase. The oldcoid argument refers to the connection that has failed. The ha_ReConnectAttach() function closes the previous connection and opens a new connection using the parameters specified by calling ConnectAttach().

The ha_ReConnectAttach() function also verifies that the new connection ID returned is the same as the oldcoid (as required by the HA library mechanism).

Returns:

A new connection ID or -1 if an error occurred (errno is set).

Errors:

The ha_ReConnectAttach() call returns errors as returned by the underlying ConnectAttach() call.

Classification:

QNX Neutrino

Safety:  
Cancellation point No
Interrupt handler No
Signal handler No
Thread Yes