Changeset 32584


Ignore:
Timestamp:
Jul 7, 2017, 2:25:33 PM (3 weeks ago)
Author:
brainslayer
Message:

implement barrier if post is still running and copy back persistent variables after ej call

Location:
src/router/httpd
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/router/httpd/ej.c

    r32572 r32584  
    229229                                        memcpy(clone, stream, sizeof(webs));
    230230                                        global_handle = call(global_handle, func, clone);
     231                                        stream->generate_key = clone->generate_key;
     232                                        stream->clone_wan_mac = clone->clone_wan_mac;
     233                                        stream->filter_id = clone->filter_id;
    231234                                        free(clone);
    232235                                        // restore pointers
  • src/router/httpd/httpd.c

    r32583 r32584  
    568568
    569569#ifndef HAVE_MICRO
     570        pthread_mutex_lock(&input_mutex);  // barrier. block until input is done. otherwise global members get async
     571        pthread_mutex_unlock(&input_mutex);
     572
    570573        pthread_mutex_lock(&httpd_mutex);
    571574#ifdef HAVE_REGISTER
     
    10541057      out:;
    10551058
    1056 #ifndef HAVE_MICRO
    1057         if (handler->input)
    1058                 pthread_mutex_unlock(&input_mutex);
    1059 #endif
    10601059
    10611060        free(line);
     
    10881087#endif
    10891088#endif
     1089
     1090#ifndef HAVE_MICRO
     1091        if (handler->input)
     1092                pthread_mutex_unlock(&input_mutex);  //releases barrier
     1093#endif
     1094
    10901095        bzero(conn_fp, sizeof(webs));   // erase to delete any traces of stored passwords or usernames
    10911096
  • src/router/httpd/validate/webs.c

    r32568 r32584  
    330330
    331331        validate_filter_tod(wp);
    332 
     332        wp->filter_id = atoi(f_id);
    333333        snprintf(filter_buf, sizeof(filter_buf), "filter_rule%d", wp->filter_id);
    334334
Note: See TracChangeset for help on using the changeset viewer.