Jim Tcl
Check-in [c3499f63df]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:eventloop: return from callback is not an error

Signed-off-by: Steve Bennett <steveb@workware.net.au>

Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:c3499f63df3afd83fca48654d2319d449e2c3b81
User & Date: steveb@workware.net.au 2017-09-15 02:10:59
Original User & Date: steveb@workware.net.au 2017-09-15 02:11:00
Context
2017-09-15
02:11
aio: Add support for many socket options

Add aio sockopt to get and set various socket options via setsockopt()/getsockopt()

And remove 'aio tcp_nodelay' in favour of 'aio sockopt tcp_nodelay'

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 05177bba18 user: steveb@workware.net.au tags: trunk

02:10
eventloop: return from callback is not an error

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: c3499f63df user: steveb@workware.net.au tags: trunk

2017-09-13
11:44
docs: Remove Last Modified footer - take 2

More reliable way to remove the footer

Reported-by: Bernhard M. Wiedemann <bwiedemann@suse.de> Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 5deea3cd44 user: steveb@workware.net.au tags: trunk

Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to jim-eventloop.c.

115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
...
429
430
431
432
433
434
435
436

437
438
439
440
441
442
443
    int retval;

    savedFramePtr = interp->framePtr;
    interp->framePtr = interp->topFramePtr;
    retval = Jim_EvalObj(interp, scriptObjPtr);
    interp->framePtr = savedFramePtr;
    /* Try to report the error (if any) via the bgerror proc */
    if (retval != JIM_OK && !eventLoop->suppress_bgerror) {
        Jim_Obj *objv[2];
        int rc = JIM_ERR;

        objv[0] = Jim_NewStringObj(interp, "bgerror", -1);
        objv[1] = Jim_GetResult(interp);
        Jim_IncrRefCount(objv[0]);
        Jim_IncrRefCount(objv[1]);
................................................................................
                    mask |= JIM_EVENT_READABLE;
                if (fe->mask & JIM_EVENT_WRITABLE && FD_ISSET(fd, &wfds))
                    mask |= JIM_EVENT_WRITABLE;
                if (fe->mask & JIM_EVENT_EXCEPTION && FD_ISSET(fd, &efds))
                    mask |= JIM_EVENT_EXCEPTION;

                if (mask) {
                    if (fe->fileProc(interp, fe->clientData, mask) != JIM_OK) {

                        /* Remove the element on handler error */
                        Jim_DeleteFileHandler(interp, fd, mask);
                        /* At this point fe is no longer valid - it will be assigned below */
                    }
                    processed++;
                    /* After an event is processed our file event list
                     * may no longer be the same, so what we do







|







 







|
>







115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
...
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
    int retval;

    savedFramePtr = interp->framePtr;
    interp->framePtr = interp->topFramePtr;
    retval = Jim_EvalObj(interp, scriptObjPtr);
    interp->framePtr = savedFramePtr;
    /* Try to report the error (if any) via the bgerror proc */
    if (retval != JIM_OK && retval != JIM_RETURN && !eventLoop->suppress_bgerror) {
        Jim_Obj *objv[2];
        int rc = JIM_ERR;

        objv[0] = Jim_NewStringObj(interp, "bgerror", -1);
        objv[1] = Jim_GetResult(interp);
        Jim_IncrRefCount(objv[0]);
        Jim_IncrRefCount(objv[1]);
................................................................................
                    mask |= JIM_EVENT_READABLE;
                if (fe->mask & JIM_EVENT_WRITABLE && FD_ISSET(fd, &wfds))
                    mask |= JIM_EVENT_WRITABLE;
                if (fe->mask & JIM_EVENT_EXCEPTION && FD_ISSET(fd, &efds))
                    mask |= JIM_EVENT_EXCEPTION;

                if (mask) {
                    int ret = fe->fileProc(interp, fe->clientData, mask);
                    if (ret != JIM_OK && ret != JIM_RETURN) {
                        /* Remove the element on handler error */
                        Jim_DeleteFileHandler(interp, fd, mask);
                        /* At this point fe is no longer valid - it will be assigned below */
                    }
                    processed++;
                    /* After an event is processed our file event list
                     * may no longer be the same, so what we do