src/bloblist.c
changeset 113 4bee48270834
parent 98 9e3d28932e7b
child 125 5119178815d8
     1.1 --- a/src/bloblist.c	Sat Mar 14 11:28:14 2015 +0100
     1.2 +++ b/src/bloblist.c	Sun Mar 15 10:14:43 2015 +0100
     1.3 @@ -5,7 +5,7 @@
     1.4  #include "bloblist.h"
     1.5  
     1.6  DYNAMIC_API bloblist_t *new_bloblist(char *blob, size_t size, const char *mime_type,
     1.7 -        const char *file_name)
     1.8 +        const char *filename)
     1.9  {
    1.10      bloblist_t * bloblist = calloc(1, sizeof(bloblist_t));
    1.11      assert(bloblist);
    1.12 @@ -20,9 +20,9 @@
    1.13          }
    1.14      }
    1.15  
    1.16 -    if (file_name) {
    1.17 -        bloblist->file_name = strdup(file_name);
    1.18 -        if (bloblist->file_name == NULL) {
    1.19 +    if (filename) {
    1.20 +        bloblist->filename = strdup(filename);
    1.21 +        if (bloblist->filename == NULL) {
    1.22              free(bloblist->mime_type);
    1.23              free(bloblist);
    1.24              return NULL;
    1.25 @@ -42,7 +42,7 @@
    1.26              free_bloblist(bloblist->next);
    1.27          free(bloblist->data);
    1.28          free(bloblist->mime_type);
    1.29 -        free(bloblist->file_name);
    1.30 +        free(bloblist->filename);
    1.31          free(bloblist);
    1.32      }
    1.33  }
    1.34 @@ -53,7 +53,7 @@
    1.35  
    1.36      assert(src);
    1.37  
    1.38 -    bloblist = new_bloblist(src->data, src->size, src->mime_type, src->file_name);
    1.39 +    bloblist = new_bloblist(src->data, src->size, src->mime_type, src->filename);
    1.40      if (bloblist == NULL)
    1.41          goto enomem;
    1.42  
    1.43 @@ -71,12 +71,12 @@
    1.44  }
    1.45  
    1.46  DYNAMIC_API bloblist_t *bloblist_add(bloblist_t *bloblist, char *blob, size_t size,
    1.47 -        const char *mime_type, const char *file_name)
    1.48 +        const char *mime_type, const char *filename)
    1.49  {
    1.50      assert(blob);
    1.51  
    1.52      if (bloblist == NULL)
    1.53 -        return new_bloblist(blob, size, mime_type, file_name);
    1.54 +        return new_bloblist(blob, size, mime_type, filename);
    1.55  
    1.56      if (bloblist->data == NULL) {
    1.57          if (mime_type) {
    1.58 @@ -86,9 +86,9 @@
    1.59                  return NULL;
    1.60              }
    1.61          }
    1.62 -        if (file_name) {
    1.63 -            bloblist->file_name = strdup(file_name);
    1.64 -            if (bloblist->file_name == NULL) {
    1.65 +        if (filename) {
    1.66 +            bloblist->filename = strdup(filename);
    1.67 +            if (bloblist->filename == NULL) {
    1.68                  free(bloblist->mime_type);
    1.69                  free(bloblist);
    1.70                  return NULL;
    1.71 @@ -100,10 +100,10 @@
    1.72      }
    1.73  
    1.74      if (bloblist->next == NULL) {
    1.75 -        bloblist->next = new_bloblist(blob, size, mime_type, file_name);
    1.76 +        bloblist->next = new_bloblist(blob, size, mime_type, filename);
    1.77          return bloblist->next;
    1.78      }
    1.79  
    1.80 -    return bloblist_add(bloblist->next, blob, size, mime_type, file_name);
    1.81 +    return bloblist_add(bloblist->next, blob, size, mime_type, filename);
    1.82  }
    1.83