Changeset: b4097c64292a for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b4097c64292a
Modified Files:
        clients/mapilib/mapi.c
Branch: default
Log Message:

Add more informative error messages.


diffs (27 lines):

diff --git a/clients/mapilib/mapi.c b/clients/mapilib/mapi.c
--- a/clients/mapilib/mapi.c
+++ b/clients/mapilib/mapi.c
@@ -2555,17 +2555,21 @@ mapi_start_talking(Mapi mid)
 
        assert(len < BLOCK);
 
+       if (len == 0){
+               mapi_setError(mid, "Challenge string is not valid, it is 
empty", "mapi_start_talking", MERROR);
+               return mid->error;
+       }
        /* buf at this point looks like "challenge:servertype:protover[:.*]" */
        chal = buf;
        server = strchr(chal, ':');
        if (server == NULL) {
-               mapi_setError(mid, "Challenge string is not valid", 
"mapi_start_talking", MERROR);
+               mapi_setError(mid, "Challenge string is not valid, server not 
found", "mapi_start_talking", MERROR);
                return mid->error;
        }
        *server++ = '\0';
        protover = strchr(server, ':');
        if (protover == NULL) {
-               mapi_setError(mid, "Challenge string is not valid", 
"mapi_start_talking", MERROR);
+               mapi_setError(mid, "Challenge string is not valid, protocol not 
found", "mapi_start_talking", MERROR);
                return mid->error;
        }
        *protover++ = '\0';
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to