Ignore:
Timestamp:
01/15/11 21:11:28 (10 years ago)
Author:
Admin
Message:

WebIf: Internal change: Add appendonce mode, document defines.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/oscam-http-helpers.c

    r4480 r4481  
    3939    } else {
    4040        int oldlen = 0, newlen = strlen(value);
    41         if(addmode == TPLAPPEND) oldlen = strlen((*vars).values[i]);
     41        if(addmode == TPLAPPEND || addmode == TPLAPPENDONCE) oldlen = strlen((*vars).values[i]);
    4242        if(!cs_realloc(&((*vars).values[i]), (oldlen + newlen + 1) * sizeof(char), -1)) return value;
    4343        memcpy((*vars).values[i] + oldlen, value, newlen + 1);
     
    101101    if(result == NULL) return "";
    102102    else {
    103         if((*vars).vartypes[i] == TPLADDONCE){
     103        if((*vars).vartypes[i] == TPLADDONCE || (*vars).vartypes[i] == TPLAPPENDONCE){
    104104            // This is a one-time-use variable which gets cleaned up automatically after retrieving it
    105105            if(!cs_malloc(&(*vars).values[i], 1 * sizeof(char), -1)){
Note: See TracChangeset for help on using the changeset viewer.