#endif __SABER__
init_ss_err_tbl();
- init_sms_err_tbl();
- init_krb_err_tbl();
ss = ss_create_invocation("sms", "2.0", (char *)NULL,
&sms_test, &status);
test_noop()
{
int status = sms_noop();
- if (status) ss_perror(ss, status, 0);
+ if (status) ss_perror(ss, status, "");
}
test_new()
}
}
status = sms_connect(server);
- if (status) ss_perror(ss, status, 0);
+ if (status) ss_perror(ss, status, "");
}
test_disconnect()
{
int status = sms_disconnect();
- if (status) ss_perror(ss, status, 0);
+ if (status) ss_perror(ss, status, "");
+}
+
+test_host()
+{
+ char host[BUFSIZ];
+ int status;
+
+ bzero(host, sizeof(host));
+
+ if (status = sms_host(host, sizeof(host) - 1))
+ ss_perror(ss, status, "");
+ else
+ printf("You are connected to host %s\n", host);
}
test_auth()
int status;
status = sms_auth("smstest");
- if (status) ss_perror(ss, status, 0);
+ if (status) ss_perror(ss, status, "");
}
test_script(argc, argv)
count = 0;
status = sms_query(argv[1], argc-2, argv+2, print_reply, (char *)NULL);
printf("%d tuple%s\n", count, ((count == 1) ? "" : "s"));
- if (status) ss_perror(ss, status, 0);
+ if (status) ss_perror(ss, status, "");
}
test_access(argc, argv)
return;
}
status = sms_access(argv[1], argc-2, argv+2);
- if (status) ss_perror(ss, status, 0);
+ if (status) ss_perror(ss, status, "");
}
if (status = sms_do_update())
ss_perror(ss, status, " while triggering dcm");
}
+
+
+test_motd(argc, argv)
+ int argc;
+ char **argv;
+{
+ int status;
+ char *motd;
+
+ if (status = sms_motd(&motd))
+ ss_perror(ss, status, " while getting motd");
+ if (motd)
+ printf("%s\n", motd);
+ else
+ printf("No message of the day.\n");
+}