Lines Matching refs:progress

2915 static zend_bool early_find_sid_in(zval *dest, int where, php_session_rfc1867_progress *progress) /…  in early_find_sid_in()  argument
2923 …if ((ppid = zend_hash_str_find(Z_ARRVAL(PG(http_globals)[where]), PS(session_name), progress->snam… in early_find_sid_in()
2933 static void php_session_rfc1867_early_find_sid(php_session_rfc1867_progress *progress) /* {{{ */ in php_session_rfc1867_early_find_sid() argument
2938 if (early_find_sid_in(&progress->sid, TRACK_VARS_COOKIE, progress)) { in php_session_rfc1867_early_find_sid()
2939 progress->apply_trans_sid = 0; in php_session_rfc1867_early_find_sid()
2947 early_find_sid_in(&progress->sid, TRACK_VARS_GET, progress); in php_session_rfc1867_early_find_sid()
2950 static zend_bool php_check_cancel_upload(php_session_rfc1867_progress *progress) /* {{{ */ in php_check_cancel_upload() argument
2954 …if ((progress_ary = zend_symtable_find(Z_ARRVAL_P(Z_REFVAL(PS(http_session_vars))), progress->key.… in php_check_cancel_upload()
2966 static void php_session_rfc1867_update(php_session_rfc1867_progress *progress, int force_update) /*… in php_session_rfc1867_update() argument
2969 if (Z_LVAL_P(progress->post_bytes_processed) < progress->next_update) { in php_session_rfc1867_update()
2978 if (dtv < progress->next_update_time) { in php_session_rfc1867_update()
2981 progress->next_update_time = dtv + PS(rfc1867_min_freq); in php_session_rfc1867_update()
2984 progress->next_update = Z_LVAL_P(progress->post_bytes_processed) + progress->update_step; in php_session_rfc1867_update()
2993 progress->cancel_upload |= php_check_cancel_upload(progress); in php_session_rfc1867_update()
2994 Z_TRY_ADDREF(progress->data); in php_session_rfc1867_update()
2995 zend_hash_update(Z_ARRVAL_P(sess_var), progress->key.s, &progress->data); in php_session_rfc1867_update()
3000 static void php_session_rfc1867_cleanup(php_session_rfc1867_progress *progress) /* {{{ */ in php_session_rfc1867_cleanup() argument
3007 zend_hash_del(Z_ARRVAL_P(sess_var), progress->key.s); in php_session_rfc1867_cleanup()
3014 php_session_rfc1867_progress *progress; in php_session_rfc1867_callback() local
3024 progress = PS(rfc1867_progress); in php_session_rfc1867_callback()
3029 progress = ecalloc(1, sizeof(php_session_rfc1867_progress)); in php_session_rfc1867_callback()
3030 progress->content_length = data->content_length; in php_session_rfc1867_callback()
3031 progress->sname_len = strlen(PS(session_name)); in php_session_rfc1867_callback()
3032 PS(rfc1867_progress) = progress; in php_session_rfc1867_callback()
3039 if (Z_TYPE(progress->sid) && progress->key.s) { in php_session_rfc1867_callback()
3053 if (name_len == progress->sname_len && memcmp(data->name, PS(session_name), name_len) == 0) { in php_session_rfc1867_callback()
3054 zval_ptr_dtor(&progress->sid); in php_session_rfc1867_callback()
3055 ZVAL_STRINGL(&progress->sid, (*data->value), value_len); in php_session_rfc1867_callback()
3057 smart_str_free(&progress->key); in php_session_rfc1867_callback()
3058 smart_str_appends(&progress->key, PS(rfc1867_prefix)); in php_session_rfc1867_callback()
3059 smart_str_appendl(&progress->key, *data->value, value_len); in php_session_rfc1867_callback()
3060 smart_str_0(&progress->key); in php_session_rfc1867_callback()
3062 progress->apply_trans_sid = APPLY_TRANS_SID; in php_session_rfc1867_callback()
3063 php_session_rfc1867_early_find_sid(progress); in php_session_rfc1867_callback()
3073 if (!Z_TYPE(progress->sid) || !progress->key.s) { in php_session_rfc1867_callback()
3078 if (Z_ISUNDEF(progress->data)) { in php_session_rfc1867_callback()
3081 progress->update_step = PS(rfc1867_freq); in php_session_rfc1867_callback()
3083 progress->update_step = progress->content_length * -PS(rfc1867_freq) / 100; in php_session_rfc1867_callback()
3085 progress->next_update = 0; in php_session_rfc1867_callback()
3086 progress->next_update_time = 0.0; in php_session_rfc1867_callback()
3088 array_init(&progress->data); in php_session_rfc1867_callback()
3089 array_init(&progress->files); in php_session_rfc1867_callback()
3091 …add_assoc_long_ex(&progress->data, "start_time", sizeof("start_time") - 1, (zend_long)sapi_get_req… in php_session_rfc1867_callback()
3092 …add_assoc_long_ex(&progress->data, "content_length", sizeof("content_length") - 1, progress->cont… in php_session_rfc1867_callback()
3093 …add_assoc_long_ex(&progress->data, "bytes_processed", sizeof("bytes_processed") - 1, data->post_by… in php_session_rfc1867_callback()
3094 add_assoc_bool_ex(&progress->data, "done", sizeof("done") - 1, 0); in php_session_rfc1867_callback()
3095 add_assoc_zval_ex(&progress->data, "files", sizeof("files") - 1, &progress->files); in php_session_rfc1867_callback()
3097progress->post_bytes_processed = zend_hash_str_find(Z_ARRVAL(progress->data), "bytes_processed", s… in php_session_rfc1867_callback()
3100 PS(id) = zend_string_init(Z_STRVAL(progress->sid), Z_STRLEN(progress->sid), 0); in php_session_rfc1867_callback()
3101 if (progress->apply_trans_sid) { in php_session_rfc1867_callback()
3109 array_init(&progress->current_file); in php_session_rfc1867_callback()
3112 add_assoc_string_ex(&progress->current_file, "field_name", sizeof("field_name") - 1, data->name); in php_session_rfc1867_callback()
3113 add_assoc_string_ex(&progress->current_file, "name", sizeof("name") - 1, *data->filename); in php_session_rfc1867_callback()
3114 add_assoc_null_ex(&progress->current_file, "tmp_name", sizeof("tmp_name") - 1); in php_session_rfc1867_callback()
3115 add_assoc_long_ex(&progress->current_file, "error", sizeof("error") - 1, 0); in php_session_rfc1867_callback()
3117 add_assoc_bool_ex(&progress->current_file, "done", sizeof("done") - 1, 0); in php_session_rfc1867_callback()
3118 …add_assoc_long_ex(&progress->current_file, "start_time", sizeof("start_time") - 1, (zend_long)time… in php_session_rfc1867_callback()
3119 add_assoc_long_ex(&progress->current_file, "bytes_processed", sizeof("bytes_processed") - 1, 0); in php_session_rfc1867_callback()
3121 add_next_index_zval(&progress->files, &progress->current_file); in php_session_rfc1867_callback()
3123progress->current_file_bytes_processed = zend_hash_str_find(Z_ARRVAL(progress->current_file), "byt… in php_session_rfc1867_callback()
3125 Z_LVAL_P(progress->current_file_bytes_processed) = data->post_bytes_processed; in php_session_rfc1867_callback()
3126 php_session_rfc1867_update(progress, 0); in php_session_rfc1867_callback()
3132 if (!Z_TYPE(progress->sid) || !progress->key.s) { in php_session_rfc1867_callback()
3136 Z_LVAL_P(progress->current_file_bytes_processed) = data->offset + data->length; in php_session_rfc1867_callback()
3137 Z_LVAL_P(progress->post_bytes_processed) = data->post_bytes_processed; in php_session_rfc1867_callback()
3139 php_session_rfc1867_update(progress, 0); in php_session_rfc1867_callback()
3145 if (!Z_TYPE(progress->sid) || !progress->key.s) { in php_session_rfc1867_callback()
3150 …add_assoc_string_ex(&progress->current_file, "tmp_name", sizeof("tmp_name") - 1, data->temp_filen… in php_session_rfc1867_callback()
3153 add_assoc_long_ex(&progress->current_file, "error", sizeof("error") - 1, data->cancel_upload); in php_session_rfc1867_callback()
3154 add_assoc_bool_ex(&progress->current_file, "done", sizeof("done") - 1, 1); in php_session_rfc1867_callback()
3156 Z_LVAL_P(progress->post_bytes_processed) = data->post_bytes_processed; in php_session_rfc1867_callback()
3158 php_session_rfc1867_update(progress, 0); in php_session_rfc1867_callback()
3164 if (Z_TYPE(progress->sid) && progress->key.s) { in php_session_rfc1867_callback()
3166 php_session_rfc1867_cleanup(progress); in php_session_rfc1867_callback()
3168 if (!Z_ISUNDEF(progress->data)) { in php_session_rfc1867_callback()
3169 SEPARATE_ARRAY(&progress->data); in php_session_rfc1867_callback()
3170 add_assoc_bool_ex(&progress->data, "done", sizeof("done") - 1, 1); in php_session_rfc1867_callback()
3171 Z_LVAL_P(progress->post_bytes_processed) = data->post_bytes_processed; in php_session_rfc1867_callback()
3172 php_session_rfc1867_update(progress, 1); in php_session_rfc1867_callback()
3178 if (!Z_ISUNDEF(progress->data)) { in php_session_rfc1867_callback()
3179 zval_ptr_dtor(&progress->data); in php_session_rfc1867_callback()
3181 zval_ptr_dtor(&progress->sid); in php_session_rfc1867_callback()
3182 smart_str_free(&progress->key); in php_session_rfc1867_callback()
3183 efree(progress); in php_session_rfc1867_callback()
3184 progress = NULL; in php_session_rfc1867_callback()
3190 if (progress && progress->cancel_upload) { in php_session_rfc1867_callback()