Commit graph

2 commits

Author SHA1 Message Date
d76a77b5b3 Fix critical D-Bus and gadget integration issues
This commit fixes several critical bugs preventing the module from working:

1. Agent D-Bus Object Lifecycle Fix:
   - Keep manager_obj reference alive in IWD_Agent structure
   - Prevents async RegisterAgent call from being canceled
   - Fixes 'Canceled by user' error during agent registration
   - Object is now properly unreferenced during shutdown

2. Signal Handler Cleanup Fix:
   - Don't manually delete signal handlers after object unref
   - eldbus_object_unref() automatically cleans up handlers
   - Prevents 'Eina Magic Check Failed' error on module unload
   - Fixes double-free of signal handlers

3. Gadget Integration Fix:
   - Set gcc->o_base directly to attach icon to gadcon
   - Prevents shelf layout corruption when adding module
   - Proper Enlightenment gadcon integration

4. Agent Path Fix:
   - Use IWD_DAEMON_PATH ('/net/connman/iwd') for AgentManager
   - AgentManager interface is on daemon object, not root
   - Fixes 'No matching method found' error

These fixes resolve:
- Module load/unload crashes
- Shelf disorganization
- Agent registration failures
- D-Bus signal handler corruption

The module should now load cleanly, register the agent successfully,
and unload without errors.
2025-12-28 21:51:41 +07:00
8cefafafb8 feat: Phase 1 & 2 - Build system and D-Bus layer
Phase 1: Build System & Module Skeleton
- Set up Meson build system with EFL dependencies
- Created module entry point with e_modapi_init/shutdown/save
- Implemented configuration system using EET
- Added module.desktop metadata file
- Configured proper installation paths

Phase 2: D-Bus Layer (iwd Backend)
- Implemented D-Bus connection management to net.connman.iwd
- Created device abstraction layer (iwd_device.c) for Wi-Fi interfaces
- Created network abstraction layer (iwd_network.c) for access points
- Implemented D-Bus agent for passphrase requests (iwd_agent.c)
- Added ObjectManager support for device/network discovery
- Implemented daemon restart detection and reconnection
- Property change signal handling for devices and networks

Features:
- Connects to system D-Bus and iwd daemon
- Discovers wireless devices and networks via ObjectManager
- Monitors iwd daemon availability (handles restart)
- Agent registered for WPA/WPA2/WPA3 authentication
- Signal-driven updates (no polling)

Files created: 16 source/header files
Build status: Compiles successfully with gcc 15.2.1

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 18:31:33 +07:00