This is a group for folks designing and programming embedded systems using the Rabbit Semiconductor C-programmable microcontroller. Rabbit Semi is a spin-off from Z-World who makes a variety of embedded modules and tools. This group is not affiliated with either Rabbit or Z-World, but is a user forum for sharing ideas, asking questions,
flaunting knowledge, and other typical user group stuff. The Rabbit is a powerful uC, supported by a full-featured C-compiler.
TCP.lib bug - mfawzy79 - Sep 9 2:50:42 2008
Hi ALL,
i found a bug in the function sock_preread in the TCP.lib.
the bug gives compilation error, due multiple declaration for the same
variable.
can you help me?
Best Regards
Mohamed Fawzy
------------------------------------

(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )
Re: TCP.lib bug - eilidhs_daddy - Sep 9 4:01:03 2008
--- In r...@yahoogroups.com, "mfawzy79"
wrote:
>
> Hi ALL,
>
> i found a bug in the function sock_preread in the TCP.lib.
> the bug gives compilation error, due multiple declaration for the same
> variable.
>
> can you help me?
>
> Best Regards
> Mohamed Fawzy
>
I think you are going to need to post more details than that!
-K
------------------------------------

(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )Re: TCP.lib bug - mfawzy79 - Sep 9 8:57:40 2008
--- In r...@yahoogroups.com, "eilidhs_daddy"
wrote:
>
> --- In r...@yahoogroups.com, "mfawzy79"
wrote:
> >
> > Hi ALL,
> >
> > i found a bug in the function sock_preread in the TCP.lib.
> > the bug gives compilation error, due multiple declaration for
the same
> > variable.
> >
> > can you help me?
> >
> > Best Regards
> > Mohamed Fawzy
> > I think you are going to need to post more details than that!
>
> -K
>
sorry for lake of information.
1- i'm using the dynamic C 10.40 + RCM4300
2- the function as it is in the lib is
_tcp_nodebug
int sock_preread( void *s, byte *dp, int len )
{
auto word count;
auto tcp_Socket *s;
if (len < 0)
return -1;
#ifdef USING_SSL
if (_IS_SSL_SOCK(_s))
s = _TCP_SOCK_OF_SSL(_s);
else
#endif
s = _TCP_SOCK(_s);
if (_IS_TCP_SOCK(s)) {
LOCK_SOCK(s);
count = s->app_rd->len;
if (count) {
if (count > len) count = len;
_tbuf_xread((char far *)dp, s->app_rd, 0,
count);
}
UNLOCK_SOCK(s);
return count;
}
return -1;
}
so there is void*s and auto tcp_Socket *s.
this what i meant by multiple defination for the same variable.
Best Regards
Mohamed Fawzy
------------------------------------

(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )Re: TCP.lib bug - eilidhs_daddy - Sep 9 10:27:07 2008
--- In r...@yahoogroups.com, "mfawzy79"
wrote:
>
> --- In r...@yahoogroups.com, "eilidhs_daddy"
> wrote:
> >
> > --- In r...@yahoogroups.com, "mfawzy79"
> wrote:
> > >
> > > Hi ALL,
> > >
> > > i found a bug in the function sock_preread in the TCP.lib.
> > > the bug gives compilation error, due multiple declaration for
> the same
> > > variable.
> > >
> > > can you help me?
> > >
> > > Best Regards
> > > Mohamed Fawzy
> > >
> >
> > I think you are going to need to post more details than that!
> >
> > -K
> >
> sorry for lake of information.
> 1- i'm using the dynamic C 10.40 + RCM4300
> 2- the function as it is in the lib is
>
> _tcp_nodebug
> int sock_preread( void *s, byte *dp, int len )
> {
> auto word count;
> auto tcp_Socket *s;
>
> if (len < 0)
> return -1;
> #ifdef USING_SSL
> if (_IS_SSL_SOCK(_s))
> s = _TCP_SOCK_OF_SSL(_s);
> else
> #endif
> s = _TCP_SOCK(_s);
> if (_IS_TCP_SOCK(s)) {
> LOCK_SOCK(s);
> count = s->app_rd->len;
> if (count) {
> if (count > len) count = len;
> _tbuf_xread((char far *)dp, s->app_rd, 0,
> count);
> }
> UNLOCK_SOCK(s);
> return count;
> }
> return -1;
> }
>
> so there is void*s and auto tcp_Socket *s.
> this what i meant by multiple defination for the same variable.
>
> Best Regards
> Mohamed Fawzy
>
Well, unless I'm mistaken that definitely looks like a bug to me.
I suggest you contact Rabbit and report it at :
http://www.rabbit.com/support/questionSubmit.shtml
-K
------------------------------------

(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )Re: TCP.lib bug - Tom Collins - Sep 9 10:57:25 2008
--- In r...@yahoogroups.com, "mfawzy79"
wrote:
> sorry for lake of information.
> 1- i'm using the dynamic C 10.40 + RCM4300
> 2- the function as it is in the lib is
>
> _tcp_nodebug
> int sock_preread( void *s, byte *dp, int len )
That was fixed in the 10.44 release. Go into tcp.lib and update lines
327-331 with the following:
--------------------
int sock_preread( void *_s, byte *dp, int len );
/*** EndHeader */
_tcp_nodebug
int sock_preread( void *_s, byte *dp, int len )
--------------------
-Tom
------------------------------------

(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )