Jump to content

Failed dataserver events?


Life Camino
You are about to reply to a thread that has been inactive for 2052 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I'm working on a security relay that is accessed remotely by a HUD and one of the functions I am trying to implement is to be able to get a parcel prim count by owners report.  Getting that and passing it to the user's screen is not a problem.  But, I am also trying to build a list of full agent names to be used in a menu to allow returning of objects by owner.  This, of course, requires the dataserver to retrieve the DATA_NAME information.

 

I'm using this bit of code to initiate the parcel prim count by owners report:

 

                        prim_owners = llGetParcelPrimOwners( llGetPos() );
                        gListLength= llGetListLength(prim_owners);      
                        if (!gListLength)
                        {
                            llRegionSayTo(user, 0, "[ERROR]\n Couldn't get Parcel Prim Owners");
                        }
                        else
                        {
                            // Produce a copy of the list suitable for sorting by count, i.e. count then key 
                            integer x;
                            for ( ; x < gListLength; x += 2)
                            {
                                gListCountsAndOwners += llList2Integer(prim_owners, x+1);
                                gListCountsAndOwners += llList2String(prim_owners, x);
                            }
                            // Sort the list in descending order of prim count
                            gListCountsAndOwners = llListSort(gListCountsAndOwners, 2, FALSE);
                            // Lookup each owner's name. Start at the beginning of our sorted list
                            gListLength= llGetListLength(gListCountsAndOwners);
                            integer i;
                            for (;i< gListLength;i++)
                            {
                                string current_name = llList2String(gListCountsAndOwners, i+1);
                                string current_count = llList2String(gListCountsAndOwners, i);
                                llRegionSayTo(user, 0, "secondlife:///app/agent/" + (string)current_name + "/displayname" + "\t" + current_count);
                                i++;
                            }
                           
                            gDataserverID = llRequestAgentData( llList2String(gListCountsAndOwners, 1), DATA_NAME );
                        }

 

In the dataserver event I am using this bit of code in an attempt to store the names in another list:

 

dataserver(key query_id, string data) 
    {
        if ( query_id == gDataserverID )
        {
            llOwnerSay(data + " added to gListNamesAndCounts...");
           // llOwnerSay("gListLength = " + (string)gListLength);
           // llOwnerSay("gIndex = " + (string)gIndex);
            gListNamesAndCounts += data;
            gListNamesAndCounts += llList2String(gListCountsAndOwners, gIndex);  // process the count as a string
            if (gIndex >= gListLength)
            {
                prim_list();
            }
            gIndex += 2;               // bump through the strided list
            if (gIndex < gListLength )
            {
                // lookup name of next owner in our list
                
                gDataserverID = llRequestAgentData( llList2String(gListCountsAndOwners, gIndex +1) , DATA_NAME );
            }

        }

 

 

The problem I am running into is that the dataserver never processes all of the requests.  I have a list length of 92 - a key and a count for 46 prim owners in the region.  But, the process stops when gIndex reaches 74.  It never gets bumped all the way to 92, which would trigger the prim_list() function.

So, what is going on, here?  Why would it stop at 74 records and not make it all the way to 92?  Thanks, for any insight you can offer into this issue.

Link to post
Share on other sites

I was going to suggest that you are being hit by the forced 0.1 second sleep periods after each call to llRequestAgentData, but you are wisely triggering each new one at the end of the previous dataserver event, so that's not it.  I'm not aware of a throttle on the number of AgentData requests, although other functions that trigger a dataserver event (like the Experience functions) do get throttled.  I suppose that's possible, though.  You might try making your requests in batches to slow down the flood a bit.  Let the dataserver cool down after 20 requests, then trigger another burst of requests.....

Link to post
Share on other sites

Thanks, Rolig, but I added a llSleep(0.5) before each and every dataserver request and it plods along much more slowly, but only up to 74.  I still can't get it to process the entire list up to the 92 records it has in it.

Any other suggestions?

Link to post
Share on other sites

Only by grasping at straws.  I suppose you might try sending out the work in smaller chunks to separate scripts in child prims, the way that we have to do when we have to send a pile of llEmail messages at once.  That wouldn't get around any cap at the parcel or region level, but if there's some sort of limit on the number of requests a single script can send, it might help.  I am as puzzled as you are right now.

Link to post
Share on other sites

I think I may have gathered insight into what may be causing the problem.  The requests stop when it tries to process group owned objects.  That is to say, when it gets to the key of the Group Name that is the owner of prims in the region, it stops.  

I think what is happening is that I am issuing a llRequestAgentData request, but passing a group key, rather than an avatar key to the function, resulting in it not returning anything, and stopping the loop from continuing to bump ahead to the next records in the list.  But, I don't know how to detect that so I can intercept it and filter it out.  

 

EDIT:

I figured out how to retrieve the land group key and then delete it and its prim count from the list before passing the keys to the dataserver for agent names.  So, that solved the problem.  The script is now processing all of the records in the list.

Link to post
Share on other sites

Well, if you have the group keys for parcels on the region, you can filter the UUID list before sending it along to llRequestAgentData.  You can find out what group each parcel is set to with llGetParcelDetails(llGetPos(),[PARCEL_DETAILS_GROUP]).  If you're lucky and each parcel is set to only allow group members to rez objects, that should be enough.

Link to post
Share on other sites

I think a group member with the right permissions can rez an object then set and deed it to another group entirely. (A non-zero auto-return would eventually sweep it away, but not all parcels use auto-return.)

Maybe safer to set a watchdog timer with each request, and if the timer ever expires, skip on to the next request.

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...