summaryrefslogtreecommitdiff
path: root/examples/libsmbclient/tree.c
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-01-22 23:50:14 +0000
committerTim Potter <tpot@samba.org>2003-01-22 23:50:14 +0000
commit3bff6c4f981eb97f14117f350be00ff1cdfa26a9 (patch)
treed80c57e7b0bb1f2a80d17451d326bd3869b8cf12 /examples/libsmbclient/tree.c
parent210cb79d29fcf8e01b538b6af4dee430f9032882 (diff)
downloadsamba-3bff6c4f981eb97f14117f350be00ff1cdfa26a9.tar.gz
samba-3bff6c4f981eb97f14117f350be00ff1cdfa26a9.tar.bz2
samba-3bff6c4f981eb97f14117f350be00ff1cdfa26a9.zip
Sync with HEAD.
(This used to be commit db3901827fe776041fa38900e80ab2fab94c28a6)
Diffstat (limited to 'examples/libsmbclient/tree.c')
-rw-r--r--examples/libsmbclient/tree.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/libsmbclient/tree.c b/examples/libsmbclient/tree.c
index da60236e60..8dc9cc408b 100644
--- a/examples/libsmbclient/tree.c
+++ b/examples/libsmbclient/tree.c
@@ -51,7 +51,8 @@ void error_message(gchar *message) {
/* Ensure that the dialog box is destroyed when the user clicks ok. */
gtk_signal_connect_object (GTK_OBJECT (okay_button), "clicked",
- GTK_SIGNAL_FUNC (gtk_widget_destroy), dialog);
+ GTK_SIGNAL_FUNC (gtk_widget_destroy),
+ GTK_OBJECT(dialog));
gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->action_area),
okay_button);
@@ -744,8 +745,6 @@ int main( int argc,
/* Now, get the items in smb:/// and add them to the tree */
- dirp = (struct smbc_dirent *)dirbuf;
-
while ((err = smbc_getdents(dh, (struct smbc_dirent *)dirbuf,
sizeof(dirbuf))) != 0) {
@@ -758,6 +757,8 @@ int main( int argc,
}
+ dirp = (struct smbc_dirent *)dirbuf;
+
fprintf(stdout, "Dir len: %u\n", err);
while (err > 0) { /* Extract each entry and make a sub-tree */