Skip to content

Commit

Permalink
Debug Prints
Browse files Browse the repository at this point in the history
tweak more debug prints

Update irrsmo00.c

debug prints

Signed-off-by: Elijah Swift <elijah.swift@ibm.com>
  • Loading branch information
ElijahSwiftIBM committed Feb 29, 2024
1 parent 9d44687 commit a34d64b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pyracf/common/irrsmo00.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,13 @@ static PyObject *call_irrsmo00(PyObject *self, PyObject *args, PyObject *kwargs)
return NULL;
}

printf("Hello world!\n");
char work_area[1024];
unsigned char req_handle[64] = {0};
running_userid_t running_userid_struct = {running_userid_length, {0}};
unsigned int alet = 0;
unsigned int acee = 0;
unsigned char * result_buffer = malloc(result_buffer_size);
unsigned char result_buffer[result_buffer_size];
memset(result_buffer, 0, result_buffer_size);
unsigned int saf_rc = 0;
unsigned int racf_rc = 0;
Expand All @@ -62,6 +63,12 @@ static PyObject *call_irrsmo00(PyObject *self, PyObject *args, PyObject *kwargs)
unsigned int num_parms = 17;
unsigned int fn = 1;

printf("Request XML: %s\n", request_xml);
printf("Request XML Length: %d\n", request_xml_length);
printf("Result Buffer Size: %d\n",result_buffer_size);
printf("Result Buffer Address: %d\n",&result_buffer);
printf("Result Buffer Contents: %s\n",result_buffer);

strncpy(
running_userid_struct.running_userid,
running_userid,
Expand Down
2 changes: 2 additions & 0 deletions pyracf/common/irrsmo00.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def call_racf(
and (result["returnCodes"][1] == 4000)
and (result["returnCodes"][2] < 100000000)
):
print(result)
result = call_irrsmo00(
request_xml=request_xml,
request_xml_len=len(request_xml),
Expand All @@ -80,6 +81,7 @@ def call_racf(
running_userid=running_userid,
running_userid_len=len(running_userid),
)
print(result)
# Preserve raw result XML just in case we need to create a dump.
# If the decoded result XML cannot be parsed with the XML parser,
# a dump may need to be taken to aid in problem determination.
Expand Down

0 comments on commit a34d64b

Please sign in to comment.