diff options
author | Volker Lendecke <vlendec@samba.org> | 2007-06-16 11:48:11 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:23:25 -0500 |
commit | 32ba5145b8c8385f56a1e8f025c7be1bc848077b (patch) | |
tree | 0df316e5b65f494fd1b491d6fe0b235710d89609 /source3/smbd | |
parent | 80c085d8ef1619865710b2ceb2c13fc56fd1929c (diff) | |
download | samba-32ba5145b8c8385f56a1e8f025c7be1bc848077b.tar.gz samba-32ba5145b8c8385f56a1e8f025c7be1bc848077b.tar.bz2 samba-32ba5145b8c8385f56a1e8f025c7be1bc848077b.zip |
r23518: Remove the silly assumption that string_replace requires a pstring.
Jeremy, I am always very confused about the different length arguments
in convert_string and friends. Can you take a look at the change in
string_replace and verify it's ok? Thanks!
While at it, remove the pstring limit for strhasupper and strhaslower.
(This used to be commit e6e5703658aeaeb0cca5d7281095e17553001d4b)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/notify.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/smbd/notify.c b/source3/smbd/notify.c index 9074990be7..1b75916942 100644 --- a/source3/smbd/notify.c +++ b/source3/smbd/notify.c @@ -328,7 +328,7 @@ void notify_fname(connection_struct *conn, uint32 action, uint32 filter, static void notify_fsp(files_struct *fsp, uint32 action, const char *name) { struct notify_change *change, *changes; - pstring name2; + char *tmp; if (fsp->notify == NULL) { /* @@ -337,9 +337,6 @@ static void notify_fsp(files_struct *fsp, uint32 action, const char *name) return; } - pstrcpy(name2, name); - string_replace(name2, '/', '\\'); - /* * Someone has triggered a notify previously, queue the change for * later. @@ -370,11 +367,14 @@ static void notify_fsp(files_struct *fsp, uint32 action, const char *name) change = &(fsp->notify->changes[fsp->notify->num_changes]); - if (!(change->name = talloc_strdup(changes, name2))) { + if (!(tmp = talloc_strdup(changes, name))) { DEBUG(0, ("talloc_strdup failed\n")); return; } + string_replace(tmp, '/', '\\'); + change->name = tmp; + change->action = action; fsp->notify->num_changes += 1; |