Functions connection_{get_host,create} static.
[pazpar2-moved-to-github.git] / src / connection.c
index f2b48e4..cdbe4da 100644 (file)
@@ -86,12 +86,11 @@ static struct connection *connection_freelist = 0;
 static int connection_is_idle(struct connection *co)
 {
     ZOOM_connection link = co->link;
-    int event = ZOOM_connection_peek_event(link);
+    int event;
 
-    if (co->state != Conn_Open)
+    if (co->state != Conn_Open || !link)
         return 0;
 
-    link = co->link;
     event = ZOOM_connection_peek_event(link);
     if (event == ZOOM_EVENT_NONE ||
                 event == ZOOM_EVENT_END)
@@ -165,7 +164,7 @@ void connection_destroy(struct connection *co)
 
 // Creates a new connection for client, associated with the host of 
 // client's database
-struct connection *connection_create(struct client *cl)
+static struct connection *connection_create(struct client *cl)
 {
     struct connection *new;
     struct host *host = client_get_host(cl);
@@ -318,7 +317,7 @@ void connect_resolver_host(struct host *host)
     }
 }
 
-struct host *connection_get_host(struct connection *con)
+static struct host *connection_get_host(struct connection *con)
 {
     return con->host;
 }
@@ -480,13 +479,6 @@ int client_prep_connection(struct client *cl)
         return 0;
 }
 
-// DELETEME
-
-
-int connection_send_apdu(struct connection *co, Z_APDU *a){return 10;}
-
-
-
 /*
  * Local variables:
  * c-basic-offset: 4