Some systems, such as Solaris, cannot handle NULL-pointers being passed to
`printf ("%s", NULL);' or the like. This caused a crash when sending the users
plugin's values over the network under Solaris.
*/
void plugin_submit (char *type, char *inst, char *val)
{
+ if (inst == NULL)
+ inst = "-";
+
+ if ((type == NULL) || (val == NULL))
+ {
+ DBG ("Help! NULL-pointer! type = %s; inst = %s; val = %s;",
+ (type == NULL) ? "(null)" : type,
+ inst,
+ (val == NULL) ? "(null)" : val);
+ return;
+ }
+
if (operating_mode == MODE_CLIENT)
network_send (type, inst, val);
else