+GLOBAL VOID
+Conf_UnsetServer( CONN_ID Idx )
+{
+ /* Set next time for next connection attempt, if this is a server
+ * link that is (still) configured here. If the server is set as
+ * "once", delete it from our configuration.
+ * Non-Server-Connections will be silently ignored. */
+
+ INT i;
+
+ /* Check all our configured servers */
+ for( i = 0; i < MAX_SERVERS; i++ )
+ {
+ if( Conf_Server[i].conn_id != Idx ) continue;
+
+ /* Gotcha! Mark server configuration as "unused": */
+ Conf_Server[i].conn_id = NONE;
+
+ if( Conf_Server[i].once )
+ {
+ /* Delete configuration here */
+ Init_Server_Struct( &Conf_Server[i] );
+ }
+ else
+ {
+ /* Set time for next connect attempt */
+ if( Conf_Server[i].lasttry < time( NULL ) - Conf_ConnectRetry )
+ {
+ /* Okay, the connection was established "long enough": */
+ Conf_Server[i].lasttry = time( NULL ) - Conf_ConnectRetry + RECONNECT_DELAY;
+ }
+ }
+ break;
+ }
+} /* Conf_UnsetServer */
+
+
+GLOBAL VOID
+Conf_SetServer( INT ConfServer, CONN_ID Idx )
+{
+ /* Set connection for specified configured server */
+
+ assert( ConfServer > NONE );
+ assert( Idx > NONE );
+
+ Conf_Server[ConfServer].conn_id = Idx;
+} /* Conf_SetServer */
+
+
+GLOBAL INT
+Conf_GetServer( CONN_ID Idx )
+{
+ /* Get index of server in configuration structure */
+
+ INT i;
+
+ assert( Idx > NONE );
+
+ for( i = 0; i < MAX_SERVERS; i++ )
+ {
+ if( Conf_Server[i].conn_id == Idx ) return i;
+ }
+ return NONE;
+} /* Conf_GetServer */
+
+