This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project wmaker-crm.git.

The branch, next has been updated
  discards  46802efc5a8396cd08c0eb6ce046c8fec28a441f (commit)
  discards  bff550fb2a493973506856d6bc1f00e90a39b602 (commit)
  discards  bc887808cf563b2ca1d9394ae88100e60fcce3a6 (commit)
       via  30fd8a1f75dac7829bdaf54c70905320600845aa (commit)
       via  1b2f3c0431a93d9008a55d76d24dfd30d6879123 (commit)
       via  bec778aae2e5cb7c4e6ced0b417d790e77f98d28 (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (46802efc5a8396cd08c0eb6ce046c8fec28a441f)
                         N -- N -- N (30fd8a1f75dac7829bdaf54c70905320600845aa)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://repo.or.cz/w/wmaker-crm.git/commit/30fd8a1f75dac7829bdaf54c70905320600845aa

commit 30fd8a1f75dac7829bdaf54c70905320600845aa
Author: Christophe CURIS <[email protected]>
Date:   Sun Oct 13 15:41:59 2013 +0200

    wmaker: Marked arg as unused for compiler in callback code
    
    As a callback function has a fixed prototype, it is not an error to have
    some arguments unused, but we need to let the compiler about it to avoid
    spurious messages that would hide real cases.
    
    Signed-off-by: Christophe CURIS <[email protected]>

diff --git a/src/startup.c b/src/startup.c
index 90154d8..ce5a774 100644
--- a/src/startup.c
+++ b/src/startup.c
@@ -163,6 +163,8 @@ static RETSIGTYPE handleExitSig(int sig)
 /* Dummy signal handler */
 static void dummyHandler(int sig)
 {
+       /* Parameter is not used, but tell the compiler that it is ok */
+       (void) sig;
 }
 
 /*

http://repo.or.cz/w/wmaker-crm.git/commit/1b2f3c0431a93d9008a55d76d24dfd30d6879123

commit 1b2f3c0431a93d9008a55d76d24dfd30d6879123
Author: Christophe CURIS <[email protected]>
Date:   Sun Oct 13 15:41:58 2013 +0200

    wmaker: Removed non necessary macro for buffer size
    
    The C language provides the macro 'sizeof' to handle this kind of
    situation, so do not create locally a macro which can become a source
    of problems.
    
    Took opportunity to change the size of buffer to follow guidelines
    from Inotify's manpage, and to remove the initial value that is useless.
    
    Signed-off-by: Christophe CURIS <[email protected]>

diff --git a/src/event.c b/src/event.c
index 72a8171..b470074 100644
--- a/src/event.c
+++ b/src/event.c
@@ -291,12 +291,11 @@ void DispatchEvent(XEvent * event)
  *     Calls wDefaultsCheckDomains if config database is updated
  *----------------------------------------------------------------------
  */
-/* allow 5 simultaneous events, with path + filenames up to 64 chars */
-#define BUFF_SIZE ((sizeof(struct inotify_event) + 64)*5)
 static void handle_inotify_events(void)
 {
        ssize_t eventQLength, i = 0;
-       char buff[BUFF_SIZE] = { 0 };
+       /* Make room for at lease 5 simultaneous events, with path + filenames 
*/
+       char buff[ (sizeof(struct inotify_event) + NAME_MAX + 1) * 5 ];
        /* Check config only once per read of the event queue */
        int oneShotFlag = 0;
 
@@ -308,7 +307,7 @@ static void handle_inotify_events(void)
         * a few entries before a read().
         */
        eventQLength = read(w_global.inotify.fd_event_queue,
-                           buff, BUFF_SIZE);
+                           buff, sizeof(buff) );
 
        /* check what events occured */
        /* Should really check wd here too, but for now we only have one watch! 
*/

http://repo.or.cz/w/wmaker-crm.git/commit/bec778aae2e5cb7c4e6ced0b417d790e77f98d28

commit bec778aae2e5cb7c4e6ced0b417d790e77f98d28
Author: Christophe CURIS <[email protected]>
Date:   Sun Oct 13 22:26:32 2013 +0200

    wmaker: Added reset of file handle variable to avoid multiple file close
    
    If the triggering condition occurred, the file handle for Inotify were
    closed, but as the variable containing the handle was not updated it
    could lead to multiple call to file close, which behaviour may be
    problematic.
    
    The file handle was passed as a parameter, which does not allow for a
    clean value change, so now we use the variable directly as it is
    available in the global namespace.
    
    Signed-off-by: Christophe CURIS <[email protected]>

diff --git a/src/event.c b/src/event.c
index a9b8162..72a8171 100644
--- a/src/event.c
+++ b/src/event.c
@@ -99,7 +99,7 @@ static void handleKeyPress(XEvent *event);
 static void handleFocusIn(XEvent *event);
 static void handleMotionNotify(XEvent *event);
 static void handleVisibilityNotify(XEvent *event);
-static void handle_inotify_events(int fd);
+static void handle_inotify_events(void);
 static void wdelete_death_handler(WMagicNumber id);
 
 
@@ -293,7 +293,7 @@ void DispatchEvent(XEvent * event)
  */
 /* allow 5 simultaneous events, with path + filenames up to 64 chars */
 #define BUFF_SIZE ((sizeof(struct inotify_event) + 64)*5)
-static void handle_inotify_events(int fd)
+static void handle_inotify_events(void)
 {
        ssize_t eventQLength, i = 0;
        char buff[BUFF_SIZE] = { 0 };
@@ -307,7 +307,8 @@ static void handle_inotify_events(int fd)
         * occur as a result of an Xevent - so the event queue should never 
have more than
         * a few entries before a read().
         */
-       eventQLength = read(fd, buff, BUFF_SIZE);
+       eventQLength = read(w_global.inotify.fd_event_queue,
+                           buff, BUFF_SIZE);
 
        /* check what events occured */
        /* Should really check wd here too, but for now we only have one watch! 
*/
@@ -320,12 +321,21 @@ static void handle_inotify_events(int fd)
                if (pevent->mask & IN_DELETE_SELF) {
                        wwarning(_("the defaults database has been deleted!"
                                   " Restart Window Maker to create the 
database" " with the default settings"));
-                       close(fd);
+
+                       if (w_global.inotify.fd_event_queue >= 0) {
+                               close(w_global.inotify.fd_event_queue);
+                               w_global.inotify.fd_event_queue = -1;
+                       }
                }
                if (pevent->mask & IN_UNMOUNT) {
                        wwarning(_("the unit containing the defaults database 
has"
                                   " been unmounted. Setting --static mode." " 
Any changes will not be saved."));
-                       close(fd);
+
+                       if (w_global.inotify.fd_event_queue >= 0) {
+                               close(w_global.inotify.fd_event_queue);
+                               w_global.inotify.fd_event_queue = -1;
+                       }
+
                        wPreferences.flags.noupdates = 1;
                }
                if ((pevent->mask & IN_MODIFY) && oneShotFlag == 0) {
@@ -387,7 +397,7 @@ noreturn void EventLoop(void)
                                continue;
                        }
                        if (FD_ISSET(w_global.inotify.fd_event_queue, &rfds))
-                               
handle_inotify_events(w_global.inotify.fd_event_queue);
+                               handle_inotify_events();
                }
 #endif
        }

-----------------------------------------------------------------------

Summary of changes:
 src/event.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)


repo.or.cz automatic notification. Contact project admin [email protected]
if you want to unsubscribe, or site admin [email protected] if you receive
no reply.
-- 
wmaker-crm.git ("The Window Maker window manager")


-- 
To unsubscribe, send mail to [email protected].

Reply via email to