That is a good solution however there are 2 very minor problems with it.
First is that people will be able to tell from that how long you have had
amsn running for, not sure if that is a good or bad thing, but for privacy
reasons maybe it is bad. Second if somebody changes the date on their
computer then that value could return a number that is greater than 32 bits
leaving you with the same problem that you started with (or if they just
left amsn on for long enough :P).

What I suggest is just taking the mod of the current clock ticks, something
like taking the value from the last decade or something. (this also saves
requiring of the $::time_now variable) ie:

set timestamp [ expr { [clock clicks -milliseconds] % 315360000 } ]
append data "[binary format i $timestamp]"


----- Original Message From: "Vivia Nikolaidou" ----- 

>
> reggaemanu : thanx from me too :)))))) I came up with an easy approach:
>
> on startup of amsn: for example, file amsn line 59, add this:
>
> set time_now [clock clicks -milliseconds]
>
> when we set the headers: (replacing line 849)
>
> set timestamp [ expr { [clock clicks -milliseconds] - $::time_now } ]
> append data "[binary format i $timestamp]"
>
> However I have no webcam to test here, and I'm afraid I might break
> something, so - someone who has a webcam, can you please test this and
> commit if it works?
>
> On Mon, 1 May 2006, Youness Alaoui wrote:
>
> > alright, I know what the problem is, and that's what I thought...
> > the timestamp is a 'windows' GetTickCount timestamp type, which means
> > it's the number of ticks (milliseconds) since the OS was started. In our
> > case, I just put in the number of ms since 1970 (the epoch time)... you
> > see, that might be good, but.. it's a long (could be represented on
> > 64bits) while the field in the header is an int (32bits), so we need to
> > change that and set it to the number of ms since a certain time.. it
> > could be saving the [clock clicks] since amsn was started, or it could
> > be the [clock clicks] since the webcam session was started...
> > someone please fix this, I gtg now..
> > Thanks a lot reggaemanu for the help!
> >
> > KaKaRoTo
> >
> > On Mon, 01 May 2006 20:06:23 -0400, reggaemanu <[EMAIL PROTECTED]>
wrote:
> >
> > >Hi,
> > >So, Youness, we talked about that yesterday, the problem is the
timestamp.
> > >And there is a problem with the pause function, here is the bugreport :
> > >
> > >
> > >integer value too large to represent
> > >    while executing
> > >"binary format i [clock clicks -milliseconds]"
> > >    ("PAUSED" arm line 21)
> > >    invoked from within
> > >"switch $state {
> > >
> > >            "AUTH"
> > >            {
> > >                if { $server == 0 } {
> > >                    set data
"recipientid=$rid&sessionid=$session\r\n\r\n"
> > >                    setObjOption $sock state "C..."
> > >    (procedure "::MSNCAM::WriteToSock" line 30)
> > >    invoked from within
> > >"::MSNCAM::WriteToSock sock11"
> >



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Amsn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amsn-devel

Reply via email to