[torquedev] torque 2.5: resources_avail changes?
Martin Siegert
siegert at sfu.ca
Tue Jul 13 10:22:32 MDT 2010
Thanks David.
I am out of the country right now - I'll test this as soon as I am back
(next week).
Cheers,
Martin
On Mon, Jul 12, 2010 at 04:05:52PM -0600, David Beer wrote:
> Martin,
>
> This was due to a bug that was fixed in 2.4, but the patch wasn't ported to trunk, and therefore it was "fixed" in the trunk but not properly. The correct fix has now been checked in. If you would like the same patch to continue testing, it is attached to this email. Either way, the correction has been checked in.
>
>
> --
> David Beer | Senior Software Engineer
> Adaptive Computing
> Index: src/cmds/qmgr.c
> ===================================================================
> --- src/cmds/qmgr.c (revision 3829)
> +++ src/cmds/qmgr.c (working copy)
> @@ -2114,8 +2114,12 @@
> /* DIAGTODO: need a list of public and read-only diag attrs */
> char **attr_public = NULL;
> char **attr_readonly = NULL;
> - int ret = FALSE;
>
> + char *dupname = NULL;
> + char *name_ptr = NULL;
> +
> + int ret = FALSE;
> +
> if (object == MGR_OBJ_SERVER)
> {
> attr_public = svr_public_attrs;
> @@ -2132,12 +2136,24 @@
> attr_readonly = node_readonly_attrs;
> }
>
> + dupname = strdup(name);
> + if (dupname == NULL)
> + {
> + return(FALSE);
> + }
> +
> + name_ptr = strchr(dupname,'.');
> + if (name_ptr != NULL)
> + {
> + *name_ptr = '\0';
> + }
> +
> if (attr_public != NULL && (attr_type & TYPE_ATTR_PUBLIC))
> {
> while (*attr_public != NULL && ret == FALSE)
> {
> /* if (strncmp(name, *attr_public, strlen(*attr_public)) == 0)*/
> - if(strcmp(name, *attr_public) == 0)
> + if(strcmp(dupname, *attr_public) == 0)
> {
> ret = TRUE;
> }
> @@ -2151,7 +2167,7 @@
> while (*attr_readonly != NULL && ret == FALSE)
> {
> /*if (strncmp(name, *attr_readonly, strlen(*attr_readonly)) == 0)*/
> - if (strcmp(name, *attr_readonly) == 0)
> + if (strcmp(dupname, *attr_readonly) == 0)
> ret = TRUE;
>
> attr_readonly++;
> _______________________________________________
> torquedev mailing list
> torquedev at supercluster.org
> http://www.supercluster.org/mailman/listinfo/torquedev
More information about the torquedev
mailing list