IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 19927


Ignore:
Timestamp:
Oct 6, 2008, 12:15:38 PM (18 years ago)
Author:
eugene
Message:

pass all unspecified NULL types as a NULL ptr

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/db/psDB.c

    r19804 r19927  
    2323 * 4.1.2 or newer is required.
    2424 *
    25  * $Id: psDB.c,v 1.169 2008-10-02 17:41:21 eugene Exp $
     25 * $Id: psDB.c,v 1.170 2008-10-06 22:15:38 eugene Exp $
    2626 */
    2727
     
    11901190
    11911191            default:
    1192               psError(PS_ERR_BAD_PARAMETER_TYPE , true,
    1193                       "field name: %s FIXME: Only type of "
    1194                       "PS_DATA_U8 (PS_DATA_U8), "
    1195                       "PS_DATA_U16 (PS_DATA_U16), "
    1196                       "PS_DATA_U32 (PS_DATA_U32), "
    1197                       "PS_DATA_U64 (PS_DATA_U64), "
    1198                       "PS_DATA_S8 (PS_DATA_S8), "
    1199                       "PS_DATA_S16 (PS_DATA_S16), "
    1200                       "PS_DATA_S32 (PS_DATA_S32), "
    1201                       "PS_DATA_S64 (PS_DATA_S64), "
    1202                       "PS_DATA_F32 (PS_DATA_F32), "
    1203                       "PS_DATA_F64 (PS_DATA_F64), "
    1204                       "PS_DATA_BOOL (PS_DATA_BOOL), "
    1205                       "PS_DATA_STRING "
    1206                       "and PS_DATA_TIME are supported.", field[i].name);
    1207               psFree(data);
    1208               psFree(md);
    1209               mysql_free_result(result);
    1210               psFree(resultSet);
    1211               return NULL;
     1192              // just pass NULL values for all other types
     1193              if (!psMetadataAddUnknown(md, PS_LIST_TAIL, field[i].name, 0, "", NULL)) {
     1194                psError(PS_ERR_UNKNOWN, false, "Failed to add item %s", field[i].name);
     1195                psFree(data);
     1196                psFree(md);
     1197                mysql_free_result(result);
     1198                psFree(resultSet);
     1199                return NULL;
     1200              }
     1201              break;
    12121202          }
    1213 
    12141203          psFree(data);
    12151204          continue;
Note: See TracChangeset for help on using the changeset viewer.