Changeset 5972

Show
Ignore:
Timestamp:
03/28/10 16:27:11 (3 years ago)
Author:
Cyrus
Message:

upsd: Add X-Command header support for passing a custom init-script path

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • luci2/upsd/service.c

    r5826 r5972  
    332332                *c-- = 0; 
    333333            } 
     334            if (!memcmp(buffer, UPSD_LITERAL_PTRSIZE("# X-Command:"))) { 
     335                free(init->identifier); 
     336                char *c = buffer + 12; 
     337                while (isspace(*c)) { 
     338                    c++; 
     339                } 
     340                init->identifier = strdup(c); 
     341            } 
    334342            if (++options == opts) { 
    335343                opts += 4;