diff options
| author | 2004-10-28 10:30:41 +0000 | |
|---|---|---|
| committer | 2004-10-28 10:30:41 +0000 | |
| commit | d24d6ab7bbfda8e302af3a5cf8be62299d543c1a (patch) | |
| tree | d5da54889ad987c216d6767e39c65607b4b678e5 /libcsoap/soap-ctx.c | |
| parent | ebde083c541b5d202014c41450a3519f4d08e3c9 (diff) | |
| download | csoap-d24d6ab7bbfda8e302af3a5cf8be62299d543c1a.tar.gz csoap-d24d6ab7bbfda8e302af3a5cf8be62299d543c1a.tar.bz2  | |
changed hstatus_t to herror_t and chagend the API function to return herror_t. Added herror_*() functions and fixed a bug in the socket receive comm.
Diffstat (limited to 'libcsoap/soap-ctx.c')
| -rwxr-xr-x | libcsoap/soap-ctx.c | 8 | 
1 files changed, 5 insertions, 3 deletions
diff --git a/libcsoap/soap-ctx.c b/libcsoap/soap-ctx.c index a77bbdd..944abf0 100755 --- a/libcsoap/soap-ctx.c +++ b/libcsoap/soap-ctx.c @@ -1,5 +1,5 @@  /******************************************************************
 - *  $Id: soap-ctx.c,v 1.1 2004/10/15 13:33:48 snowdrop Exp $
 + *  $Id: soap-ctx.c,v 1.2 2004/10/28 10:30:46 snowdrop Exp $
   *
   * CSOAP Project:  A SOAP client/server library in C
   * Copyright (C) 2003-2004  Ferhat Ayaz
 @@ -49,14 +49,16 @@ void soap_ctx_add_files(SoapCtx* ctx, attachments_t *attachments)  }
 -hstatus_t soap_ctx_add_file(SoapCtx* ctx, const char* filename, const char* content_type, char *dest_href)
 +herror_t soap_ctx_add_file(SoapCtx* ctx, const char* filename, const char* content_type, char *dest_href)
  {
    char cid[250];
    char id[250];
    part_t *part;
    static int counter = 1;
    FILE *test = fopen(filename, "r");
 -  if (!test) return FILE_ERROR_OPEN;
 +  if (!test) 
 +	  return herror_new("soap_ctx_add_file", FILE_ERROR_OPEN, 
 +	  "Can not open file '%s'", filename);
    fclose(test);
  | 
