[TinyOWS-dev] [tinyows] #59: couple of problems during a transaction operation

tinyows trac at tinyows.org
Wed Oct 27 20:17:13 EST 2010


#59: couple of problems during a transaction operation
----------------------------+-----------------------------------------------
     Reporter:  assefa      |           Owner:             
         Type:  defect      |          Status:  new        
     Priority:  blocker     |         Version:  SVN        
   Resolution:              |        Keywords:             
        Stage:  Unreviewed  |        Approval:  Unnecessary
        Patch:  None        |      Complexity:  Unknown    
Compatibility:  Unknown     |   Specification:  Unnecessary
----------------------------+-----------------------------------------------

Comment(by yassefa):

 could not attach the patch for sopme reason (OSError: [Errno 13]
 Permission denied: '/var/data/tinyows/attachments/ticket/59')
 here is the patch

 {{{
 Index: ows_psql.c
 ===================================================================
 --- ows_psql.c  (revision 322)
 +++ ows_psql.c  (working copy)
 @@ -577,11 +577,11 @@
              PQclear(res);
              return NULL;
          }
 +        PQclear(res);
      }

      buffer_free(sql);
 -    PQclear(res);
 -
 +
      return result;
  }

 @@ -594,16 +594,16 @@
  char *ows_psql_escape_string(ows *o, const char *content)
  {
      char *content_escaped;
 -    int *error = 0;
 +    int error = 0;

      assert(o);
      assert(o->pg);
      assert(content);

      content_escaped = malloc(strlen(content) * 2 + 1);
 -    PQescapeStringConn(o->pg, content_escaped, content, strlen(content),
 error);
 +    PQescapeStringConn(o->pg, content_escaped, content, strlen(content),
 &error);

 -    if (*error != 0) return NULL;
 +    if (error != 0) return NULL;

      return content_escaped;
  }

 }}}

-- 
Ticket URL: <http://www.tinyows.org/trac/ticket/59#comment:1>
tinyows <https://www.tinyows.org/trac/>
TinyOWS


More information about the TinyOWS-dev mailing list