]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - client_common.c
Merge branch 'maint'
[paraslash.git] / client_common.c
index 9bcfcb827bb867674f8363f1d114b349c2fc7f76..95e59fd29de2015fcc65443a4ffc6442387ec0f8 100644 (file)
@@ -255,9 +255,15 @@ static int send_sb_command(struct client_task *ct)
        return send_sb(ct, 0, command, len, SBD_COMMAND, false);
 }
 
+/* Find out if the given string is contained in the features vector. */
 static bool has_feature(const char *feature, struct client_task *ct)
 {
-       return find_arg(feature, ct->features) >= 0? true : false;
+       if (!ct->features)
+               return false;
+       for (int i = 0; ct->features[i]; i++)
+               if (strcmp(feature, ct->features[i]) == 0)
+                       return i;
+       return false;
 }
 
 /*