Changeset 191
- Timestamp:
- 09/03/07 19:39:27 (15 months ago)
- Location:
- trunk
- Files:
-
- 3 modified
-
apps/obexftp.c (modified) (1 diff)
-
obexftp/cache.c (modified) (5 diffs)
-
obexftp/client.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/apps/obexftp.c
r186 r191 586 586 st = obexftp_stat(cli, ent->name); 587 587 if (!st) continue; 588 printf("%d %s (%d)\n", st->size, ent->name, ent->mode); 588 printf("%d %s%s\n", st->size, ent->name, 589 ent->mode&S_IFDIR?"/":""); 589 590 } 590 591 obexftp_closedir(dir); -
trunk/obexftp/cache.c
r186 r191 110 110 if (node->content) \ 111 111 free(node->content); \ 112 if (node->stats) \ 113 free(node->stats); \ 112 114 free(node); \ 113 115 } while(0) … … 247 249 Very limited - not multi-byte character save. 248 250 It's actually "const char *xml" but can't be declared as such. 251 \return a new allocated array of stat_entry_t's. 249 252 */ 250 253 static stat_entry_t *parse_directory(char *xml) … … 274 277 ni = strlen(xml); 275 278 no = ni; 276 xml_latin1 = xml_end = malloc(no );279 xml_latin1 = xml_end = malloc(no+1); 277 280 p = xml; 278 281 if (xml_latin1) { … … 429 432 *p++ = '\0'; 430 433 basename = p; 431 } else 434 } else { 435 *path = '\0'; 432 436 basename = name; 437 } 433 438 DEBUG(2, "%s() stating '%s' / '%s'\n", __func__, path, basename); 434 439 … … 448 453 cache->stats = parse_directory(cache->content); 449 454 DEBUG(2, "%s() got dir '%s'\n", __func__, path); 455 free(path); 450 456 451 457 /* then lookup the basename */ -
trunk/obexftp/client.c
r186 r191 573 573 574 574 OBEX_Cleanup(cli->obexhandle); 575 if (cli->buf_data) { 576 DEBUG(1, "%s: Warning: purging left-over buffer.\n", __func__); 577 free(cli->buf_data); 578 } 579 cache_purge(&cli->cache, NULL); 575 580 free(cli->stream_chunk); 576 581 free(cli);
