Hi,

Attached below is a small itask-ng patch against ng_config.c. It adds the imho missing stacking config entry, which kept messing up my itask-ng module configuration.

While looking at this, I noticed two things:

- throughout the itask-ng code, function parameters (pointers) are assumed to be non-NULL but never checked before accessed or assigned. In the situation that the missing config entry created this led to a segfault instead of proper recovery. I'm talking about the following code in ng_config.c

   if (ci->stacking != cfdata->stacking)
     {
        restart = 1;
        goto end;
     }

and the subsequent restart procedure (i.e. ng_free()).

- the if(restart) part in ng_config() mentioned above does not seem to be recovering things properly. If e.g. the above check with respect to stacking fails, then it should restore the config and apply default parameters, I guess? It is not doing this for me.


I can probably come up with patches for both (certainly for the first issue), but maybe others who know the code better would be more efficient.



Best,  Nick.
--- E-MODULES-EXTRA/itask-ng/src/ng_config.c	2011-01-19 21:19:18.000000000 -0500
+++ E-MODULES-EXTRA/itask-ng_tmp/src/ng_config.c	2011-01-19 21:16:26.000000000 -0500
@@ -392,6 +392,7 @@
    ci->autohide = cfdata->hide_mode;
    ci->lock_deskswitch = cfdata->lock_deskswitch;
    ci->ecomorph_features = cfdata->ecomorph_features;
+   ci->stacking = cfdata->stacking;
 
    if (ci->orient != cfdata->orient)
      {
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to