Bugs item #2813606, was opened at 2009-06-28 20:00
Message generated for change (Comment added) made by mr-meltdown
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2813606&group_id=56967

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Mapi
Group: Clients CVS Head
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Stefan de Konink (skinkie)
Assigned to: Nobody/Anonymous (nobody)
Summary: Error message for access denied

Initial Comment:
The error value for an access denied (for example when a user is not granted to 
access a table) is set. But the error message is not. My suggestion is to set 
the in mapilib message, my strlen crashed, so I expect it was returning a null 
value. I have fixed my code by adding a null check.

----------------------------------------------------------------------

>Comment By: Fabian (mr-meltdown)
Date: 2009-06-28 21:29

Message:
/* Render error reply
*/
cherokee_dwriter_dict_open (&hdl->writer);
add_cstr_int (&hdl->writer, "SUCCESS", false);
add_cstr_int (&hdl->writer, "MONETDB_ERRNO",
mapi_error(dbh));

tmp = mapi_result_error(resHdl);
if (tmp)
add_cstr_str (&hdl->writer,
"MONETDB_ERROR", tmp, strlen(tmp));

Can you shed some light on how you would describe the difference between
"error value" and "error message"?  In particular what the "error value"
for an "access denied" is.

----------------------------------------------------------------------

Comment By: Stefan de Konink (skinkie)
Date: 2009-06-28 21:22

Message:
> can you give us (me) the slightest clue what you're doing

I'm trying to do a query on a table I have not been granted access to. And
trying to render the error message notifying my failure to do so. 


> what happens

The error message is not set, since strlen crashed on the result value I
expect it returned null.


> and what you expect?

My suggestion is to set the in mapilib message.


If the words cannot give you a clue I have the compiled C code here...

                        /* Render error reply
                         */
                        cherokee_dwriter_dict_open (&hdl->writer);
                        add_cstr_int (&hdl->writer, "SUCCESS", false);
                        add_cstr_int (&hdl->writer, "MONETDB_ERRNO",
mapi_error(dbh));

                        tmp = mapi_result_error(resHdl);
                        if (tmp)
                                add_cstr_str (&hdl->writer,
"MONETDB_ERROR", tmp, strlen(tmp));


----------------------------------------------------------------------

Comment By: Fabian (mr-meltdown)
Date: 2009-06-28 21:09

Message:
can you give us (me) the slightest clue what you're doing, what happens and
what you expect?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2813606&group_id=56967

------------------------------------------------------------------------------
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to