[packages/efl] - rel 3, various fixes
arekm
arekm at pld-linux.org
Fri Sep 25 15:34:38 CEST 2026
commit a580f76ab7b7f9d09a1e505089fbba0118ab7afd
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Fri Sep 25 15:33:46 2026 +0200
- rel 3, various fixes
21d44d856bfe244a723c95478b9e15bc989079f2.patch | 23 ++++
bb32bb8fc2993662ac7bcb46d3556744faaf8e91.patch | 24 ++++
e199f6bf4c97b62814a7710337356742406b3d25.patch | 165 +++++++++++++++++++++++++
efl.spec | 84 ++++++++-----
4 files changed, 267 insertions(+), 29 deletions(-)
---
diff --git a/efl.spec b/efl.spec
index b017c74..27197d4 100644
--- a/efl.spec
+++ b/efl.spec
@@ -1,5 +1,4 @@
# TODO:
-# - use system liblinebreak?
# - efl-devel conflicts with libeio-devel
# file /usr/lib64/libeio.so from install of eio-devel-0.1.0.65643-1.x86_64 conflicts with file from package libeio-devel-1.0-1.x86_64
#
@@ -23,7 +22,7 @@ Summary: EFL - The Enlightenment Foundation Libraries
Summary(pl.UTF-8): EFL (Enlightenment Foundation Libraries) - biblioteki tworzące Enlightment
Name: efl
Version: 1.28.1
-Release: 2
+Release: 3
License: LGPL v2.1+, BSD (depends on component)
Group: Libraries
Source0: https://download.enlightenment.org/rel/libs/efl/%{name}-%{version}.tar.xz
@@ -36,15 +35,22 @@ Patch4: 60217eff9672e55c67454df13a16236d106fc92f.patch
Patch5: 628c40cce2de0a18818b40615d3351b0c9e9b889.patch
Patch6: fc4c5ec8afc3d1d145eff9807e5235ae6bfeea83.patch
Patch7: 6d47ea358c4ece8ecc94a8aaf8f501e8cdea24fb.patch
+# HTTP dialer (ecore_con_url) mishandles curl >= 8.20 socket callbacks: aborted transfers, stale fd handlers
+Patch8: 21d44d856bfe244a723c95478b9e15bc989079f2.patch
+Patch9: e199f6bf4c97b62814a7710337356742406b3d25.patch
+Patch10: bb32bb8fc2993662ac7bcb46d3556744faaf8e91.patch
URL: https://www.enlightenment.org/docs/efl/start
BuildRequires: EGL-devel
+%if %{with drm}
BuildRequires: Mesa-libEGL-devel
-BuildRequires: OpenGL-GLX-devel
+BuildRequires: Mesa-libgbm-devel
+%endif
+BuildRequires: OpenGLESv2-devel
%{?with_sdl:BuildRequires: SDL2-devel >= 2.0.0}
BuildRequires: avahi-devel
BuildRequires: bullet-devel >= 2.80
+BuildRequires: check-devel
BuildRequires: dbus-devel
-BuildRequires: doxygen
BuildRequires: fontconfig-devel >= 2.5.0
# pkgconfig(freetype2) >= 9.3.0
BuildRequires: freetype-devel >= 1:2.2
@@ -58,16 +64,24 @@ BuildRequires: gstreamer-plugins-base-devel >= 1.0
%endif
%{?with_harfbuzz:BuildRequires: harfbuzz-devel >= 0.9.0}
BuildRequires: ibus-devel >= 1.4
-%{?with_drm:BuildRequires: libdrm-devel >= 2.4}
+BuildRequires: libinput-devel >= 1.7.0
BuildRequires: libjpeg-devel
BuildRequires: libmount-devel >= 2.19.1
BuildRequires: libpng-devel >= 1.2.10
+BuildRequires: libraw-devel
+BuildRequires: librsvg-devel
BuildRequires: libsndfile-devel
+BuildRequires: libspectre-devel
BuildRequires: libstdc++-devel
BuildRequires: libtiff-devel
+BuildRequires: libunibreak-devel >= 4.2
+%ifarch %{ix86} %{x8664} x32 %{arm} aarch64 hppa ia64 mips ppc ppc64 sh
+BuildRequires: libunwind-devel
+%endif
BuildRequires: libwebp-devel
-%{!?with_luajit:BuildRequires: lua51 >= 5.1.0}
-%{?with_luajit:BuildRequires: luajit >= 2.0.0}
+%{!?with_luajit:BuildRequires: lua51-devel >= 5.1.0}
+%{?with_luajit:BuildRequires: luajit-devel >= 2.0.0}
+BuildRequires: lz4-devel
BuildRequires: meson
BuildRequires: ninja >= 1.5
BuildRequires: openjpeg2-devel >= 2
@@ -76,16 +90,15 @@ BuildRequires: openssl-devel
BuildRequires: pixman-devel
%endif
BuildRequires: pkgconfig >= 1:0.22
+BuildRequires: poppler-cpp-devel
BuildRequires: pulseaudio-devel
BuildRequires: rpmbuild(macros) >= 2.042
%{?with_scim:BuildRequires: scim-devel}
BuildRequires: sed >= 4.0
%{?with_systemd:BuildRequires: systemd-devel >= 1:209}
-BuildRequires: tslib-devel
BuildRequires: udev-devel >= 1:148
-%if %{with drm} || %{with wayland}
+BuildRequires: wayland-devel >= 1.3.0
BuildRequires: xorg-lib-libxkbcommon-devel >= 0.3.0
-%endif
BuildRequires: zlib-devel >= 1.2.3
BuildRequires: xorg-lib-libX11-devel
BuildRequires: xorg-lib-libXScrnSaver-devel
@@ -96,25 +109,25 @@ BuildRequires: xorg-lib-libXext-devel
BuildRequires: xorg-lib-libXfixes-devel
BuildRequires: xorg-lib-libXi-devel >= 1.6
BuildRequires: xorg-lib-libXinerama-devel
-BuildRequires: xorg-lib-libXp-devel
BuildRequires: xorg-lib-libXrandr-devel >= 1.3.3
BuildRequires: xorg-lib-libXrender-devel
BuildRequires: xorg-lib-libXtst-devel
%if %{with wayland}
-BuildRequires: wayland-devel >= 1.3.0
-BuildRequires: EGL-devel
-BuildRequires: pkgconfig(egl)
BuildRequires: wayland-egl-devel >= 1.3.0
+BuildRequires: wayland-protocols
+BuildRequires: xorg-lib-libxkbcommon-x11-devel
%endif
-Requires: SDL2 >= 2.0.0
+%{?with_sdl:Requires: SDL2 >= 2.0.0}
Requires: bullet >= 2.80
Requires: dbus
Requires: fontconfig-libs >= 2.5.0
Requires: freetype >= 1:2.2
Requires: fribidi >= 0.19.2
+%if %{with gstreamer}
Requires: gstreamer >= 1.0
Requires: gstreamer-plugins-base >= 1.0
-Requires: harfbuzz >= 0.9.0
+%endif
+%{?with_harfbuzz:Requires: harfbuzz >= 0.9.0}
Requires: ibus >= 1.4
Requires: libdrm >= 2.4
Requires: libmount >= 2.19.1
@@ -125,7 +138,7 @@ Requires: libpng >= 1.2.10
%{?with_systemd:Requires: systemd-libs >= 1:192}
Requires: udev-libs >= 1:148
Requires: wayland >= 1.3.0
-Requires: wayland-egl >= 1.3.0
+%{?with_wayland:Requires: wayland-egl >= 1.3.0}
Requires: xorg-lib-libXi >= 1.6
Requires: xorg-lib-libXrandr >= 1.3.3
Requires: xorg-lib-libxkbcommon >= 0.3.0
@@ -242,8 +255,10 @@ Enlightment.
%package devel
Summary: EFL - The Enlightenment Foundation Libraries
Summary(pl.UTF-8): EFL (Enlightenment Foundation Libraries) - biblioteki tworzące Enlightment
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
Requires: EGL-devel
-Requires: SDL2-devel >= 2.0.0
+%{?with_sdl:Requires: SDL2-devel >= 2.0.0}
Requires: avahi-devel
Requires: bullet-devel >= 2.80
Requires: dbus-devel
@@ -251,8 +266,7 @@ Requires: fontconfig-devel >= 2.5.0
Requires: freetype-devel >= 1:2.2
Requires: fribidi-devel >= 0.19.2
Requires: glib2-devel >= 2.0
-Requires: harfbuzz-devel >= 0.9.0
-Requires: libdrm-devel >= 2.4
+%{?with_harfbuzz:Requires: harfbuzz-devel >= 0.9.0}
Requires: libjpeg-devel
Requires: libmount-devel >= 2.19.1
Requires: libsndfile-devel
@@ -263,10 +277,9 @@ Requires: openssl-devel
Requires: pkgconfig(egl)
Requires: pulseaudio-devel
%{?with_systemd:Requires: systemd-devel >= 1:209}
-Requires: tslib-devel
Requires: udev-devel >= 1:148
Requires: wayland-devel >= 1.3.0
-Requires: wayland-egl-devel >= 1.3.0
+%{?with_wayland:Requires: wayland-egl-devel >= 1.3.0}
Requires: xorg-lib-libX11-devel
Requires: xorg-lib-libXScrnSaver-devel
Requires: xorg-lib-libXcomposite-devel
@@ -276,7 +289,6 @@ Requires: xorg-lib-libXext-devel
Requires: xorg-lib-libXfixes-devel
Requires: xorg-lib-libXi-devel >= 1.6
Requires: xorg-lib-libXinerama-devel
-Requires: xorg-lib-libXp-devel
Requires: xorg-lib-libXrandr-devel >= 1.3.3
Requires: xorg-lib-libXrender-devel
Requires: xorg-lib-libXtst-devel
@@ -335,6 +347,8 @@ Enlightment.
%package static
Summary: EFL - The Enlightenment Foundation Libraries
Summary(pl.UTF-8): EFL (Enlightenment Foundation Libraries) - biblioteki tworzące Enlightment
+Group: Development/Libraries
+Requires: %{name}-devel = %{version}-%{release}
Obsoletes: ecore-audio-static < 1.27.0
Obsoletes: ecore-avahi-static < 1.27.0
Obsoletes: ecore-con-static < 1.27.0
@@ -385,6 +399,9 @@ Enlightment.
%patch -P5 -p1
%patch -P6 -p1
%patch -P7 -p1
+%patch -P8 -p1
+%patch -P9 -p1
+%patch -P10 -p1
%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python3(\s|$),#!%{__python3}\1,' \
src/bin/exactness/exactness_play.in \
@@ -398,8 +415,10 @@ Enlightment.
-Delua=true \
-Dbuffer=true \
-Davahi=true \
+ -Dembedded-libunibreak=false \
+ -Dembedded-lz4=false \
%{?with_drm:-Ddrm=true} \
- %{?with_fb:-Dfbtrue} \
+ %{?with_fb:-Dfb=true} \
%{!?with_gstreamer:-Dgstreamer=false} \
%{!?with_harfbuzz:-Dharfbuzz=false} \
%{?with_luajit:-Dlua-interpreter=luajit} \
@@ -521,8 +540,10 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_libdir}/libethumb_client.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libevas.so.1
%attr(755,root,root) %{_libdir}/libevas.so.*.*.*
+%if %{with drm}
%attr(755,root,root) %ghost %{_libdir}/libecore_drm2.so.1
%attr(755,root,root) %{_libdir}/libecore_drm2.so.*.*.*
+%endif
%attr(755,root,root) %ghost %{_libdir}/libector.so.1
%attr(755,root,root) %{_libdir}/libector.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libefl.so.1
@@ -560,9 +581,11 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_libdir}/ecore_con/utils/%{arch_tag}/efl_net_proxy_helper
%dir %{_libdir}/ecore_evas
%dir %{_libdir}/ecore_evas/engines
+%if %{with drm}
%dir %{_libdir}/ecore_evas/engines/drm
%dir %{_libdir}/ecore_evas/engines/drm/%{arch_tag}
%attr(755,root,root) %{_libdir}/ecore_evas/engines/drm/%{arch_tag}/module.so
+%endif
%dir %{_libdir}/ecore_evas/engines/extn
%dir %{_libdir}/ecore_evas/engines/extn/%{arch_tag}
%attr(755,root,root) %{_libdir}/ecore_evas/engines/extn/%{arch_tag}/module.so
@@ -687,14 +710,14 @@ rm -rf $RPM_BUILD_ROOT
%dir %{_libdir}/evas/modules/engines/drm
%dir %{_libdir}/evas/modules/engines/drm/%{arch_tag}
%attr(755,root,root) %{_libdir}/evas/modules/engines/drm/%{arch_tag}/module.so
+%dir %{_libdir}/evas/modules/engines/gl_drm
+%dir %{_libdir}/evas/modules/engines/gl_drm/%{arch_tag}
+%attr(755,root,root) %{_libdir}/evas/modules/engines/gl_drm/%{arch_tag}/module.so
%endif
%dir %{_libdir}/evas/modules/image_loaders
%dir %{_libdir}/evas/modules/engines/buffer
%dir %{_libdir}/evas/modules/engines/buffer/%{arch_tag}
%attr(755,root,root) %{_libdir}/evas/modules/engines/buffer/%{arch_tag}/module.so
-%dir %{_libdir}/evas/modules/engines/gl_drm
-%dir %{_libdir}/evas/modules/engines/gl_drm/%{arch_tag}
-%attr(755,root,root) %{_libdir}/evas/modules/engines/gl_drm/%{arch_tag}/module.so
%dir %{_libdir}/evas/modules/engines/gl_generic
%dir %{_libdir}/evas/modules/engines/gl_generic/%{arch_tag}
%attr(755,root,root) %{_libdir}/evas/modules/engines/gl_generic/%{arch_tag}/module.so
@@ -769,6 +792,7 @@ rm -rf $RPM_BUILD_ROOT
%endif
%{_datadir}/dbus-1/services/org.enlightenment.Ethumb.service
%{_datadir}/ecore
+%{_datadir}/ecore_con
%{_datadir}/ecore_imf
%{_datadir}/ecore_x
%{_datadir}/edje
@@ -807,7 +831,6 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_libdir}/libecore_avahi.so
%attr(755,root,root) %{_libdir}/libecore_buffer.so
%attr(755,root,root) %{_libdir}/libecore_con.so
-%attr(755,root,root) %{_libdir}/libecore_drm2.so
%attr(755,root,root) %{_libdir}/libecore_evas.so
%attr(755,root,root) %{_libdir}/libecore_file.so
%attr(755,root,root) %{_libdir}/libecore_imf_evas.so
@@ -848,7 +871,6 @@ rm -rf $RPM_BUILD_ROOT
%{_includedir}/ecore-input-1
%{_includedir}/ecore-input-evas-1
%{_includedir}/ecore-ipc-1
-%{_includedir}/ecore-drm2-1
%{_includedir}/elput-1
%{_includedir}/emile-1
%{_includedir}/ecore-x-1
@@ -908,6 +930,10 @@ rm -rf $RPM_BUILD_ROOT
%dir %{_datadir}/eo
%{_datadir}/eo/gdb
%{_datadir}/gdb/auto-load/usr/lib/libeo.so.%{version}-gdb.py
+%if %{with drm}
+%attr(755,root,root) %{_libdir}/libecore_drm2.so
+%{_includedir}/ecore-drm2-1
+%endif
%if %{with fb}
%attr(755,root,root) %{_libdir}/libecore_fb.so
%{_includedir}/ecore-fb-1
diff --git a/21d44d856bfe244a723c95478b9e15bc989079f2.patch b/21d44d856bfe244a723c95478b9e15bc989079f2.patch
new file mode 100644
index 0000000..0c211ac
--- /dev/null
+++ b/21d44d856bfe244a723c95478b9e15bc989079f2.patch
@@ -0,0 +1,23 @@
+From 21d44d856bfe244a723c95478b9e15bc989079f2 Mon Sep 17 00:00:00 2001
+From: "Carsten Haitzler (Rasterman)" <raster at rasterman.com>
+Date: Thu, 22 May 2025 10:09:24 +0100
+Subject: [PATCH] ecore-con - dont make a still alive http con an error - debug
+ instead
+
+---
+ src/lib/ecore_con/efl_net_dialer_http.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/lib/ecore_con/efl_net_dialer_http.c b/src/lib/ecore_con/efl_net_dialer_http.c
+index 1734253a50..e291914820 100644
+--- a/src/lib/ecore_con/efl_net_dialer_http.c
++++ b/src/lib/ecore_con/efl_net_dialer_http.c
+@@ -1752,7 +1752,7 @@ _efl_net_dialer_http_efl_io_closer_close(Eo *o, Efl_Net_Dialer_Http_Data *pd)
+ }
+ if (pd->fdhandler)
+ {
+- ERR("dialer=%p fdhandler=%p still alive!", o, pd->fdhandler);
++ DBG("dialer=%p fdhandler=%p still alive!", o, pd->fdhandler);
+ efl_del(pd->fdhandler);
+ pd->fdhandler = NULL;
+ }
diff --git a/bb32bb8fc2993662ac7bcb46d3556744faaf8e91.patch b/bb32bb8fc2993662ac7bcb46d3556744faaf8e91.patch
new file mode 100644
index 0000000..82accf1
--- /dev/null
+++ b/bb32bb8fc2993662ac7bcb46d3556744faaf8e91.patch
@@ -0,0 +1,24 @@
+From bb32bb8fc2993662ac7bcb46d3556744faaf8e91 Mon Sep 17 00:00:00 2001
+From: "Carsten Haitzler (Rasterman)" <raster at rasterman.com>
+Date: Thu, 6 Aug 2026 13:55:48 +0100
+Subject: [PATCH] ecore-con: url - use unref not del for parentless objects
+
+warning fixed
+ at fix
+---
+ src/lib/ecore_con/efl_net_dialer_http.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/lib/ecore_con/efl_net_dialer_http.c b/src/lib/ecore_con/efl_net_dialer_http.c
+index ba79307c9b..0b183953ee 100644
+--- a/src/lib/ecore_con/efl_net_dialer_http.c
++++ b/src/lib/ecore_con/efl_net_dialer_http.c
+@@ -1778,7 +1778,7 @@ _efl_net_dialer_http_efl_io_closer_close(Eo *o, Efl_Net_Dialer_Http_Data *pd)
+ if (pd->fdhandler)
+ {
+ DBG("dialer=%p fdhandler=%p still alive!", o, pd->fdhandler);
+- efl_del(pd->fdhandler);
++ efl_unref(pd->fdhandler);
+ pd->fdhandler = NULL;
+ }
+
diff --git a/e199f6bf4c97b62814a7710337356742406b3d25.patch b/e199f6bf4c97b62814a7710337356742406b3d25.patch
new file mode 100644
index 0000000..035aaea
--- /dev/null
+++ b/e199f6bf4c97b62814a7710337356742406b3d25.patch
@@ -0,0 +1,165 @@
+From e199f6bf4c97b62814a7710337356742406b3d25 Mon Sep 17 00:00:00 2001
+From: Alastair Poole <netstar at netstar.im>
+Date: Sat, 2 May 2026 16:26:48 +0100
+Subject: [PATCH] ecore_con: fix HTTP dialer with curl 8.20 multi callbacks
+
+curl 8.20 may invoke multi socket callbacks during
+curl_multi_add_handle() for easy handles that are not the dialer's own
+easy handle. efl_net_dialer_http assumed every socket callback could be
+mapped through CURLINFO_PRIVATE and returned an error when that was not
+true, which made curl report the transfer as aborted by callback.
+
+Register the dialer before adding the easy handle, allow socket
+management for non-dialer/internal easy handles, and only attach the fd
+handler to the dialer state when the easy handle matches.
+
+Also handle the multi timer callback's negative timeout as a request to
+delete/disable the timer, and refresh the local CURLMcode copy/error
+mapping for newer libcurl multi errors.
+---
+ src/lib/ecore_con/ecore_con_url_curl.c | 5 +++
+ src/lib/ecore_con/ecore_con_url_curl.h | 6 +++
+ src/lib/ecore_con/efl_net_dialer_http.c | 55 ++++++++++++++++++-------
+ 3 files changed, 51 insertions(+), 15 deletions(-)
+
+diff --git a/src/lib/ecore_con/ecore_con_url_curl.c b/src/lib/ecore_con/ecore_con_url_curl.c
+index e107767e7eb..bea0ff0b171 100644
+--- a/src/lib/ecore_con/ecore_con_url_curl.c
++++ b/src/lib/ecore_con/ecore_con_url_curl.c
+@@ -161,6 +161,11 @@ _curlmcode_to_eina_error(const CURLMcode code)
+ case CURLM_BAD_SOCKET: return ENOTSOCK;
+ case CURLM_UNKNOWN_OPTION: return EINVAL;
+ case CURLM_ADDED_ALREADY: return EALREADY;
++ case CURLM_RECURSIVE_API_CALL: return EBUSY;
++ case CURLM_WAKEUP_FAILURE: return EIO;
++ case CURLM_BAD_FUNCTION_ARGUMENT: return EINVAL;
++ case CURLM_ABORTED_BY_CALLBACK: return ECONNABORTED;
++ case CURLM_UNRECOVERABLE_POLL: return EIO;
+
+ default:
+ ERR("unexpected error CURLMcode=%d '%s', not mapped",
+diff --git a/src/lib/ecore_con/ecore_con_url_curl.h b/src/lib/ecore_con/ecore_con_url_curl.h
+index ed68e5c4f40..6791cd81dfa 100644
+--- a/src/lib/ecore_con/ecore_con_url_curl.h
++++ b/src/lib/ecore_con/ecore_con_url_curl.h
+@@ -30,6 +30,12 @@ typedef enum
+ CURLM_UNKNOWN_OPTION, /* curl_multi_setopt() with unsupported option */
+ CURLM_ADDED_ALREADY, /* an easy handle already added to a multi handle was
+ attempted to get added - again */
++ CURLM_RECURSIVE_API_CALL, /* an api function was called from inside a
++ callback */
++ CURLM_WAKEUP_FAILURE, /* wakeup is unavailable or failed */
++ CURLM_BAD_FUNCTION_ARGUMENT, /* function called with a bad parameter */
++ CURLM_ABORTED_BY_CALLBACK,
++ CURLM_UNRECOVERABLE_POLL,
+ CURLM_LAST
+ } CURLMcode;
+
+diff --git a/src/lib/ecore_con/efl_net_dialer_http.c b/src/lib/ecore_con/efl_net_dialer_http.c
+index e2919148203..ba79307c9ba 100644
+--- a/src/lib/ecore_con/efl_net_dialer_http.c
++++ b/src/lib/ecore_con/efl_net_dialer_http.c
+@@ -358,6 +358,16 @@ _efl_net_dialer_http_curlm_timer_schedule(CURLM *multi EINA_UNUSED, long timeout
+ Efl_Net_Dialer_Http_Curlm *cm = data;
+ double seconds = timeout_ms / 1000.0;
+
++ if (timeout_ms < 0)
++ {
++ if (cm->timer)
++ {
++ efl_del(cm->timer);
++ cm->timer = NULL;
++ }
++ return 0;
++ }
++
+ if (cm->timer)
+ {
+ efl_loop_timer_interval_set(cm->timer, seconds);
+@@ -376,6 +386,22 @@ _efl_net_dialer_http_curlm_timer_schedule(CURLM *multi EINA_UNUSED, long timeout
+ return 0;
+ }
+
++static Eo *
++_efl_net_dialer_http_curlm_easy_find(Efl_Net_Dialer_Http_Curlm *cm, CURL *easy)
++{
++ const Eina_List *l;
++ Eo *dialer;
++
++ EINA_LIST_FOREACH(cm->users, l, dialer)
++ {
++ Efl_Net_Dialer_Http_Data *pd = efl_data_scope_get(dialer, MY_CLASS);
++ if ((pd) && (pd->easy == easy))
++ return dialer;
++ }
++
++ return NULL;
++}
++
+ static void
+ _efl_net_dialer_http_curlm_event_fd_read(void *data, const Efl_Event *event)
+ {
+@@ -408,22 +434,19 @@ static int
+ _efl_net_dialer_http_curlm_socket_manage(CURL *e, curl_socket_t fd, int what, void *cm_data, void *fdhandler_data)
+ {
+ Efl_Net_Dialer_Http_Curlm *cm = cm_data;
+- Efl_Net_Dialer_Http_Data *pd;
++ Efl_Net_Dialer_Http_Data *pd = NULL;
+ Eo *dialer, *fdhandler = fdhandler_data;
+- char *priv;
+- CURLcode re;
+
+- re = curl_easy_getinfo(e, CURLINFO_PRIVATE, &priv);
+- EINA_SAFETY_ON_TRUE_RETURN_VAL(re != CURLE_OK, -1);
+- if (!priv) return -1;
+- dialer = (Eo *)priv;
+- pd = efl_data_scope_get(dialer, MY_CLASS);
+- EINA_SAFETY_ON_NULL_RETURN_VAL(pd, -1);
++ dialer = _efl_net_dialer_http_curlm_easy_find(cm, e);
++ if (dialer)
++ pd = efl_data_scope_get(dialer, MY_CLASS);
+
+ if (what == CURL_POLL_REMOVE)
+ {
+- pd->fdhandler = NULL;
+- efl_del(fdhandler);
++ if ((pd) && (pd->fdhandler == fdhandler))
++ pd->fdhandler = NULL;
++ curl_multi_assign(cm->multi, fd, NULL);
++ if (fdhandler) efl_del(fdhandler);
+ }
+ else
+ {
+@@ -434,9 +457,10 @@ _efl_net_dialer_http_curlm_socket_manage(CURL *e, curl_socket_t fd, int what, vo
+ flags = (intptr_t)efl_key_data_get(fdhandler, "curl_flags");
+ else
+ {
+- pd->fdhandler = fdhandler = efl_add(EFL_LOOP_FD_CLASS, cm->loop,
+- efl_loop_fd_set(efl_added, fd));
++ fdhandler = efl_add_ref(EFL_LOOP_FD_CLASS, cm->loop,
++ efl_loop_fd_set(efl_added, fd));
+ EINA_SAFETY_ON_NULL_RETURN_VAL(fdhandler, -1);
++ if (pd) pd->fdhandler = fdhandler;
+ curl_multi_assign(cm->multi, fd, fdhandler);
+ flags = 0;
+ }
+@@ -494,16 +518,17 @@ _efl_net_dialer_http_curlm_add(Efl_Net_Dialer_Http_Curlm *cm, Eo *o, CURL *handl
+ curl_multi_setopt(cm->multi, CURLMOPT_TIMERDATA, cm);
+ }
+
++ cm->users = eina_list_append(cm->users, o);
++
+ r = curl_multi_add_handle(cm->multi, handle);
+ if (r != CURLM_OK)
+ {
+ ERR("could not register curl multi handle %p: %s",
+ handle, curl_multi_strerror(r));
++ cm->users = eina_list_remove(cm->users, o);
+ return EINA_FALSE;
+ }
+
+- cm->users = eina_list_append(cm->users, o);
+-
+ return EINA_TRUE;
+ }
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/efl.git/commitdiff/a580f76ab7b7f9d09a1e505089fbba0118ab7afd
More information about the pld-cvs-commit
mailing list