Whamcloud - gitweb
LU-10698 obdclass: allow specifying complex jobids
[fs/lustre-release.git] / lustre / ptlrpc / pack_generic.c
index d09ea4e..a66b6d4 100644 (file)
@@ -1513,9 +1513,9 @@ void lustre_msg_set_jobid(struct lustre_msg *msg, char *jobid)
                LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
 
                if (jobid != NULL)
-                       memcpy(pb->pb_jobid, jobid, LUSTRE_JOBID_SIZE);
+                       memcpy(pb->pb_jobid, jobid, sizeof(pb->pb_jobid));
                else if (pb->pb_jobid[0] == '\0')
-                       lustre_get_jobid(pb->pb_jobid);
+                       lustre_get_jobid(pb->pb_jobid, sizeof(pb->pb_jobid));
                return;
        }
        default: