+ if (rc)
+ return 0; /* yes version 2 */
+
+#if defined(WITH_LEGACY_BINDING_VDYN)
+ /* try the version dyn */
+ rc = afb_api_so_vdyn_add(path, handle, declare_set, call_set);
+ if (rc < 0) {
+ /* error when loading a valid dyn binding */
+ goto error2;
+ }
+ if (rc)
+ return 0; /* yes version dyn */
+#else
+ if (dlsym(handle, "afbBindingVdyn")) {
+ WARNING("binding [%s]: version DYN not supported", path);
+ obsolete = 1;
+ }
+#endif
+
+#if defined(WITH_LEGACY_BINDING_V1)
+ /* try the version 1 */
+ rc = afb_api_so_v1_add(path, handle, declare_set, call_set);
+ if (rc < 0) {
+ /* error when loading a valid v1 binding */
+ goto error2;
+ }
+ if (rc)
+ return 0; /* yes version 1 */
+#else
+ if (dlsym(handle, "afbBindingV1Register")) {
+ WARNING("binding [%s]: version 1 not supported", path);
+ obsolete = 1;
+ }
+#endif
+
+ /* not a valid binding */
+ _VERBOSE_(force ? Log_Level_Error : Log_Level_Info, "binding [%s] %s",
+ path, obsolete ? "is obsolete" : "isn't an AFB binding");