summaryrefslogtreecommitdiff
path: root/examples/detect.c
diff options
context:
space:
mode:
authortedbullock <tedbullock>2007-03-03 23:25:47 +0000
committertedbullock <tedbullock>2007-03-03 23:25:47 +0000
commit898bd533892b4787b2e5b704e6ec35ec175f6eb7 (patch)
tree38ad6f9260a8915fab1a87c2973f07ea53c31391 /examples/detect.c
parent848009b99300d6dbf4ced291dd765f0e90266952 (diff)
downloadlibmtp-898bd533892b4787b2e5b704e6ec35ec175f6eb7.tar.gz
trim debugging output and clarify actions
Diffstat (limited to 'examples/detect.c')
-rw-r--r--examples/detect.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/detect.c b/examples/detect.c
index 9c7633f..636fb5f 100644
--- a/examples/detect.c
+++ b/examples/detect.c
@@ -194,6 +194,7 @@ int main (int argc, char **argv)
}
// Try to get Media player device info XML file...
+ fprintf(stdout, "Trying to print WMPInfo.xml if it exists\n");
files = LIBMTP_Get_Filelisting_With_Callback(iter, NULL, NULL);
if (files != NULL) {
LIBMTP_file_t *file, *tmp;
@@ -202,7 +203,6 @@ int main (int argc, char **argv)
if (!strcmp(file->filename, "WMPInfo.xml") ||
!strcmp(file->filename, "WMPinfo.xml"))
{
- fprintf(stdout, "Found WMPInfo.xml\n");
xmlfileid = file->item_id;
}
tmp = file;
@@ -210,6 +210,8 @@ int main (int argc, char **argv)
LIBMTP_destroy_file_t(tmp);
}
}
+ if (xmlfileid == 0)
+ fprintf(stdout, "WMPInfo.xml Does not exist on this device\n");
if (xmlfileid != 0)
{
FILE *xmltmp = tmpfile();
@@ -226,8 +228,6 @@ int main (int argc, char **argv)
{
uint8_t *buf = NULL;
uint32_t readbytes;
-
- fprintf(stdout, "Grabbed WMPInfo.xml File Descriptor\n");
buf = malloc(XML_BUFSIZE);
if (buf == NULL)