From f806e268c6c3a76f65b1282219e16fcdfb80a9b5 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 22 Aug 2013 18:23:33 +0200 Subject: stream: don't require streams to set s->pos in seek callback Instead, set s->pos depending on the success of the seek callback. --- stream/stream_smb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'stream/stream_smb.c') diff --git a/stream/stream_smb.c b/stream/stream_smb.c index 971c394051..d50258be97 100644 --- a/stream/stream_smb.c +++ b/stream/stream_smb.c @@ -76,8 +76,7 @@ static int control(stream_t *s, int cmd, void *arg) { static int seek(stream_t *s,int64_t newpos) { struct priv *p = s->priv; - s->pos = newpos; - if(smbc_lseek(p->fd,s->pos,SEEK_SET)<0) { + if(smbc_lseek(p->fd,newpos,SEEK_SET)<0) { return 0; } return 1; -- cgit v1.2.3