[opensource-dev] Removing duplicated protected folders (SVC-6898)

2011-04-21 Thread Opensource Obscure
Before SVC-6898 was fixed, new calling cards folders for each
language have been created for those users (or a subset of users)
who had switched language to something different than English.

https://jira.secondlife.com/browse/SVC-6898

Now, those folders can't be deleted by users since they are
system folders. Seth suggested a workaround, and I confirm it to
work, but it requires compiling the viewer, which is hard a solution
for most users.

What about building a viewer which includes the workaround and
make it available for download to users by this issue? (I added
this proposal to https://jira.secondlife.com/browse/SVC-6898 ).

Opensource Obscure
--
http://twitter.com/oobscure - http://opensourceobscure.com/lol
___
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges


[opensource-dev] Deploying External Editor with Windows build?

2011-04-21 Thread Brandon Husbands
Hey all i own the rights to the source for the LSLEditor.
It is publicly GPL but i can license it to ll under any terms they want.

Since the external editor feature is ebing added it would be a good idea to
deploy that with it.
whatcha think?
___
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges

Re: [opensource-dev] Deploying External Editor with Windows build?

2011-04-21 Thread Oz Linden (Scott Lawrence)
On 2011-04-21 14:08, Brandon Husbands wrote:
> Hey all i own the rights to the source for the LSLEditor.
> It is publicly GPL but i can license it to ll under any terms they want.
>
> Since the external editor feature is ebing added it would be a good 
> idea to deploy that with it.
> whatcha think?

Your timing is amazing... I'd been meaning to talk to you about that...

I confess to not having tried it yet - what say you, Community ?

Without making any commitments about what will happen - should we make 
it available as an optional component?
___
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges


Re: [opensource-dev] Review Request: STORM-956 Ability to mute dialogs by muting object (or object owner)

2011-04-21 Thread Vadim ProductEngine

---
This is an automatically generated e-mail. To reply, visit:
http://codereview.secondlife.com/r/275/#review640
---

Ship it!


Looks fine to me.

- Vadim


On April 20, 2011, 2:33 p.m., Jonathan Yap wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://codereview.secondlife.com/r/275/
> ---
> 
> (Updated April 20, 2011, 2:33 p.m.)
> 
> 
> Review request for Viewer.
> 
> 
> Summary
> ---
> 
> From the jira Description:
> Griefers are still able to spam you with dialogs, such as dialogs, web site 
> popups, and avatar animation requests even after you mute the owner of the 
> object. Muting does not stop these at all. This is an ideal path for griefers 
> to attack and they have been doing so for as long as I've been on Second 
> Life. I believe that muting the object or it's owner should stop dialogs of 
> all types from appearing from the object.
> 
> Note:
> The changes to message_template.msg are not mine; that file was pushed from 
> the server source into viewer-development.  I have no control over what goes 
> into that file or how it is formatted, etc.
> 
> 
> This addresses bug Storm-956.
> http://jira.secondlife.com/browse/Storm-956
> 
> 
> Diffs
> -
> 
>   doc/contributions.txt ec4ad7e3ecca 
>   indra/newview/llviewermessage.cpp ec4ad7e3ecca 
>   scripts/messages/message_template.msg ec4ad7e3ecca 
> 
> Diff: http://codereview.secondlife.com/r/275/diff
> 
> 
> Testing
> ---
> 
> See lengthy Test Plan in the jira.
> 
> 
> Thanks,
> 
> Jonathan
> 
>

___
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges

Re: [opensource-dev] Review Request: fix for STORM-973: [crashhunters] crash at LLViewerTextureList::removeImageFromList(LLViewerFetchedTexture *)7

2011-04-21 Thread Vadim ProductEngine

---
This is an automatically generated e-mail. To reply, visit:
http://codereview.secondlife.com/r/252/#review641
---

Ship it!


I assume you'll add the comment before committing this.

- Vadim


On April 8, 2011, 10:26 a.m., Xiaohong Bao wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://codereview.secondlife.com/r/252/
> ---
> 
> (Updated April 8, 2011, 10:26 a.m.)
> 
> 
> Review request for Viewer.
> 
> 
> Summary
> ---
> 
> this is to resubmit the patch for storm-973.
> 
> We are not very clear what causes this. But this fix is targeting three most 
> possible causes:
> 1, a texture is failed to add into mImageList but its flag is set to be 
> successful;
> 2, a texture status is changed not from the main thread, because gTextureList 
> is not thread-safe;
> 3, gTextureList is accessed before it is initialized.
> 
> I regenerated the viewer-development-storm-973 branch based on the latest 
> viewer-development branch. If you still can not apply the patch directly, I 
> am afraid you should do the manual merge. Otherwise grant me the permission, 
> I will do it. 
> 
> 
> This addresses bug storm-973.
> http://jira.secondlife.com/browse/storm-973
> 
> 
> Diffs
> -
> 
>   indra/newview/lldrawpoolbump.cpp 13670741a0a8 
>   indra/newview/llviewertexturelist.h 13670741a0a8 
>   indra/newview/llviewertexturelist.cpp 13670741a0a8 
> 
> Diff: http://codereview.secondlife.com/r/252/diff
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Xiaohong
> 
>

___
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges

Re: [opensource-dev] Deploying External Editor with Windows build?

2011-04-21 Thread Brandon Husbands
The editor does run under mono just fine.
This would be the windows option for the others just select a few.
Maybe have a list of a few that are in the installer as optional.

On Thu, Apr 21, 2011 at 2:33 PM, Mike Chase <
mike.ch...@alternatemetaverse.com> wrote:

> Unless it can be made available cross platform I don't see a reason to
> favor one over another.  Personally I use Eclipse and LSLPlus and the
> internal editor for debug tweaks or quick hacks.
>
> Maybe an alongside download or a link on the dev page.  But I wouldn't
> think bundling it with the viewer makes sense unless the code is donated
> to the project and made to work cross platform. That is, it becomes the
> standard LSL editor for everyone.
>
> Mike
>
> On Thu, 2011-04-21 at 15:23 -0400, Oz Linden (Scott Lawrence) wrote:
> > On 2011-04-21 14:08, Brandon Husbands wrote:
> > > Hey all i own the rights to the source for the LSLEditor.
> > > It is publicly GPL but i can license it to ll under any terms they
> want.
> > >
> > > Since the external editor feature is ebing added it would be a good
> > > idea to deploy that with it.
> > > whatcha think?
> >
> > Your timing is amazing... I'd been meaning to talk to you about that...
> >
> > I confess to not having tried it yet - what say you, Community ?
> >
> > Without making any commitments about what will happen - should we make
> > it available as an optional component?
> > ___
> > Policies and (un)subscribe information available here:
> > http://wiki.secondlife.com/wiki/OpenSource-Dev
> > Please read the policies before posting to keep unmoderated posting
> privileges
>
>
>


-- 
---
This email is a private and confidential communication. Any use of email may
be subject to the laws and regulations of the United States. You may not
Repost, Distribute nor reproduce any content of this message.
---
---
___
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges

[opensource-dev] OpenID based logins?

2011-04-21 Thread Brandon Husbands
Any thoughts to being able to link your SL account to an open id identity
server?

-- 
---
This email is a private and confidential communication. Any use of email may
be subject to the laws and regulations of the United States. You may not
Repost, Distribute nor reproduce any content of this message.
---
---
___
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges

Re: [opensource-dev] Deploying External Editor with Windows build?

2011-04-21 Thread Mike Chase
Unless it can be made available cross platform I don't see a reason to
favor one over another.  Personally I use Eclipse and LSLPlus and the
internal editor for debug tweaks or quick hacks.  

Maybe an alongside download or a link on the dev page.  But I wouldn't
think bundling it with the viewer makes sense unless the code is donated
to the project and made to work cross platform. That is, it becomes the
standard LSL editor for everyone.

Mike

On Thu, 2011-04-21 at 15:23 -0400, Oz Linden (Scott Lawrence) wrote: 
> On 2011-04-21 14:08, Brandon Husbands wrote:
> > Hey all i own the rights to the source for the LSLEditor.
> > It is publicly GPL but i can license it to ll under any terms they want.
> >
> > Since the external editor feature is ebing added it would be a good 
> > idea to deploy that with it.
> > whatcha think?
> 
> Your timing is amazing... I'd been meaning to talk to you about that...
> 
> I confess to not having tried it yet - what say you, Community ?
> 
> Without making any commitments about what will happen - should we make 
> it available as an optional component?
> ___
> Policies and (un)subscribe information available here:
> http://wiki.secondlife.com/wiki/OpenSource-Dev
> Please read the policies before posting to keep unmoderated posting privileges


___
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges


Re: [opensource-dev] Review Request: partial fix for STORM-948: [crashhunters] meta-issue for bad_alloc exceptions

2011-04-21 Thread Merov Linden


> On March 25, 2011, 6:20 p.m., Merov Linden wrote:
> > indra/newview/llappviewer.cpp, lines 1417-1420
> > 
> >
> > Aren't we in danger of immediate crash when called? If so, what happens 
> > if we return here? Do we let the app crash? Shouldn't we crash here 
> > immediately so we can identify in the stack trace which memory allocation 
> > produces the situation?
> 
> Xiaohong Bao wrote:
> if we can avoid crash, we try to. if we can not, then viewer will crash 
> somewhere. This fix can not completely eliminate memory failure but try its 
> best to save the viewer from crash.

The problem is that it doesn't save the viewer from crashing, it's just 
delaying the inevitable. Worse: it's now going to crash in some random part of 
the code because memory gets corrupted, wasting tons of time for devs tracking 
why and doing no good to the user.

At the very least, if one gets into this situation of calling 
forceToRelieveMemory() too often, one should get a debug message in the log 
with some stats (memory used, memory requested), and a stack trace (I think 
there's a call for that available in llcommon). That will help the dev to 
identify the possibly bad allocs.


- Merov


---
This is an automatically generated e-mail. To reply, visit:
http://codereview.secondlife.com/r/218/#review505
---


On March 21, 2011, 10:16 a.m., Xiaohong Bao wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://codereview.secondlife.com/r/218/
> ---
> 
> (Updated March 21, 2011, 10:16 a.m.)
> 
> 
> Review request for Viewer.
> 
> 
> Summary
> ---
> 
> partial fix for STORM-948: [crashhunters] meta-issue for bad_alloc exceptions
> fixed: crashed caused by snapshots, loading the last bitmap, too large 
> texture memory due to insufficient physical memory
> also force to rebuild VBO if the memory is about to be running out to 
> eliminate possible memory leaking caused by GPU driver.
> 
> the changeset: 30a545579ab6
> 
> 
> This addresses bug storm-948.
> http://jira.secondlife.com/browse/storm-948
> 
> 
> Diffs
> -
> 
>   indra/newview/llappviewer.h a8639217816b 
>   indra/newview/llappviewer.cpp a8639217816b 
>   indra/newview/llviewerdisplay.cpp a8639217816b 
>   indra/newview/llviewertexturelist.h a8639217816b 
>   indra/newview/llviewertexturelist.cpp a8639217816b 
>   indra/newview/llviewerwindow.cpp a8639217816b 
> 
> Diff: http://codereview.secondlife.com/r/218/diff
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Xiaohong
> 
>

___
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges

Re: [opensource-dev] Deploying External Editor with Windows build?

2011-04-21 Thread WolfPup
Actually if this could be made to be cross platform then it could be turned into a self maintaining external editor as it is the current version is about 8 months out of date as far as the LSL code is concerned. and the way it would end up being self updating is ti could pull directly from the llscript section of the code all the newer LSL functions every time it was built on the LL build farms or even any open source developer currently working on the viewer. Yes i think this would be a nice addition as an optional external editor. to make it cross platform it would have to be converted from .net code to c++ code.-Original Message-
From: Brandon HusbandsSent: Apr 21, 2011 3:50 PM
To: Mike Chase 
Cc: OpenSource Mailing List 
Subject: Re: [opensource-dev] Deploying External Editor with Windows build?

The editor does run under mono just fine. This would be the windows option for the others just select a few. Maybe have a list of a few that are in the installer as optional.On Thu, Apr 21, 2011 at 2:33 PM, Mike Chase  wrote:
Unless it can be made available cross platform I don't see a reason to
favor one over another.  Personally I use Eclipse and LSLPlus and the
internal editor for debug tweaks or quick hacks.

Maybe an alongside download or a link on the dev page.  But I wouldn't
think bundling it with the viewer makes sense unless the code is donated
to the project and made to work cross platform. That is, it becomes the
standard LSL editor for everyone.

Mike

On Thu, 2011-04-21 at 15:23 -0400, Oz Linden (Scott Lawrence) wrote:
> On 2011-04-21 14:08, Brandon Husbands wrote:
> > Hey all i own the rights to the source for the LSLEditor.
> > It is publicly GPL but i can license it to ll under any terms they want.
> >
> > Since the external editor feature is ebing added it would be a good
> > idea to deploy that with it.
> > whatcha think?
>
> Your timing is amazing... I'd been meaning to talk to you about that...
>
> I confess to not having tried it yet - what say you, Community ?
>
> Without making any commitments about what will happen - should we make
> it available as an optional component?
> ___
> Policies and (un)subscribe information available here:
> http://wiki.secondlife.com/wiki/OpenSource-Dev
> Please read the policies before posting to keep unmoderated posting privileges


-- ---This email is a private and confidential communication. Any use of email may be subject to the laws and regulations of the United States. You may not Repost, Distribute nor reproduce any content of this message.
--


___
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges

Re: [opensource-dev] Review Request: OPEN-61 Adding locations that VC redistributable package installs files.

2011-04-21 Thread Ima Mechanique

---
This is an automatically generated e-mail. To reply, visit:
http://codereview.secondlife.com/r/259/
---

(Updated April 21, 2011, 2:18 p.m.)


Review request for Viewer.


Changes
---

updated diff


Summary
---

The VC redistributable package installs its files (msvcr100.dll, msvcp100.dll, 
msvcr100d.dll, msvcp100d.dll, etc.) to the WINDOWS\System32 directory (and 
WINDOWS\SysWOW64, if it is a 64-bit version). Adding these locations to the 
list of places to look when attempting to copy the files to 
build-vc100\sharedlibs.

On 64 bit windows the 32-bit file versions go to SySWOW64, so this is listed 
first to prevent the 64-bit versions being used.

If any one knows how it could use %systemroot% instead of the environment 
variable WINDIR I'd appreciate the info ;-) 


This addresses bug OPEN-61.
http://jira.secondlife.com/browse/OPEN-61


Diffs (updated)
-

  indra/cmake/Copy3rdPartyLibs.cmake 33ca961b0870 

Diff: http://codereview.secondlife.com/r/259/diff


Testing
---

Ran 'autobuild build' without manually copying the redistributable files or 
adding the configure switch to point at their location.


Thanks,

Ima

___
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges

Re: [opensource-dev] Review Request: (STORM-380) There is a little delay in sound when gesture first time played

2011-04-21 Thread Seth ProductEngine


> On April 1, 2011, 4:22 a.m., Boroondas Gupte wrote:
> > indra/newview/llgesturemgr.cpp, lines 1215-1229
> > 
> >
> > hasLoadingAssets calls set::find in a loop (which is logarithmic in the 
> > set's size)
> > 
> > so we have N * M * log(L) behavior for update(). This might not be too 
> > bad, as the number of queued gestures N, the number of steps per gesture M 
> > and the number of loading assets L are probably all small most of the time, 
> > and the inner loop is exited via return once the first match has been 
> > found. But I still wonder whether it might pay off to e.g. make the 
> > gestures observers of their pending assets.
> > 
> >

Looks like making gestures observers of their pending assets will not allow to 
remove the nested loops completely. When an asset is loaded we still have to 
iterate through all the gestures for which this asset had been requested and 
remove it from each gesture's pending asset list. This also increases the 
memory usage because we store separate lists of assets which may have 
duplicates.

Also making gesture an observer adds the need in tracking its lifetime. 
Deriving LLMultiGesture from boost::signals2::trackable for that purpose will 
require LLAssetStorage refactoring to use boost::signals2 for connecting the 
callbacks.


> On April 1, 2011, 4:22 a.m., Boroondas Gupte wrote:
> > indra/newview/llgesturemgr.h, lines 168-170
> > 
> >
> > Shouldn't this be a (non-static) method of LLMulitGesture taking no 
> > argument, rather than a static member of LLGestureMgr taking a pointer to a 
> > gesture?
> > 
> > Also, the gesture should not be changed by that, should it? If 
> > possible, make the argument type pointer-to-const (or, if you make it a 
> > method of LLMultiGesture as suggested, make it a const method).

It could be a non-static method of LLMulitGesture if a gesture would be an 
observer of its own pending assets, or if a gesture would check pending assets 
from the list stored at LLGestureMgr. In this case the LLMulitGesture class 
becomes more complicated without any gain in performance because this is the 
same check that LLGestureMgr::hasLoadingAssets() does.


- Seth


---
This is an automatically generated e-mail. To reply, visit:
http://codereview.secondlife.com/r/231/#review531
---


On March 31, 2011, 10:18 a.m., Seth ProductEngine wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://codereview.secondlife.com/r/231/
> ---
> 
> (Updated March 31, 2011, 10:18 a.m.)
> 
> 
> Review request for Viewer.
> 
> 
> Summary
> ---
> 
> Added syncing animations and sounds before the gesture starts playing.
> The actual playing of animations and sounds of a gesture starts only when all 
> needed animations and sound files are loaded into viewer cache. This reduces 
> the delay between animations and sounds meant to be played simultaneously but 
> may increase the delay between the moment a gesture is triggered and the 
> moment it starts playing.
> 
> Fixed calling assets callback to clean up the void pointer in getAssetData() 
> and avoid potential memory leaks.
> 
> 
> This addresses bug STORM-380.
> http://jira.secondlife.com/browse/STORM-380
> 
> 
> Diffs
> -
> 
>   indra/llmessage/llassetstorage.cpp d30636c2a83a 
>   indra/newview/llgesturemgr.h d30636c2a83a 
>   indra/newview/llgesturemgr.cpp d30636c2a83a 
> 
> Diff: http://codereview.secondlife.com/r/231/diff
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Seth
> 
>

___
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges

Re: [opensource-dev] OpenID based logins?

2011-04-21 Thread Yoz Grahame
We've long thought about something like this, but it's currently low on the
priority list.

For it to be really useful, it needs to work for viewer login; however,
*that* needs web-triggered viewer login (as in, your authentication happens
in an external browser window first, and then the viewer logs you straight
in) otherwise you're forced to auth with your OpenID OP in the viewer
window, and that's the classic Password Anti-Pattern*.

Also, *if* we ever do this, we'd probably target Google and Facebook login
first, though I *think* that Google Auth uses OpenID so we might get
everything in one shot. (There's a multiple-orders-of-magnitude difference
between those who'd use Google/Facebook auth and those who even know what
OpenID is)

In principle, I know of no reason why we wouldn't want this. We use OpenID
and OAuth in various places already, and anything that makes it easier for
people to authenticate securely is a Good Thing. However, we need to be
convinced that there are major wins here before it can pushed up in the
priorities.

*
http://www.designingsocialinterfaces.com/patterns/The_Password_Anti-Pattern

On 21 April 2011 22:52, Brandon Husbands  wrote:

> Any thoughts to being able to link your SL account to an open id identity
> server?
>
> --
>
> ---
> This email is a private and confidential communication. Any use of email
> may be subject to the laws and regulations of the United States. You may not
> Repost, Distribute nor reproduce any content of this message.
>
> ---
>
> ---
>
> ___
> Policies and (un)subscribe information available here:
> http://wiki.secondlife.com/wiki/OpenSource-Dev
> Please read the policies before posting to keep unmoderated posting
> privileges
>
___
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges

Re: [opensource-dev] OpenID based logins?

2011-04-21 Thread Brandon Husbands
The reason i ask is i recently setup a oauth / openid server that uses  the
hmacone time pass alg. basically allows for you to use the google
authenticator app for 2 part authentication .
aka oath (not oauth);

basically i was thinking being able to use a authenticator for sl to further
protect the account.

http://code.google.com/p/google-authenticator/ has the phone apps.


heres the c# code;




public class HmacOneTimePassword
{
public const string DefaultAlgorithmName = "HMACSHA1";
public const int DefaultNumberOfDigits = 6;

private readonly HMAC hmac;
private readonly int numberOfDigits;

public HmacOneTimePassword(string secret)
: this(DefaultAlgorithmName, secret, DefaultNumberOfDigits)
{
}

public HmacOneTimePassword(string hmacAlgorithmName, string
secret, int numberOfDigits)
{
this.hmac = HMAC.Create(hmacAlgorithmName);
this.hmac.Key = Encoding.ASCII.GetBytes(secret);
this.numberOfDigits = numberOfDigits;
}

public virtual byte[] GetHash(long iterationNumber)
{
byte[] text = new byte[8];
for (int i = text.Length - 1; i >= 0; i--)
{
text[i] = (byte)(iterationNumber & 0xff);
iterationNumber >>= 8;
}

return this.hmac.ComputeHash(text);
}

public virtual string GetPassword(long iterationNumber)
{
byte[] hash = this.GetHash(iterationNumber);

int offset = hash[hash.Length - 1] & 0xf;

int binary = ((hash[offset] & 0x7f) << 24) | ((hash[offset
+ 1] & 0xff) << 16) | ((hash[offset + 2] & 0xff) << 8) | (hash[offset
+ 3] & 0xff);

int otp = binary % (int)Math.Pow(10, this.numberOfDigits);
return otp.ToString(new string('0', this.numberOfDigits));
}
}


public class TimeOneTimePassword : HmacOneTimePassword
{
public const int DefaultTimeStepSeconds = 30;
public static readonly DateTime DefaultEpoch = DateTimeHelper.UnixEpoch;

private readonly DateTime epoch;
private readonly int timeStep;

public TimeOneTimePassword(string secret)
: this(DefaultAlgorithmName, secret,
DefaultNumberOfDigits, DefaultEpoch, DefaultTimeStepSeconds)
{
}

public TimeOneTimePassword(string hmacAlgorithmName, string
secret, int numberOfDigits, DateTime epoch, int timeStep)
: base(hmacAlgorithmName, secret, numberOfDigits)
{
this.epoch = epoch;
this.timeStep = timeStep;
}

public virtual string GetPassword()
{
return this.GetPassword(DateTime.UtcNow);
}

public virtual string GetPassword(DateTime iterationTime)
{
return base.GetPassword(this.GetIterationNumber(iterationTime));
}

public virtual long GetIterationNumber(DateTime iterationTime)
{
return (long)((iterationTime - this.epoch).TotalSeconds /
this.timeStep);
}
}


public static class DateTimeHelper
{
/// 
/// The base DateTime.
/// 
public static readonly DateTime UnixEpoch = new DateTime(1970, 1, 1);

/// 
/// Converts a unixtime into a DateTime.
/// 
/// The unixtime to convert.
/// An equivalent datetime for the given unixtime.
public static DateTime FromUnixTime(double timestamp)
{
return UnixEpoch.AddSeconds(timestamp);
}

/// 
/// Converts a DateTime to a unixtime.
/// 
/// The datetime to convert.
/// An equivalent unixtime for the given datetime.
public static double ToUnixTime(DateTime dateTime)
{
TimeSpan timeSpan = dateTime - UnixEpoch;
return timeSpan.TotalSeconds;
}

/// 
/// Returns the first day of the week for a given datetime.
/// 
/// The given datetime.
/// The first day of the week.
public static DateTime FirstDayOfWeek(DateTime dateTime)
{
if (dateTime.DayOfWeek == DayOfWeek.Sunday)
{
dateTime = dateTime.AddDays(-7);
}
return dateTime.AddDays(-Convert.ToInt32(dateTime.DayOfWeek) + 1);
}

/// 
/// Returns the last day of the week for a given datetime.
/// 
/// The given datetime.
/// The last day of the week.
public static DateTime LastDayOfWeek(DateTime dateTime)
{
if (dateTime.DayOfWeek == DayOfWeek.Sunday)
{
dateTime = dateTime.AddDays(-7);
}
return new DateTime(dateTime.Year, dateTime.Month,
dateTime.Day).AddDays(7 - Convert.ToInt32(dateTime.DayOfWeek));
}

/// 
/// Returns the first day of the month of a given d

Re: [opensource-dev] OpenID based logins?

2011-04-21 Thread Nicky Perian
This email is a private and confidential  communication. Any use of email may 
be 
subject to the laws and  regulations of the United States. You may not Repost, 
Distribute nor  reproduce any content of this message.

Shouldn't this trailer be dropped from your emails. Looks like you are posting 
stuff to be shared and all traffic here is publicly archived.






From: Brandon Husbands 
To: Yoz Grahame 
Cc: opensource-dev 
Sent: Thu, April 21, 2011 7:34:40 PM
Subject: Re: [opensource-dev] OpenID based logins?

The reason i ask is i recently setup a oauth / openid server that uses  the 
hmacone time pass alg. basically allows for you to use the google authenticator 
app for 2 part authentication .
aka oath (not oauth);

basically i was thinking being able to use a authenticator for sl to further 
protect the account.

http://code.google.com/p/google-authenticator/ has the phone apps.


heres the c# code;





public class HmacOneTimePassword
{
public const string DefaultAlgorithmName = "HMACSHA1";
 public const int DefaultNumberOfDigits = 6;

private readonly HMAC hmac;
 private readonly int numberOfDigits;

public HmacOneTimePassword(string secret)
 : this(DefaultAlgorithmName, secret, DefaultNumberOfDigits)
{
}

public HmacOneTimePassword(string hmacAlgorithmName, string secret, int 
numberOfDigits)

 {
this.hmac = HMAC.Create(hmacAlgorithmName);
this.hmac.Key = Encoding.ASCII.GetBytes(secret);
 this.numberOfDigits = numberOfDigits;
}

public virtual byte[] GetHash(long iterationNumber)
 {
byte[] text = new byte[8];
for (int i = text.Length - 1; i >= 0; i--)
 {
text[i] = (byte)(iterationNumber & 0xff);
iterationNumber >>= 8;
}

return this.hmac.ComputeHash(text);
 }

public virtual string GetPassword(long iterationNumber)
 {
byte[] hash = this.GetHash(iterationNumber);

int offset = hash[hash.Length - 1] & 0xf;

int binary = ((hash[offset] & 0x7f) << 24) | ((hash[offset + 1] & 
0xff) << 16) | ((hash[offset + 2] & 0xff) << 8) | (hash[offset + 3] & 0xff);


int otp = binary % (int)Math.Pow(10, this.numberOfDigits);
 return otp.ToString(new string('0', this.numberOfDigits));
 }
}

public class TimeOneTimePassword : HmacOneTimePassword
 {
public const int DefaultTimeStepSeconds = 30;
public static readonly DateTime DefaultEpoch = DateTimeHelper.UnixEpoch;

private readonly DateTime epoch;
private readonly int timeStep;

public TimeOneTimePassword(string secret)
: this(DefaultAlgorithmName, secret, DefaultNumberOfDigits, 
DefaultEpoch, DefaultTimeStepSeconds)

 {
}

public TimeOneTimePassword(string hmacAlgorithmName, string secret, int 
numberOfDigits, DateTime epoch, int timeStep)

 : base(hmacAlgorithmName, secret, numberOfDigits)
{
this.epoch = epoch;
this.timeStep = timeStep;
 }

public virtual string GetPassword()
{
return this.GetPassword(DateTime.UtcNow);
 }

public virtual string GetPassword(DateTime iterationTime)
 {
return base.GetPassword(this.GetIterationNumber(iterationTime));
}

public virtual long GetIterationNumber(DateTime iterationTime)
 {
return (long)((iterationTime - this.epoch).TotalSeconds / 
this.timeStep);

 }
}

public static class DateTimeHelper
 {
/// 
/// The base DateTime.
 /// 
public static readonly DateTime UnixEpoch = new DateTime(1970, 1, 1);

/// 
/// Converts a unixtime into a DateTime.
 /// 
/// The unixtime to convert.
 /// An equivalent datetime for the given unixtime.
 public static DateTime FromUnixTime(double timestamp)
{
 return UnixEpoch.AddSeconds(timestamp);
}

/// 
 /// Converts a DateTime to a unixtime.
/// 
 /// The datetime to convert.
 /// An equivalent unixtime for the given datetime.
 public static double ToUnixTime(DateTime dateTime)
{
 TimeSpan timeSpan = dateTime - UnixEpoch;
return timeSpan.TotalSeconds;
}

/// 
 /// Returns the first day of the week for a given datetime.
/// 
 /// The given datetime.
 /// The first day of the week.
 public static DateTime FirstDayOfWeek(DateTime dateTime)
 {
if (dateTime.DayOfWeek == DayOfWeek.Sunday)
{
dateTime = dateTime.AddDays(-7);
 }
return dateTime.AddDays(-Convert.ToInt32(dateTime.DayOfWeek) 

Re: [opensource-dev] Review Request: OPEN-61 Adding locations that VC redistributable package installs files.

2011-04-21 Thread ardylay

---
This is an automatically generated e-mail. To reply, visit:
http://codereview.secondlife.com/r/259/#review644
---

Ship it!


Seems to have worked for me on Windows 7 64-bit.  Thanks!

- ardy.lay


On April 21, 2011, 2:18 p.m., Ima Mechanique wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://codereview.secondlife.com/r/259/
> ---
> 
> (Updated April 21, 2011, 2:18 p.m.)
> 
> 
> Review request for Viewer.
> 
> 
> Summary
> ---
> 
> The VC redistributable package installs its files (msvcr100.dll, 
> msvcp100.dll, msvcr100d.dll, msvcp100d.dll, etc.) to the WINDOWS\System32 
> directory (and WINDOWS\SysWOW64, if it is a 64-bit version). Adding these 
> locations to the list of places to look when attempting to copy the files to 
> build-vc100\sharedlibs.
> 
> On 64 bit windows the 32-bit file versions go to SySWOW64, so this is listed 
> first to prevent the 64-bit versions being used.
> 
> If any one knows how it could use %systemroot% instead of the environment 
> variable WINDIR I'd appreciate the info ;-) 
> 
> 
> This addresses bug OPEN-61.
> http://jira.secondlife.com/browse/OPEN-61
> 
> 
> Diffs
> -
> 
>   indra/cmake/Copy3rdPartyLibs.cmake 33ca961b0870 
> 
> Diff: http://codereview.secondlife.com/r/259/diff
> 
> 
> Testing
> ---
> 
> Ran 'autobuild build' without manually copying the redistributable files or 
> adding the configure switch to point at their location.
> 
> 
> Thanks,
> 
> Ima
> 
>

___
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges

Re: [opensource-dev] OpenID based logins?

2011-04-21 Thread Brandon Husbands
LOL its my catchall disclaimer

On Thu, Apr 21, 2011 at 8:12 PM, Nicky Perian  wrote:

> This email is a private and confidential communication. Any use of email
> may be subject to the laws and regulations of the United States. You may not
> Repost, Distribute nor reproduce any content of this message.
>
> Shouldn't this trailer be dropped from your emails. Looks like you are
> posting stuff to be shared and all traffic here is publicly archived.
>
>
> --
> *From:* Brandon Husbands 
> *To:* Yoz Grahame 
> *Cc:* opensource-dev 
> *Sent:* Thu, April 21, 2011 7:34:40 PM
> *Subject:* Re: [opensource-dev] OpenID based logins?
>
> The reason i ask is i recently setup a oauth / openid server that uses  the
> hmacone time pass alg. basically allows for you to use the google
> authenticator app for 2 part authentication .
> aka oath (not oauth);
>
> basically i was thinking being able to use a authenticator for sl to
> further protect the account.
>
> http://code.google.com/p/google-authenticator/ has the phone apps.
>
>
> heres the c# code;
>
>
>
>
> public class HmacOneTimePassword
> {
> public const string DefaultAlgorithmName = "HMACSHA1";
>
> public const int DefaultNumberOfDigits = 6;
>
> private readonly HMAC hmac;
>
> private readonly int numberOfDigits;
>
> public HmacOneTimePassword(string secret)
>
> : this(DefaultAlgorithmName, secret, DefaultNumberOfDigits)
> {
> }
>
> public HmacOneTimePassword(string hmacAlgorithmName, string secret, 
> int numberOfDigits)
>
> {
> this.hmac = HMAC.Create(hmacAlgorithmName);
> this.hmac.Key = Encoding.ASCII.GetBytes(secret);
>
> this.numberOfDigits = numberOfDigits;
> }
>
> public virtual byte[] GetHash(long iterationNumber)
>
> {
> byte[] text = new byte[8];
> for (int i = text.Length - 1; i >= 0; i--)
>
> {
> text[i] = (byte)(iterationNumber & 0xff);
> iterationNumber >>= 8;
> }
>
> return this.hmac.ComputeHash(text);
>
> }
>
> public virtual string GetPassword(long iterationNumber)
>
> {
> byte[] hash = this.GetHash(iterationNumber);
>
> int offset = hash[hash.Length - 1] & 0xf;
>
>
> int binary = ((hash[offset] & 0x7f) << 24) | ((hash[offset + 1] & 
> 0xff) << 16) | ((hash[offset + 2] & 0xff) << 8) | (hash[offset + 3] & 0xff);
>
>
> int otp = binary % (int)Math.Pow(10, this.numberOfDigits);
>
> return otp.ToString(new string('0', this.numberOfDigits));
>
> }
> }
>
>
> public class TimeOneTimePassword : HmacOneTimePassword
>
> {
> public const int DefaultTimeStepSeconds = 30;
> public static readonly DateTime DefaultEpoch = 
> DateTimeHelper.UnixEpoch;
>
>
> private readonly DateTime epoch;
> private readonly int timeStep;
>
>
> public TimeOneTimePassword(string secret)
> : this(DefaultAlgorithmName, secret, DefaultNumberOfDigits, 
> DefaultEpoch, DefaultTimeStepSeconds)
>
> {
> }
>
> public TimeOneTimePassword(string hmacAlgorithmName, string secret, 
> int numberOfDigits, DateTime epoch, int timeStep)
>
> : base(hmacAlgorithmName, secret, numberOfDigits)
> {
> this.epoch = epoch;
> this.timeStep = timeStep;
>
> }
>
> public virtual string GetPassword()
> {
> return this.GetPassword(DateTime.UtcNow);
>
> }
>
> public virtual string GetPassword(DateTime iterationTime)
>
> {
> return base.GetPassword(this.GetIterationNumber(iterationTime));
> }
>
> public virtual long GetIterationNumber(DateTime iterationTime)
>
> {
> return (long)((iterationTime - this.epoch).TotalSeconds / 
> this.timeStep);
>
> }
> }
>
>
> public static class DateTimeHelper
>
> {
> /// 
> /// The base DateTime.
>
> /// 
> public static readonly DateTime UnixEpoch = new DateTime(1970, 1, 1);
>
>
> /// 
> /// Converts a unixtime into a DateTime.
>
> /// 
> /// The unixtime to convert.
>
> /// An equivalent datetime for the given unixtime.
>
> public static DateTime FromUnixTime(double timestamp)
> {
>
> return UnixEpoch.AddSeconds(timestamp);
> }
>
> /// 
>
> /// Converts a DateTime to a unixtime.
> /// 
>
> /// The datetime to convert.
>
> /// An equivalent unixtime for the given datetime.
>
> public static double ToUnixTime(DateTime dateTime)
> {
>
> TimeSpan timeSpan = dateTime - UnixEpoch;
> return timeSpan.TotalSeconds;
> }
>
> /// 
>
> /// Returns the first day of the week for a 

Re: [opensource-dev] Review Request: OPEN-61 Adding locations that VC redistributable package installs files.

2011-04-21 Thread Nicky Perian

---
This is an automatically generated e-mail. To reply, visit:
http://codereview.secondlife.com/r/259/#review645
---

Ship it!


Works Great!

- Nicky


On April 21, 2011, 2:18 p.m., Ima Mechanique wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://codereview.secondlife.com/r/259/
> ---
> 
> (Updated April 21, 2011, 2:18 p.m.)
> 
> 
> Review request for Viewer.
> 
> 
> Summary
> ---
> 
> The VC redistributable package installs its files (msvcr100.dll, 
> msvcp100.dll, msvcr100d.dll, msvcp100d.dll, etc.) to the WINDOWS\System32 
> directory (and WINDOWS\SysWOW64, if it is a 64-bit version). Adding these 
> locations to the list of places to look when attempting to copy the files to 
> build-vc100\sharedlibs.
> 
> On 64 bit windows the 32-bit file versions go to SySWOW64, so this is listed 
> first to prevent the 64-bit versions being used.
> 
> If any one knows how it could use %systemroot% instead of the environment 
> variable WINDIR I'd appreciate the info ;-) 
> 
> 
> This addresses bug OPEN-61.
> http://jira.secondlife.com/browse/OPEN-61
> 
> 
> Diffs
> -
> 
>   indra/cmake/Copy3rdPartyLibs.cmake 33ca961b0870 
> 
> Diff: http://codereview.secondlife.com/r/259/diff
> 
> 
> Testing
> ---
> 
> Ran 'autobuild build' without manually copying the redistributable files or 
> adding the configure switch to point at their location.
> 
> 
> Thanks,
> 
> Ima
> 
>

___
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges

[opensource-dev] EnableTexture: Uniform out of range

2011-04-21 Thread Ricky
Ok, pulled down a fresh copy of viewer-development
(15842:3cf9f0e87e19) and built it using autobuild.  Worked flawlessly
on my Mac (10.6.7), even though this was my first time playing with
autobuild, even nicer than develop.py - no xcode gui!  However, when I
try to log in, just at the point it is going to show me the world, I
have a Fatal Error:

ERROR: enableTexture: Uniform out of range: 33

So I grepped around, found the message in
indra/llrender/llglslshader.cpp, extended it for debugging purposes:

ERROR: enableTexture: Uniform out of range: 33.  Texture size was 0

Huh?!  I'm know I don't know what is going on in this code, but a
texture size of 0 tells me something's afoot!

I thought I had heard something about this error in the past, but
searching my list archives didn't bring anything up... Ideas?

Ricky
Cron Stardust
___
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges