Changeset - e7e6ab77c542
[Not reviewed]
default
0 1 0
Nathan Brink (binki) - 16 years ago 2010-02-19 22:12:21
ohnobinki@ohnopublishing.net
various small mysql.c fixes
1 file changed with 9 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/server/mysql.c
Show inline comments
 
@@ -161,7 +161,8 @@ distrend_mysql_result_t mysqlQuery(distr
 
  
 
  if(mysql_ping(conn->mysqlconn))
 
    {
 
      fprintf(stderr, "MySQL connection broken, and reconnect is disabled!\n");
 
      fprintf(stderr, "mysql_ping() failed: %s\n", mysql_error(conn->mysqlconn));
 
      return NULL;
 
    }
 

	
 
  fprintf(stderr,"Querying... ");
 
@@ -205,6 +206,8 @@ distrend_mysql_result_t mysqlQuery(distr
 
  distrenresult = malloc(sizeof(struct distrend_mysql_result));
 
  if(!distrenresult)
 
    {
 
      while(mysql_fetch_row(result))
 
	;
 
      mysql_free_result(result);
 
      return NULL;
 
    }
 
@@ -220,8 +223,11 @@ int mysqlResultFree(distrend_mysql_resul
 
  size_t counter;
 

	
 
  if(!result)
 
    return 0;
 

	
 
    {
 
      fprintf(stderr, "mysqlResultFree(): warning, passed NULL parameter\n");
 
      return 0;
 
    }
 
  
 
  if(result->pointlesscheck != FORTY_TWO)
 
    fprintf(stderr, "%s:%d: I didn't get the type of handle I wanted\n", __FILE__, __LINE__);
 

	
0 comments (0 inline, 0 general)