]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - mac/macterm.c
Rationalise access to, and content of, backends[] array.
[PuTTY.git] / mac / macterm.c
index dad2688336251bbffa43c4447d4dd8c008cac163..4a75a0c6018be939f8a8108ca05c3be1e604e343 100644 (file)
@@ -115,12 +115,7 @@ void mac_startsession(Session *s)
      * Select protocol. This is farmed out into a table in a
      * separate file to enable an ssh-free variant.
      */
-    s->back = NULL;
-    for (i = 0; backends[i].backend != NULL; i++)
-       if (backends[i].protocol == s->cfg.protocol) {
-           s->back = backends[i].backend;
-           break;
-       }
+    s->back = backend_from_proto(s->cfg.protocol);
     if (s->back == NULL)
        fatalbox("Unsupported protocol number found");