Project

General

Profile

Revision f4a16f5b src/libs/plugins/imexporters/ofx/parser/g_bal.c

View differences:

src/libs/plugins/imexporters/ofx/parser/g_bal.c
64 64
  xg=(AIO_OFX_GROUP_BAL*)p;
65 65
  assert(xg);
66 66
  free(xg->currentElement);
67
  GWEN_Time_free(xg->date);
67
  GWEN_Date_free(xg->date);
68 68
  AB_Value_free(xg->value);
69 69
  GWEN_FREE_OBJECT(xg);
70 70
}
......
97 97

  
98 98

  
99 99

  
100
const GWEN_TIME *AIO_OfxGroup_BAL_GetDate(const AIO_OFX_GROUP *g) {
100
const GWEN_DATE *AIO_OfxGroup_BAL_GetDate(const AIO_OFX_GROUP *g) {
101 101
  AIO_OFX_GROUP_BAL *xg;
102 102

  
103 103
  assert(g);
......
109 109

  
110 110

  
111 111

  
112
void AIO_OfxGroup_BAL_SetDate(AIO_OFX_GROUP *g, const GWEN_TIME *ti) {
112
void AIO_OfxGroup_BAL_SetDate(AIO_OFX_GROUP *g, const GWEN_DATE *dt) {
113 113
  AIO_OFX_GROUP_BAL *xg;
114 114

  
115 115
  assert(g);
116 116
  xg=GWEN_INHERIT_GETDATA(AIO_OFX_GROUP, AIO_OFX_GROUP_BAL, g);
117 117
  assert(xg);
118 118

  
119
  GWEN_Time_free(xg->date);
120
  if (ti) xg->date=GWEN_Time_dup(ti);
119
  GWEN_Date_free(xg->date);
120
  if (dt) xg->date=GWEN_Date_dup(dt);
121 121
  else xg->date=NULL;
122 122
}
123 123

  
124 124

  
125 125

  
126 126

  
127
int AIO_OfxGroup_BAL_StartTag(AIO_OFX_GROUP *g,
128
				 const char *tagName) {
127
int AIO_OfxGroup_BAL_StartTag(AIO_OFX_GROUP *g, const char *tagName) {
129 128
  AIO_OFX_GROUP_BAL *xg;
130 129
  //GWEN_XML_CONTEXT *ctx;
131 130

  
......
187 186
	xg->value=v;
188 187
      }
189 188
      else if (strcasecmp(xg->currentElement, "DTASOF")==0) {
190
	GWEN_TIME *ti;
189
	GWEN_DATE *dt;
191 190

  
192
	ti=GWEN_Time_fromString(s, "YYYYMMDD");
193
	if (ti==NULL) {
191
        dt=GWEN_Date_fromStringWithTemplate(s, "YYYYMMDD");
192
	if (dt==NULL) {
194 193
	  DBG_ERROR(AQBANKING_LOGDOMAIN,
195
		    "Invalid data for DTASOF: [%s]", s);
194
                    "Invalid data for DTASOF: [%s]", s);
196 195
	  GWEN_Buffer_free(buf);
197 196
	  return GWEN_ERROR_BAD_DATA;
198 197
	}
199
	GWEN_Time_free(xg->date);
200
        xg->date=ti;
198
	GWEN_Date_free(xg->date);
199
        xg->date=dt;
201 200
      }
202 201
      else {
203 202
	DBG_INFO(AQBANKING_LOGDOMAIN,

Also available in: Unified diff